This is a Home Assistant sensor component to support retrieving data from Sungrow Residential inverters using modbus tcp.
A python module has also been created for the purpose of providing access to the registers within the sungrow inverters, and will be developed further as time permits. It is available at https://pypi.org/project/SungrowInverter/ and in current form supports hybrid and string inverters however this integration only supports hybrid for the moment, see below for supported hybrid inverters.
Your inverter will need a network connection, so either an ethernet connection or wifi dongle; this solution does not support rs485 modbus.
Use at your own risk.
I consider this in ALPHA state and there will be further changes, not all sensors are available yet there is a bit of work still required. There should be enough to get the Home-Assistant energy configuration filled in for grid, and solar and battery usage however.
This plugin has been tested with a Sungrow SH5K-v13 Hybrid Inverter with a LG Chem 6.5kWh battery, and is the only testing that i've been able to perform so far, the same modbus registers are used across the Residntial Hybrid inverter range so should work with out issue.
I added the ability to use a Sungrow Residential String Inverters as well BUT I have not been able to test these registers other than refer to the modbus maps in a public sungrow modbus map docs @ python module https://github.com/mvandersteen/SungrowInverter/tree/main/docs; these pdf have been teh main source of reference and also the solariot project @ https://github.com/meltaxa/solariot (a big shout out to @meltaxa for that work)
All the SGxx type inverters can be supported as well but i have not set the sensors up to be read from those yet, will get to that soon once my own inverter is working correctly.
Residential Hybrid Single Phase Inverter for Low Voltage Battery [48V to 70V]
SH3K6 / SH4K6 / SH5K-V13 / SH5K-20 / SH4K6-30 / SH5K-30 / SH3K6-30
Residential Hybrid Single Phase Inverter wide battery voltage range [80V to 460V]
SH3.6RS / SH4.6RS / SH5.0RS / SH6.0RS
Residential Hybrid Three Phase Inverter wide battery voltage range [80V to 460V]
SH5.0RT / SH6.0RT / SH8.0RT / SH10RT
Copy the files in ~/custom_components/sungrow files into to there own sungrow directory within custom_components; where the configuration for your installation of home assistant sits.
The custom_components directory does not exist in default installation state and may need to be created.
<homeassistant-user-configuration-directory>/custom_components/sungrow/sensor.py
<homeassistant-user-configuration-directory>/custom_components/sungrow/const.py
<homeassistant-user-configuration-directory>/custom_components/sungrow/__init__.py
<homeassistant-user-configuration-directory>/custom_components/sungrow/manifest.py
# Example configuration.yaml entry
sensor:
- platform: sungrow
ip_address: 192.168.1.127
Configuration variables: