Browse Source
Merge pull request #1030 from PaeserBastelstube/main
RPi:crash when using additional InfoCommands
pull/1036/head
Lukas Pusch
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
8 additions and
4 deletions
-
tools/rpi/hoymiles/__init__.py
-
tools/rpi/hoymiles/__main__.py
-
tools/rpi/hoymiles/decoders/__init__.py
|
|
@ -183,6 +183,8 @@ class ResponseDecoder(ResponseDecoderFactory): |
|
|
|
model_desc = "Firmware version / date" |
|
|
|
elif command.upper() == '02': |
|
|
|
model_desc = "Inverter generic events log" |
|
|
|
elif command.upper() == '05': |
|
|
|
model_desc = "Inverter generic SystemConfigPara" |
|
|
|
elif command.upper() == '0B': |
|
|
|
model_desc = "mirco-inverters status data" |
|
|
|
elif command.upper() == '0C': |
|
|
@ -191,6 +193,8 @@ class ResponseDecoder(ResponseDecoderFactory): |
|
|
|
model_desc = "Inverter generic events log" |
|
|
|
elif command.upper() == '12': |
|
|
|
model_desc = "Inverter major events log" |
|
|
|
else: |
|
|
|
model_desc = "event not configured - check ahoy script" |
|
|
|
logging.info(f'model_decoder: {model}Decode{command.upper()} - {model_desc}') |
|
|
|
|
|
|
|
model_decoders = __import__('hoymiles.decoders') |
|
|
|
|
|
@ -175,7 +175,7 @@ def poll_inverter(inverter, dtu_ser, do_init, retries): |
|
|
|
inv_str = str(inverter_ser) |
|
|
|
if do_init: |
|
|
|
command_queue[inv_str].append(hoymiles.compose_send_time_payload(InfoCommands.InverterDevInform_All)) |
|
|
|
# command_queue[inv_str].append(hoymiles.compose_send_time_payload(InfoCommands.SystemConfigPara)) |
|
|
|
command_queue[inv_str].append(hoymiles.compose_send_time_payload(InfoCommands.SystemConfigPara)) |
|
|
|
command_queue[inv_str].append(hoymiles.compose_send_time_payload(InfoCommands.RealTimeRunData_Debug)) |
|
|
|
|
|
|
|
# Put all queued commands for current inverter on air |
|
|
|
|
|
@ -431,15 +431,15 @@ class DebugDecodeAny(UnknownResponse): |
|
|
|
l_payload = len(self.response) |
|
|
|
logging.debug(f' payload has {l_payload} bytes') |
|
|
|
|
|
|
|
logging.debug() |
|
|
|
logging.debug('') |
|
|
|
logging.debug('Field view: int') |
|
|
|
print_table_unpack('>B', self.response) |
|
|
|
|
|
|
|
logging.debug() |
|
|
|
logging.debug('') |
|
|
|
logging.debug('Field view: shorts') |
|
|
|
print_table_unpack('>H', self.response) |
|
|
|
|
|
|
|
logging.debug() |
|
|
|
logging.debug('') |
|
|
|
logging.debug('Field view: longs') |
|
|
|
print_table_unpack('>L', self.response) |
|
|
|
|
|
|
|