solariot icon indicating copy to clipboard operation
solariot copied to clipboard

Sungrow SG10RT inverter modbus

Open rark-ha opened this issue 3 years ago • 10 comments

Hi. I've recently installed a SG10RT inverter (3 Phase) and trying to work out the modbus setup.

If I use the model = "sungrow-sg5kd" I can get most of the readings, except "power consumption" and "energy consumption".

(sungrow-sh5k modbus fails to connect at all).

Can someone point me in the right direction to set up a modbus file that collects the power and energy info to?

rark-ha avatar Jul 04 '21 01:07 rark-ha

I can scrape the 5000-5100 range and the 7000-7100 (though not much there) using function 04. I can't get the 13000-13100 range to scrape with function 04 as it says illegal data address.

sungrow-sh5k pulls the values I'm still missing from 13000 range and nothing in the 5000 range appears to be it.

rark-ha avatar Jul 06 '21 04:07 rark-ha

2021-07-06 10:29:39 stdout pymodbus.exceptions.ConnectionException: Modbus Error: [Connection] ModbusTcpClient(192.168.2.93:502): Connection unexpectedly closed 1.477375 seconds into read of 25 bytes without response from unit before it closed connection
2021-07-06 10:29:39 stdout raise ConnectionException(msg)
2021-07-06 10:29:39 stdout File "/usr/local/lib/python3.9/site-packages/pymodbus/client/sync.py", line 343, in _handle_abrupt_socket_close
2021-07-06 10:29:39 stdout return self._handle_abrupt_socket_close(
2021-07-06 10:29:39 stdout File "/usr/local/lib/python3.9/site-packages/pymodbus/client/sync.py", line 298, in _recv
2021-07-06 10:29:39 stdout self._key_packet = self._recv(25)
2021-07-06 10:29:39 stdout File "/usr/local/lib/python3.9/site-packages/SungrowModbusTcpClient/SungrowModbusTcpClient.py", line 40, in _getkey
2021-07-06 10:29:39 stdout self._getkey()
2021-07-06 10:29:39 stdout File "/usr/local/lib/python3.9/site-packages/SungrowModbusTcpClient/SungrowModbusTcpClient.py", line 54, in connect
2021-07-06 10:29:39 stdout client.connect()
2021-07-06 10:29:39 stdout File "/solariot/solariot.py", line 108, in 
2021-07-06 10:29:39 stdout Traceback (most recent call last):
2021-07-06 10:29:38 stdout INFO:root:Connecting
2021-07-06 10:29:38 stdout INFO:root:Creating SungrowModbusTcpClient
2021-07-06 10:29:38 stdout INFO:root:Loaded config sungrow-sg5kd

STL2020 avatar Jul 06 '21 10:07 STL2020

The same Problem with modbus TCP .No connect

STL2020 avatar Jul 06 '21 10:07 STL2020

Further investigation from the WiNet WiFi module local web output shows real time data and also has a read back function for the modbus data (but only in hexadecimal).

(Note for others - PLC Addresses needed if you're scanning Modbus for analysis otherwise you're out by 1).

5003 daily_power_yield_0.01 5004 total_power_yield_100 5006 #NEW Total On-Grid Running Time (hrs) 5008 internal_temp_10 5009 #NEW Apparent Power_0.001 (kVa) 5011 pv1_voltage_10 (called MPPT1 Voltage in web interface) 5012 pv1_current_10 (called MPPT1 Current in web interface) 5013 pv2_voltage_10 (called MPPT2 Voltage in web interface) 5014 pv2_current_10 (called MPPT2 Current in web interface) 5017 total_pv_power 5019 #NEW Phase A Voltage_0.1 5020 #NEW Phase B Voltage_0.1 5021 #NEW Phase C Voltage_0.1 5022 #NEW Phase A Current_0.1 5023 #NEW Phase B Current_0.1 5024 #NEW Phase C Current_0.1 5031 total_active_power 5036 grid_frequency_10 5071 #NEW Array Insulation Resistance_10 (Kohms)

5216 export_power_overflow 5217 export_power_indicator 5218 power_meter

Still trying to identify;

  • daily_purchased_energy_10
  • daily_energy_consumption_0.01
  • total_energy_consumption_10

I've mapped a heap of Modbus registers through to InfluxDB to help graph the readings over time but these last 3 still elude me. They might sit outside the 5000-5300 range.

rark-ha avatar Jul 07 '21 08:07 rark-ha

Hi, I have the official modbus map from Sungrow. I dont want to post it here, but can send you a copy if you want.

bohdan-s avatar Sep 26 '21 03:09 bohdan-s

daily_purchased_energy_10 = "Daily import energy"? 5097~5098 U32
daily_energy_consumption_0.01 = "Daily direct energy consumption"? 5101~5102 U32
total_energy_consumption_10 = "Total direct energy consumption"? 5103~5104 U32

bohdan-s avatar Sep 26 '21 03:09 bohdan-s

Hi @bohdan-s. See my Github bio for my contact details to send me a copy. Cheers!

meltaxa avatar Sep 26 '21 23:09 meltaxa

Hi @bohdan-s, I also would be super interested if I may have a copy? I'm trying to get the Sungrow to work along side my Fronius (fronius is doing the solar, sungrow is doing the battery) and I'm really just trying to fill in the blanks

freman avatar Oct 15 '21 06:10 freman

@bohdan-s no worries, and thanks. this time was used figuring out modbus, how it works, and what it means. I've learned a lot so now I can actually use this knowledge :D

I actually had an older version of that document.

freman avatar Oct 18 '21 06:10 freman