Skip to main content

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

codecov

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.

HASS Energy management

Add-On Installation

  1. Add the repository to your HA Supervisor
    Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled. https://github.com/kellerza/sunsynk

  2. 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:

Deployment Option

If the Inverter is far from the server/SBC running Home Assistant, you have several ways to extend the deployment:

  1. 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)

    Deployment Option MQTT

  2. 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)

    Deployment Option Gateway

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 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)

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

image

Tested with: USB-to-485 adaptor sourced from Micro Robotics, here

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sunsynk-0.1.2.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

sunsynk-0.1.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file sunsynk-0.1.2.tar.gz.

File metadata

  • Download URL: sunsynk-0.1.2.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for sunsynk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 da2c38e8d86b22a9eefb4609f00bd0959ad6c35357d6e724c61f8678e5df4dc6
MD5 c2fb6f4e21dd825510e0956f21af7c8f
BLAKE2b-256 cc097f62040478a3220ad30c54972d381fa1b88e59fcb43857ba9317959fa6ba

See more details on using hashes here.

File details

Details for the file sunsynk-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sunsynk-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for sunsynk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2f0f583fe8d3a172f91c8970bed0d6a9111b7146fb82b60670c5589f73e3d0b8
MD5 2c7e5b150f90a07031600303ca41c593
BLAKE2b-256 71c3deac3dba9a423c035253f706a6a29e6e4ca6ce3c3e3669915b65e4a73891

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page