Sunsynk Inverters
This repo enables access to Sunsynk Hybrid Inverter through a Python 3 library. It also provides an Add-On that can be installed in the Home Assistant OS.
See https://www.sunsynk.org/ for more information on Sunsynk inverters.
This code was developed on a Sunsynk 5.5 kWh
DISCLAIMER: Use at your own risk! Especially when writing any settings.
Sunsynk Python Library
The Python library is available through pip:
pip install sunsynk
Home Assistant Sunsynk Add-On
For the Add-On you require Home Assistant OS and a RS-485 adaptor to connect to your Sunsynk inverter. Sensors are read using the Modbus protocol and sent to a MQTT server. Below an example of the HomeAssistant Energy management dashboard using sensors from the Sunsynk.
Add-On Installation
- Add the repository to your HA Supervisor
https://github.com/kellerza/sunsynk
- Install the Sunsynk Add-On from the Add-On Store and configure through the UI
Add-on Deployment
The Sunsynk Add-on runs on the Home Assistant OS, reads the Inverter's Modbus registers over RS-485, and publishes sensor values to the MQTT server. The architecture is shown below:
If the Inverter is far from the server/SBC running Home Assistant, you have several ways to extend the deployment:
-
The preferred remote option is to use MQTT over your home network toward the main MQTT server (typically on the same server as Home Assistant)
-
Another option is to use a Modbus TCP to RTU/serial gateway. This can be another Raspberry Pi, even an old one, running the gateway software, like mbusd.
You can also use a commercial Modbus gateway, like the USR-W630 (reported via Powerforum)
Tested Inverters
There are several inverters that are rebranded Deye inverters, so you might have success with other inverter brands as well, please add your inverter by editing tis file and creating a Pull Request if you have success
Inverter Model | Battery | Version | User |
---|---|---|---|
Sunsynk 5.5kW | Hubble AM-2 | beta/all | @kellerza |
Hardware
I used a RS485 adaptor sourced from Banggood, very similar to this
Mine is wired to the Sunsynk BMS 485 port (top left). I also have a RS485 port (bottom right) but this did not work.
The wiring and Ethernet color code to an RJ-45 plug crimped according to TI-568A. RJ45 requires a twisted pair, but you can use either TI-568A or TI-568B
RJ45 Pin | RS485 adaptor | Color (568A) |
---|---|---|
1 | B/D- | Green-White |
2 | A/D+ | Green |
Credits
Information in the Power forum was especially helpful to get this up and running, see this thread
Special Kudos to Bloubul7, @jacauc and Sc00bs
The original Node-RED flows can be found on @jacauc's repo here