parse gen3plus inverter data
This commit is contained in:
@@ -277,6 +277,8 @@ class SolarmanV5(Message):
|
||||
logger.info(f'ts: {dt.strftime("%Y-%m-%d %H:%M:%S")}')
|
||||
|
||||
if (ftype == 1):
|
||||
self.__process_data()
|
||||
|
||||
result = struct.unpack_from('!HH', data, 0xdc)
|
||||
rated = result[0]/1
|
||||
actual = result[1]/10
|
||||
@@ -300,6 +302,11 @@ class SolarmanV5(Message):
|
||||
|
||||
self.forward(self._recv_buffer, self.header_len+self.data_len+2)
|
||||
|
||||
def __process_data(self):
|
||||
for key, update in self.db.parse(self._recv_buffer, 0):
|
||||
if update:
|
||||
self.new_data[key] = True
|
||||
|
||||
def msg_data_rsp(self):
|
||||
self.msg_response()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user