Sungrow inverter binding or modbus config

Hi, postig for the first time after reading so much in all the directions. I just got a 6.6KW PV with Sungrow SG5 inverter installed and so far everything i read points to not having any native openab binding for Sungrow invterters. I can see some people have successfully used MODBUS TCP/IP which i have tried but failed miserbaly. So my question is simply. what can i do to get this working? I created a MODBUS TCP bridge object with the IP and and the port of the inverter. then created a thing, tried both single phase inverter binding for MODBUS TCP and Logger binding. both failed.

and here are the exeptions…

O exception: IOException Error reading response (EOF) [operation ID cce316e8-eba3-450e-bf7a-663f79b1f380]
00:13:54.938 [WARN ] [ort.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint [slaveId=1, functionCode=READ_INPUT_DISCRETES, start=0, length=40, maxTries=3]). Will try again soon. Error was I/O error, so resetting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 7e0703f9-5b77-4c76-874f-b491993fbf55]
00:13:56.038 [WARN ] [ort.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint [slaveId=1, functionCode=READ_INPUT_DISCRETES, start=0, length=40, maxTries=3]). Will try again soon. Error was I/O error, so resetting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 7e0703f9-5b77-4c76-874f-b491993fbf55]
00:13:56.104 [ERROR] [ort.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint [slaveId=1, functionCode=READ_INPUT_DISCRETES, start=0, length=40, maxTries=3]). Aborting. Error was I/O error, so resetting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID 7e0703f9-5b77-4c76-874f-b491993fbf55]
00:13:56.619 [WARN ] [ort.modbus.internal.ModbusManagerImpl] - Try 1 out of 3 failed when executing request (ModbusReadRequestBlueprint [slaveId=1, functionCode=READ_INPUT_DISCRETES, start=0, length=40, maxTries=3]). Will try again soon. Error was I/O error, so resetting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID e0a100eb-f707-449d-a63b-3c1507ddf91a]
00:13:57.402 [WARN ] [ort.modbus.internal.ModbusManagerImpl] - Try 2 out of 3 failed when executing request (ModbusReadRequestBlueprint [slaveId=1, functionCode=READ_INPUT_DISCRETES, start=0, length=40, maxTries=3]). Will try again soon. Error was I/O error, so resetting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID e0a100eb-f707-449d-a63b-3c1507ddf91a]
00:13:57.467 [ERROR] [ort.modbus.internal.ModbusManagerImpl] - Last try 3 failed when executing request (ModbusReadRequestBlueprint [slaveId=1, functionCode=READ_INPUT_DISCRETES, start=0, length=40, maxTries=3]). Aborting. Error was I/O error, so resetting the connection. Error details: net.wimpi.modbus.ModbusIOException I/O exception: IOException Error reading response (EOF) [operation ID e0a100eb-f707-449d-a63b-3c1507ddf91a]

You’d have to get the various parameters correct, and we can’t see what you’ve done.
The error logging simply says it didn’t work.

Does your device support the Sunspec protocol? (This is like a dialect of Modbus, used by various solar manufacturers) When available, this can do a lot of the configuring work for you.

Have you checked the manual ? I cannot find any mobus support for those models. Can you pinpoint the manual with the registers ?

Quite a bit of Sungrow chatter here, suggesting Sungrow/Modbus is not easy but can be done.
https://forums.whirlpool.net.au/archive/2560277
From a quick skim, its TCP interface is non-standard and encrypted, this won’t work with openHAB. That may be dependent on the exact model.

I have an oldish (2019) manual for SG inverters suggesting they only know about RS485 serial communications i.e. Modbus/RTU but not Modbus/TCP.
They may or may not have added TCP later, too. Check if you can read an uint32 register 5017 that would be the current DC power.

Hi Pros of OpenHab. thanks for response. i am Australia so slow to respond.
Yes, i created a MODBUS TCP bridge to the IP:Port of the Inverter’s WIFI dongle which gives access to the inverters data (or supposed to). then created a "Single Phase Inverter (Sunspec) "thing using that bridge. but no avail. ends up having communication error. I noticed the same when using a generic or basic Modbus client as well. communications error. i am trying to locate more information on this but so far it looks like very restricted. However came across a native binding in HomeAssistant for Sungrow inverters, so far i am not sure if that is still working.

I will try that, I have a WIFI dongle on it and as far as i have read, it supports Modbud TCP (not sure with RSU), i will try to make this work using a generic modbus client app and see where that ends up. thanks and will get back on my experiment,

interestingly, there used to be, as far as i have read so far it seems to have support for Modbus TCP but encrypted. and someone did manage to write a piece to code to get that working in python, i will try that out if that is still the case and put my findings here.

Here is something someone worked out for Sungrow.

i will test that out, but the code and all that would be meaningless to me as i am not much into that. Would like to have your review, I can surely test out as I have the SG inverter with latest FW on it.

This is the latest i have been able to find so far – protocol doc

I can confirm the meltaxa/solariot script posted above worked with SunGrow inverters. I was able to get the values written to Json. May be that can be intergated as is. there is also a direct intergation in HomeAssistant available using that script which users have confimed works out of the box for SG inverters using Modbus TCP.

You should have given those details upfront.
Sungrow does not support Sunspec yet AFAIK.

Can the solution by meltaxa i posted above be converted into a binding, i can see it has registers for many SG inverters already built in and I can confirm works with modbus tcp.

unfortunately the link i posted above got hidden due to community rule. all i can say is that you can search for it on google meltaxa solariot sungrow and you will get to the git repo

Afraik the guy that did solariot says

Solariot is designed to allow any Modbus TCP enabled inverter to be queried using a Modbus register map
the devil is in the detail enabled inveter get it ? what you need is find out how to enable the modbus tcp in your inverter

Now maybe this will help i see that loxone can comunicate with it so maybe it helps but i dont see sg5 ?
https://library.loxone.com/detail/sungrow-hybrid-inverter-923/overview

or maybe this
http://www.photovoltaicsolar.in/Sungrow_Manual/Modbus%20RS485%20RTU%20Protocol.pdf

otherwise if you have time read this post maybe it will give you some hints
https://community.openhab.org/t/modbus-newbie-questions/103938

Hi @stamate_viorel, i mentioned above that with the solariot i was able to connect to SG inverter and extract data via modbus tcp. which means the solution is sound. and i also noticed the developer has already provided register mappings for many of SG’s inverters.

Hi gurus, any interest in converting what i posted above to a binding for Sungrow inverters, would be nice to have a native solution instead of first using solariot and pass data to mqtt and then create things.

No interest?

You need to sell it better :). I guess if this brand was very common then a binding was already developed. There are alot of things out there that dont even have what you have as a solution so either wait until someone skilled enough comes along that buy it and want it or keep what you have but asking for it will not help maybe try to start yourself one even if it doesnt work very well and post your progress that will fire some interest.

Hmm, thanks for the response. I like OH. Home Assistant has this integrations and will check that out. may be SG inverters not much of an interest to OH users at the moment. Unfortunately i am not a developer or have that skill and time at the moment.