Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sungrow SG10RT inverter modbus #49

Open
rark-ha opened this issue Jul 4, 2021 · 10 comments
Open

Sungrow SG10RT inverter modbus #49

rark-ha opened this issue Jul 4, 2021 · 10 comments

Comments

@rark-ha
Copy link
Contributor

rark-ha commented Jul 4, 2021

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
Copy link
Contributor Author

rark-ha commented Jul 6, 2021

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.

@STL2020
Copy link

STL2020 commented Jul 6, 2021

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
Copy link

STL2020 commented Jul 6, 2021

The same Problem with modbus TCP .No connect

@rark-ha
Copy link
Contributor Author

rark-ha commented Jul 7, 2021

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.

@bohdan-s
Copy link
Contributor

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
Copy link
Contributor

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

@meltaxa
Copy link
Owner

meltaxa commented Sep 26, 2021

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

@freman
Copy link

freman commented Oct 15, 2021

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

@bohdan-s
Copy link
Contributor

@freman
Copy link

freman commented Oct 18, 2021

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants