ekmmeters.py
def readHolidayDates(self):
        """ Serial call to read holiday dates into meter object buffer.

        Returns:
            bool: True on completion.
        """
        self.setContext("readHolidayDates")
        try:
            req_str = "0152310230304230282903"
            self.request(False)
            req_crc = self.calc_crc16(req_str[2:].decode("hex"))
            req_str += req_crc
            self.m_serial_port.write(req_str.decode("hex"))
            raw_ret = self.m_serial_port.getResponse(self.getContext())
            self.serialPostEnd()
            unpacked_read = self.unpackStruct(raw_ret, self.m_hldy)
            self.convertData(unpacked_read, self.m_hldy, self.m_kwh_precision)
            return_crc = self.calc_crc16(raw_ret[1:-2])
            if str(return_crc) == str(self.m_hldy["crc16"][MeterData.StringValue]):
                ekm_log("Holidays and Schedules CRC success")
                self.setContext("")
                return True
        except:
            ekm_log(traceback.format_exc(sys.exc_info()))

        self.setContext("")
        return False
def readHolidayDates(self):
        self.setContext("readHolidayDates")
        try:
            req_str = "0152310230304230282903"
            self.request(False)
            req_crc = self.calc_crc16(req_str[2:].decode("hex"))
            req_str += req_crc
            self.m_serial_port.write(req_str.decode("hex"))
            raw_ret = self.m_serial_port.getResponse(self.getContext())
            self.serialPostEnd()
            unpacked_read = self.unpackStruct(raw_ret, self.m_hldy)
            self.convertData(unpacked_read, self.m_hldy, self.m_kwh_precision)
            return_crc = self.calc_crc16(raw_ret[1:-2])
            if str(return_crc) == str(self.m_hldy["crc16"][MeterData.StringValue]):
                ekm_log("Holidays and Schedules CRC success")
                self.setContext("")
                return True
        except:
            ekm_log(traceback.format_exc(sys.exc_info()))

        self.setContext("")
        return False
def readHolidayDates ( self ) : self . setContext ( "readHolidayDates" ) try : req_str = "0152310230304230282903" self . request ( False ) req_crc = self . calc_crc16 ( req_str [ 2 : ] . decode ( "hex" ) ) req_str += req_crc self . m_serial_port . write ( req_str . decode ( "hex" ) ) raw_ret = self . m_serial_port . getResponse ( self . getContext ( ) ) self . serialPostEnd ( ) unpacked_read = self . unpackStruct ( raw_ret , self . m_hldy ) self . convertData ( unpacked_read , self . m_hldy , self . m_kwh_precision ) return_crc = self . calc_crc16 ( raw_ret [ 1 : - 2 ] ) if str ( return_crc ) == str ( self . m_hldy [ "crc16" ] [ MeterData . StringValue ] ) : ekm_log ( "Holidays and Schedules CRC success" ) self . setContext ( "" ) return True except : ekm_log ( traceback . format_exc ( sys . exc_info ( ) ) ) self . setContext ( "" ) return False
Serial call to read holiday dates into meter object buffer.

        Returns:
            bool: True on completion.
Serial call to read holiday dates into meter object buffer .