mkaiser / Sungrow-SHx-Inverter-Modbus-Home-Assistant

Sungrow SH Integration for Home Assistant for SH3K6, SH4K6, SH5K-20, SH5K-V13, SH3K6-30, SH4K6-30, SH5K-30, SH3.RS, SH3.6RS, SH4.0RS, SH5.0RS, SH6.0RS, SH5.0RT, SH6.0RT, SH8.0RT, SH10RT, SH5.0RT-20, SH6.0RT-20, SH8.0RT-20, SH10RT-20, SH5.0RT-V112, SH6.0RT-V112, SH8.0RT-V112, SH10RT-V112, SH5.0RT-V122, SH6.0RT-V122, SH8.0RT-V122, SH10RT-V122, SH4.6R
310 stars 80 forks source link

Entities are not receiving data #77

Closed lampi84 closed 1 year ago

lampi84 commented 1 year ago

I'm havin a Sungrow SH6.0RT inverter. I followed the instructions. An entered the IP adress, but unfortunatly the entities are not receiving any data from the modbus (See attached screenshot). Is there a way to troubleshoot what is the problem there.

sungrow

MrMontesa commented 1 year ago

Hey @lampi84, an error messages from home-assistant.log? Also try to "telnet IP 502" from the host homeassistant is running on towards the inverter. Does it connect? And lastly make sure to use the native LAN adapter. I had issues with wifi dongle or the LAN on the wifi dongle. Hope this helps

lampi84 commented 1 year ago

Hi, many thanks for your quick reply. i just checked the logs. From the error messages it seems like it can connect but it is not able to read the data. I'm getting a lot of these kind of error messages:

2023-03-14 21:21:56.911 ERROR (SyncWorker_1) [pymodbus.factory] index out of range 2023-03-14 21:21:56.912 ERROR (SyncWorker_1) [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") pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] Unable to decode request 2023-03-14 21:21:56.912 ERROR (SyncWorker_1) [homeassistant.components.modbus.modbus] Pymodbus: SungrowSHx: Modbus Error: [Input/Output] Unable to decode request 2023-03-14 21:21:56.923 ERROR (SyncWorker_4) [pymodbus.factory] index out of range

Do you have an idea how to fix it or to find out how to change configuration so that it can read the data.

lassej01 commented 1 year ago

Hi! Are you using the real Ethernetport (Rj45) thats behind (closer to wall) than the wifi-module?

lampi84 commented 1 year ago

Hi! I have a combined wifi-module which is also doing ethernet. Seems to be a newer version. I got this inverter begin of summer last year. No that i have connected a network cable i'm getting some values in my home assistant entities.

But i'm still seeing the following error messages in the log. Could it be that i have to adjust the yaml file where all the modbus addresses are mentioned?

2023-03-16 17:56:32.105 ERROR (SyncWorker_4) [homeassistant.components.modbus.modbus] Pymodbus: SungrowSHx: Modbus Error: [Input/Output] Unable to decode request 2023-03-16 17:56:32.113 ERROR (SyncWorker_2) [pymodbus.factory] index out of range 2023-03-16 17:56:32.113 ERROR (SyncWorker_2) [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") pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] Unable to decode request 2023-03-16 17:56:32.121 ERROR (SyncWorker_0) [pymodbus.factory] index out of range 2023-03-16 17:56:32.122 ERROR (SyncWorker_0) [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") pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] Unable to decode request 2023-03-16 17:56:32.130 ERROR (SyncWorker_5) [pymodbus.factory] index out of range 2023-03-16 17:56:32.130 ERROR (SyncWorker_5) [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") pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output] Unable to decode request 2023-03-16 17:56:32.138 ERROR (SyncWorker_4) [pymodbus.factory] index out of range 2023-03-16 17:56:32.138 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")

lampi84 commented 1 year ago

This is the users manual for the wifi dongle. https://www.memodo.de/media/pdf/e0/78/1f/zubehoer-sungrow-winet-s-communication-module-quick-installation-guide-en_2c92296d00358ad18a84a5.pdf

lampi84 commented 1 year ago

sungrow2 This view is showing some values i'm getting.

lampi84 commented 1 year ago

sungrow3 I got it working :-) if i have both connected the wifi dongle and the ethernet jack it is working fine. I think the rest of the values will be filled once it has build up some statistics. Many thanks for all your help ;-)

Louisbertelsmann commented 1 year ago

Did you change the IP for modbus to the RJ45 plug on the inverter? The winet s dongle doesn't give out all of the information. It's somewhat limited.

lampi84 commented 1 year ago

Hi. You were all right in using the LAN socket on the inverter. i have now connected all endpoints. The LAN, Wifi Dongle and the ethernet jack at the wifi dongle. Which results in 3 ip adresses. Luckly i was able to figure out which one is the LAN socket IP. I need to leave the Wifi Dongle running as the SunGrow Webportal and so the Android App are receiving their data this way only. Because once i disconnected the Wifi dongle the App showed me that the inverter is disconnected.

Louisbertelsmann commented 1 year ago

If you just disable WiFi it should work. For me it does. You should be able to do that in the local access panel of your browser, so the IP address of the winet dongle and the username is "admin" and the password is "pw8888". You can just disable wifi that way, because having both of them connected can cause trouble. At least it does in other applications, for example in a laptop.