Library to interface Sunsynk Hybrid Inverters
Project description
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 this file and creating a Pull Request if you are successful.
Inverter Model | Battery | Version | User | Port(s) |
---|---|---|---|---|
Sunsynk 3.6kW | Sunsynk SSLB1 | beta/all | @reedy | BMS485 (top left) |
Sunsynk 5.5kW | Hubble AM-2 | beta/all | @kellerza | BMS485 (top left) |
Sunsynk 8.8kW | BSL 8.2 kWH | 0.0.8 | @dirkackerman | RS485 (1 in image below) |
Deye 8kW | Pylontech US3000C | 0.1.3dev | @Kladrie | RS485 (top left) |
Turbo-E 5kW | DIY with JKBMS | 0.1.4 | @agtconf | BMS485 (top left) |
Sunsynk 3.6kW Inverter
Sunsynk 5.5kW Inverter
Tested with: USB-to-RS485 adaptor sourced from Banggood, very similar to this.
NOTE: RJ-45 port marked RS485 (bottom right) does not work.
Sunsynk 8.8kW Inverter
Tested with: USB-to-485 adaptor sourced from Micro Robotics, here
Deye 8kW Inverter
RS485 is the blue line - top left, as with the Sunsynk inverters. Yellow is the CAN-comms with the Pylontech batteries
Turbo-Energy 5kW Inverter
Tested with: USB-to-RS485 adaptor sourced from Aliexpress, very similar to this.
Hardware
The RJ-45 plug on the inverter side is crimped according to T568A. RS485 requires a twisted pair, so works well with CAT5 network cable and the RJ-45 connectors.
RJ45 Pin (inverter side) |
Wire Color (using T568A) |
USB-to-RS485 adaptor |
---|---|---|
1 | Green-White | B/D- |
2 | Green | A/D+ |
3* | Orange-White | GND |
* tested on Sunsynk 8.8kW only
Fault finding
If you fail to get a reply from the inverter, please check the following
(a) Only a single connection to the serial port
Ensure you only have a single addon connected to the serial port. The following can all potentially access the USB port: mbusd, Node RED, the normal and dev addon version.
If you need to have multiple connections to the serial port: ONLY connect mbusd to the serial port. Connect all addons to mbusd (e.g. tcp://192.168.1.x:503 )
(b) Check the Modbus Server ID
Ensure the Modbus server ID (MODBUS_SERVER_ID
config setting) setting matches the configured Modbus SN value of the inverter
View/update the Modbus server ID on your inverter under "Advanced Settings" / "Multi-Inverter"
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
Sunsynk 8.8kW diagram from system32 in this thread
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sunsynk-0.2.0.tar.gz
.
File metadata
- Download URL: sunsynk-0.2.0.tar.gz
- Upload date:
- Size: 20.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 035b4ac7e141f36ce31e0fec9a201206210026d2adaa47b3050c66190a90a83b |
|
MD5 | 26aa86a3f2fdf9451c2a4198c9e2233e |
|
BLAKE2b-256 | 8ffc40ec7a332c556d7190da9651383b29281f08aa8c498f9cebd1e65714f478 |
File details
Details for the file sunsynk-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: sunsynk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 25.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d9c75a18216c07737b8fa80cd3e4c99b3c40e1ab4ea41a4e628ddd19abc5531 |
|
MD5 | 7dff50e4c06b9234f09805ebcc94ab5a |
|
BLAKE2b-256 | 5298e9eb1a39bc6a6f41ef0fbbf5b92775670c7b1d4dac9a8ab88b3f89824e68 |