mirror of
https://github.com/lumapu/ahoy.git
synced 2025-08-03 16:38:20 +02:00
RPI:error handling while getting corruppted data
extended error handling while getting corruppted data on 64 bit operating system (bullseye) lots of currupted data are reseived on Debian 11 OS. So we have to check the data length before using strict.unpack
This commit is contained in:
parent
d996c2c10b
commit
0d552e3007
4 changed files with 26 additions and 16 deletions
|
@ -179,8 +179,8 @@ def poll_inverter(inverter, dtu_ser, do_init, retries):
|
|||
|
||||
# Handle the response data if any
|
||||
if response:
|
||||
c_datetime = datetime.now()
|
||||
if hoymiles.HOYMILES_DEBUG_LOGGING:
|
||||
c_datetime = datetime.now()
|
||||
logging.debug(f'{c_datetime} Payload: ' + hoymiles.hexify_payload(response))
|
||||
|
||||
# prepare decoder object
|
||||
|
@ -195,6 +195,7 @@ def poll_inverter(inverter, dtu_ser, do_init, retries):
|
|||
# get decoder object
|
||||
result = decoder.decode()
|
||||
if hoymiles.HOYMILES_DEBUG_LOGGING:
|
||||
c_datetime = datetime.now()
|
||||
logging.info(f'{c_datetime} Decoded: {result.__dict__()}')
|
||||
|
||||
# check decoder object for output
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue