Sungrow SH10.RT Modbus integration

Hi

Thanks for the good config!

Iā€™ve managed to get this config up, however the on/off sensors are not working for me either, has anyone find a solution for this?

Iā€™ve also a question regarding to charge the battery. I want to specify a certain time to charge the battery from the grid (depending on price of electricity), how do I force the system via HA to charge the battery from the grid?

Thanks

Managed to get the on/off sensors working. Connected directly to the inverter solved the problem.

Hi @mkai,

is there a way to configure a second inverter in this integration?

Thanks
Basti

1 Like

Hey @mkai,
The SH10RT has a DO relay that is a part of its load control, did you see it in your modbus scan? as I canā€™t see it anywhere. I also donā€™t seem to be able to scan my inverter with any modbus tool but your integration works and gets data so it must be working.

Hello, Thank you for your work. I have an SH10RT. I can access it via LAN-Interface as ā€œUserā€ and as ā€œAdminā€. But the integration isā€™nt delivering any value.

I have triple-checked the ip-address, modbus-port and slave-settings.

How can I troubleshoot it?

Best regards
Ekkehard

There was an issue on github for that. Unfortunately the thread starter did not share his processings. Feel free to re-open it :slight_smile:

@ [CodeRed]
Best to check the github page (especially the issues) for that.

I would start updating to the current firmware. Next step is to ensure, that you are using the SH10.RTā€™s native LAN port, NOT the LAN port of the dongle.

Then use some modbus TCP tool (search: modbus tool, windows / linux) to check the address and slave port.

1 Like

Thanks for your answer.
I have implemented the second inverter independently in the same way :+1:
It works perfect.

Greets
Basti

@mkai Thank you for the great work. Importing data from inverter (SH10RTV112) worked like a charme.
Saved me a lot of time and work :+1:

Only thing I would suggest for future users: Maybe you could add a hint to use the local LAN Port. Not the WiNet port. Also with current firmware the WiNet port has not all ModbusTCP capabilities. Some registers arenā€™t available. Even some are erroneous. E.g. grid frequency has divisor 0.01 and not 0.1 as documented.

thanks for the feedback - I added some more lines regarding the not supported WiNet port :slight_smile:

Thats great. Will help new users in the future to get the right start.

I have some question about sensor definitions:

  • Have you tried a shorter scanning interval fore some registers. Are there some experiences?
  • Why did you define the template sensors to be positive or negative depending of inverter state (e.g. sg_battery_charging_power). For this sensor comment tells it will be 0 when discharging. Maybe I am missing something?

Have you tried a shorter scanning interval fore some registers. Are there some experiences?

currently I hard-coded the modbus scan_intervals:

  • 10s for power / voltage and current values
  • 60s for battery parameters, which can be set via GUI
  • 600s for values that donā€™t change frequently, e.g. serial number (should in fact never change), but also energy values (total daily generation)

the values can be decreased, but I donā€™t see a good benefit to poll the power values faster than every 10seconds.
Do you see some benefits for - lets say 5s?

  • Why did you define the template sensors to be positive or negative depending of inverter state (e.g. sg_battery_charging_power). For this sensor comment tells it will be 0 when discharging. Maybe I am missing something?

I recently changed the behaviours for these values:

  • ā€œBattery Charging Powerā€ # positive value if charging else zero
  • ā€œBattery Discharging Powerā€ # positive value if discharging else zero

they could be negative before, but that confused me sometimes

I have to admit, that several decisions are more or less random. But I am very open for disussions and change requests ! :slight_smile:

I think the most intervals are perfect. Maybe I will try if I would like shorter intervals for power sensors. Maybe its because everything is new. And so I look very often in my dashboard.

I have seen this also for my backup power sensors. They also sometimes have negative values. Likely a random measurement error when no load is applied.

My questions are only for understanding and to get some background.
Your work is a perfect point to start with integration of Sungrow inverters into HA. The idea to create a package is a very good idea. And easy to use.
I think own adjustments and optimizations are left to each individually.

Hi and thanks for this nice tool. I really like it and can skip solaranzeige and such tools now. In combination with water and gasmeter I have a very nice summary over consumption and gain. Two things maybe: I own a SH8.0RT which is recognized by solaranzeige using the very same id code as in your yaml. However, I see just ā€œunknown device codeā€. Any idea, what is going wrong? I also use eth connection on the dedicated LAN port and everything else is working fine. And one other thing might be easily achievable: I would like to see power consumption for all 3 phases as stacked plot. would that be an improvement also for other users? Thanks for considering and also for the nice work so far.

strangeā€¦

can you give me the exact value from the device type code sensor??

e.g. type this in the template editor under ā€œdevelopmentā€:

{{ states('sensor.sungrow_device_type_code') }}

Hi, the return value is 3598. If I convert it to Hex it is 0E0E.

the 0x0E0E code is not in the (probably outdated) modbus register description I have from sungrow.

So I assume that there is a newer revision of the SH8.RT (SH10.RT was updated a few months ago):

 {% elif ((states('sensor.sungrow_device_type_code') | int(default=0)) == 0x0E0F) %}
          SH10RT-V112

I will add the device code 0x0E0E. Any idea how it should be exactly called?

 {% elif ((states('sensor.sungrow_device_type_code') | int(default=0)) == 0x0E0X) %}
          SH8.0RT-v2

?

I see. iSolarcloud reports: Modellbezeichnung: SH8.0RT-V112, I guess same thing as with the SH10RT. Thanks for looking.

thank you for the input. Just committed an update including the new device type code

1 Like

Thanks for the update. Device code works now as expected, however, I have an issue with exported power now. This is stated as not available. Is this entity deprecated now or is something wrong with my configuration?