-
-
Notifications
You must be signed in to change notification settings - Fork 76
Description
Hi.
I've started seeing the following error after upgrading the repo.
INFO:root:Loaded config sungrow-sg5kd
INFO:root:Creating SungrowModbusTcpClient
INFO:root:Connecting
DEBUG:pymodbus.client.sync:Connection to Modbus server established. Socket ('172.16.100.1', 40441)
DEBUG:pymodbus.client.sync:Connection to Modbus server established. Socket ('172.16.100.1', 48495)
INFO:root:Connected
INFO:root:No MQTT configuration detected
INFO:root:No Prometheus configuration detected
INFO:root:No InfluxDB configuration detected
INFO:root:Configured PVOutput Client
DEBUG:pymodbus.client.sync:Connection to Modbus server established. Socket ('172.16.100.1', 59731)
DEBUG:pymodbus.client.sync:Connection to Modbus server established. Socket ('172.16.100.1', 44457)
DEBUG:pymodbus.client.sync:Connection to Modbus server established. Socket ('172.16.100.1', 33161)
DEBUG:pymodbus.client.sync:Connection to Modbus server established. Socket ('172.16.100.1', 60073)
DEBUG:pymodbus.transaction:Current transaction state - IDLE
DEBUG:pymodbus.transaction:Running transaction 1
DEBUG:pymodbus.client.sync:Connection to Modbus server established. Socket ('172.16.100.1', 43245)
DEBUG:pymodbus.client.sync:Connection to Modbus server established. Socket ('172.16.100.1', 46709)
DEBUG:pymodbus.transaction:SEND: 0x0 0x1 0x0 0x0 0x0 0x6 0x1 0x4 0x13 0x88 0x0 0x64
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Transaction failed. ([Errno 104] Connection reset by peer)
DEBUG:pymodbus.framer.socket_framer:Processing:
DEBUG:pymodbus.transaction:Getting transaction 1
DEBUG:pymodbus.transaction:Changing transaction state from 'PROCESSING REPLY' to 'TRANSACTION_COMPLETE'
WARNING:root:Modbus connection failed
WARNING:root:Failed to scrape inverter, sleeping until next scan
DEBUG:pymodbus.client.sync:Connection to Modbus server established. Socket ('172.16.100.1', 48387)
DEBUG:pymodbus.client.sync:Connection to Modbus server established. Socket ('172.16.100.1', 36045)
DEBUG:pymodbus.client.sync:Connection to Modbus server established. Socket ('172.16.100.1', 50981)
DEBUG:pymodbus.client.sync:Connection to Modbus server established. Socket ('172.16.100.1', 36889)
DEBUG:pymodbus.transaction:Current transaction state - TRANSACTION_COMPLETE
DEBUG:pymodbus.transaction:Running transaction 2
DEBUG:pymodbus.client.sync:Connection to Modbus server established. Socket ('172.16.100.1', 58809)
DEBUG:pymodbus.client.sync:Connection to Modbus server established. Socket ('172.16.100.1', 55761)
DEBUG:pymodbus.transaction:SEND: 0x0 0x2 0x0 0x0 0x0 0x6 0x1 0x4 0x13 0x88 0x0 0x64
DEBUG:pymodbus.client.sync:New Transaction state 'SENDING'
DEBUG:pymodbus.transaction:Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
DEBUG:pymodbus.transaction:Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
DEBUG:pymodbus.transaction:RECV: 0x0
DEBUG:pymodbus.framer.socket_framer:Processing: 0x0
DEBUG:pymodbus.factory:Factory Response[0]
ERROR:pymodbus.factory:Unable to decode response Modbus Error: Unknown response 0
ERROR:pymodbus.transaction:Modbus Error: [Input/Output] Unable to decode request
Traceback (most recent call last):
File "/usr/local/.venv/lib/python3.11/site-packages/pymodbus/transaction.py", line 208, in execute
self.client.framer.processIncomingPacket(response,
File "/usr/local/.venv/lib/python3.11/site-packages/pymodbus/framer/socket_framer.py", line 165, in processIncomingPacket
self._process(callback, error=True)
File "/usr/local/.venv/lib/python3.11/site-packages/pymodbus/framer/socket_framer.py", line 175, in _process
raise ModbusIOException("Unable to decode request")
pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] Unable to decode request
WARNING:root:Modbus connection failed
WARNING:root:Failed to scrape inverter, sleeping until next scan
^CTraceback (most recent call last):
File "/root/solariot/./solariot.py", line 612, in
time.sleep(config.scan_interval)
I can confirm that the inverter is available...
root@debone:~/solariot# telnet 172.16.100.77 502
Trying 172.16.100.77...
Connected to 172.16.100.77.
Escape character is '^]'.
I suspect this has something to do with the version of SungrowModbusTcpClient but I am unable to downgrade due to issues with pycrypto.
I'm running this on Debian 12
Any ideas what might be causing this?
Thanks