pymodbus-dev / pymodbus

A full modbus protocol written in python
Other
2.32k stars 946 forks source link

PyModbus Errors in HASSIO #1322

Closed stefandbt closed 1 year ago

stefandbt commented 1 year ago

Versions

Pymodbus Specific

Description

When trying to request values from my inverter via pymodbus (ModbusTCP2MQTT) everything was fine. Since last week, I am experiencing errors in the log and some values are not displayed:

Code and Logs

# code and logs here.

Getting these errors in log files:

2023-01-30 17:07:32.179 ERROR (SyncWorker_4) [pymodbus.factory] index out of range
2023-01-30 17:07:32.180 ERROR (SyncWorker_4) [pymodbus.transaction] Modbus Error: [Input/Output] Unable to decode request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/pymodbus/transaction.py", line 208, in execute
    self.client.framer.processIncomingPacket(response,
  File "/usr/local/lib/python3.10/site-packages/pymodbus/framer/socket_framer.py", line 153, in processIncomingPacket
    self._process(callback)
  File "/usr/local/lib/python3.10/site-packages/pymodbus/framer/socket_framer.py", line 175, in _process
    raise ModbusIOException("Unable to decode request")

# please use the following to format logs when posting them here
import pymodbus
pymodbus.pymodbus_apply_logging_config()
janiversen commented 1 year ago

This is very confusing,

Maybe try to remember what happened to your system last week, if nothing happened then it looks like a device problem.

janiversen commented 1 year ago

And just for reference new Homeassistant with newest hassos works nicely with pymodbus.

janiversen commented 1 year ago

???

stefandbt commented 1 year ago

Hi Jan, sorry for the delay. In the meantime my Home Assistant installation had a HDD crash. I had to set it up again from scratch.

I am using now ModbusTCP to connect to my SunGrow PV Powerplant. Working as expected at thew moment. Thanks for your help and sorry for the confusion.

Cheers, Stefan