bohdan-s / SunGather

GNU General Public License v3.0
167 stars 69 forks source link

Support for SH6.0RT-V112 #205

Open merijnvdk opened 2 weeks ago

merijnvdk commented 2 weeks ago

I have a SH6.0RT-V112 and the device code is 3597 -> E0D

can support be added?

merijnvdk commented 2 weeks ago

Also I get errors like this:

2024-11-10 20:51:52 DEBUG    Scraping: read, 5039:61
2024-11-10 20:51:52 DEBUG    load_registers: read, 5039:61
2024-11-10 20:51:52 DEBUG    Current transaction state - TRANSACTION_COMPLETE
2024-11-10 20:51:52 DEBUG    Running transaction 3
2024-11-10 20:51:52 DEBUG    SEND: 0x0 0x3 0x0 0x0 0x0 0x6 0x1 0x4 0x13 0xaf 0x0 0x3d
2024-11-10 20:51:52 DEBUG    New Transaction state 'SENDING'
2024-11-10 20:51:52 DEBUG    Changing transaction state from 'SENDING' to 'WAITING FOR REPLY'
2024-11-10 20:51:52 DEBUG    Changing transaction state from 'WAITING FOR REPLY' to 'PROCESSING REPLY'
2024-11-10 20:51:52 DEBUG    RECV: 0x0 0x3 0x0 0x0 0x0 0x2 0x1 0x84 0x2
2024-11-10 20:51:52 DEBUG    Processing: 0x0 0x3 0x0 0x0 0x0 0x2 0x1 0x84 0x2
2024-11-10 20:51:52 DEBUG    Factory Response[132]
2024-11-10 20:51:52 ERROR    index out of range
index out of range
2024-11-10 20:51:52 ERROR    Modbus Error: [Input/Output] Unable to decode request
Traceback (most recent call last):
  File "/venv/lib/python3.12/site-packages/pymodbus/transaction.py", line 208, in execute
    self.client.framer.processIncomingPacket(response,
  File "/venv/lib/python3.12/site-packages/pymodbus/framer/socket_framer.py", line 153, in processIncomingPacket
    self._process(callback)
  File "/venv/lib/python3.12/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
Modbus Error: [Input/Output] Unable to decode request
Traceback (most recent call last):
  File "/venv/lib/python3.12/site-packages/pymodbus/transaction.py", line 208, in execute
    self.client.framer.processIncomingPacket(response,
  File "/venv/lib/python3.12/site-packages/pymodbus/framer/socket_framer.py", line 153, in processIncomingPacket
    self._process(callback)
  File "/venv/lib/python3.12/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
2024-11-10 20:51:52 WARNING  Modbus connection failed
Modbus connection failed
2024-11-10 20:51:52 DEBUG    Modbus Error: [Input/Output] Unable to decode request

This happens for quite a few registers (response code 132)