Skip to content

Commit

Permalink
Introduced more debug messages
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Ott <[email protected]>
  • Loading branch information
DerOetzi committed Aug 29, 2024
1 parent d07abf0 commit d80c559
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions solaredge2mqtt/services/modbus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def _read_from_modbus(
count=register_slice.registers_length(),
)

if not result.isError():
if result.isError():
logger.debug(f"Modbus read error: {result}")
else:
decoder = BinaryPayloadDecoder.fromRegisters(
result.registers,
byteorder=Endian.BIG,
Expand All @@ -134,7 +136,7 @@ def _read_from_modbus(

data = register_slice.payload_decode(decoder, data)
except ModbusException as error:
logger.trace(error)
logger.debug(f"Modbus read exception: {error}")

return data

Expand Down

0 comments on commit d80c559

Please sign in to comment.