Home Assistant,  Sunsynk,  Sunsynk Add-on

Sunsynk Add-on

Before starting this you must have

MQTT Broker installed click HERE to see how
Modbus Adapter connected to your inverter, click HERE to see how
Set Modbus on the inverter, click HERE to see how

All this information can also be found HERE and this document may be out of date.

You will need all the above information to hand before proceeding.

In Home-Assistant go to Settings –> Add-ons –> Add-on Store

On the right click the 3 dots and select Repositories

Add the URL below to the repositories.

https://github.com/kellerza/sunsynk

Click Add

Refresh the page and search for Sunsynk

Select (multi)

Click on install

Enable Start on Boot and Watchdog

In Configuration

DRIVER: pymodbus
INVERTERS:
  - SERIAL_NR: "0123456789"
    HA_PREFIX: SS
    MODBUS_ID: 1
    DONGLE_SERIAL_NUMBER: "0"
    PORT: /dev/ttyACM0
SENSOR_DEFINITIONS: single-phase
SENSORS:
  - energy_management
  - power_flow_card
  - pv2_power
SENSORS_FIRST_INVERTER:
  - settings
MANUFACTURER: Sunsynk
READ_ALLOW_GAP: 2
READ_SENSORS_BATCH_SIZE: 20
SCHEDULES:
  - KEY: W
    READ_EVERY: 5
    REPORT_EVERY: 60
    CHANGE_ANY: false
    CHANGE_BY: 80
    CHANGE_PERCENT: 0
NUMBER_ENTITY_MODE: auto
MQTT_HOST: core-mosquitto
MQTT_PORT: 1883
MQTT_USERNAME: mqtt-user
MQTT_PASSWORD: mqtt-password

Optional Sensors: to go in SENSOR: Section
SENSORS:

  • energy_management
  • power_flow_card
  • pv2_power
##########
# Battery
##########
  - battery_temperature
  - battery_voltage
  - battery_SOC
  - battery_power
  - battery_current
  - battery_Charge_Limit_current
  - battery_discharge_limit_current

##########
# Inverter
##########
  - inverter_power
  - inverter_voltage
  - inverter_current
  - inverter_frequency

##########
# Grid
##########
  - grid_frequency
  - grid_power
  - grid_ld_power
  - grid_l2_power
  - grid_voltage
  - grid_current
  - grid_ct_power

#######
# Load
#######
  - load_power
  - load_l1_power
  - load_l2_power
  - load_frequency

#############
# Solar PV 1
#############
  - pv1_power
  - pv1_voltage
  - pv1_current

#############
# Solar PV 2
#############
  - pv2_power
  - pv2_voltage
  - pv2_current

###################
# Power on Outputs
###################
  - aux_power
  - essential_power
  - essential_1_power
  - essential_2_power
  - non-essential_power

#########
# Energy
#########
  - day_active_energy
  - day_battery_charge
  - day_battery_discharge
  - day_grid_import
  - day_grid_export
  - day_load_energy
  - day_pv_energy
  - day_reactive_energy
  - month_grid_energy
  - month_load_energy
  - month_pv_energy
  - total_active_energy
  - total_battery_charge
  - total_battery_discharge
  - total_grid_export
  - total_grid_import
  - total_load_energy
  - total_pv_Energy
  - year_grid_export
  - year_load_energy
  - year_pv_energy

##########
# General
##########
  - rated_power
  - serial
  - device_type
  - fault
  - overall_state
  - sd_status
  - dc_transformer_temperature
  - environment_temperature
  - radiator_temperature
  - grid_connected_status
  - grid_connected
  - date_time

###########
# Settings
###########

  - control_mode
  - grid_charge_enabled
  - generator_input
  - battery_charging_voltage
  - bat1_soc
  - bat1_cycle
  - battery_low_capacity
  - battery_shutdown_capacity
  - battery_restart_capacity
  - battery_shutdown_voltage
  - battery_low_voltage
  - battery_restart_voltage
  - battery_equalization_voltage
  - battery_absorption_voltage
  - battery_float_voltage
  - BATTERY_EQUALIZATION_VOLT
  - BATTERY_ABSORPTION_VOLT
  - BATTERY_FLOAT_VOLT
  - BATTERY_SHUTDOWN_CAP
  - BATTERY_RESTART_CAP
  - BATTERY_LOW_CAP
  - BATTERY_SHUTDOWN_VOLT
  - BATTERY_RESTART_VOLT
  - BATTERY_LOW_VOLT

#################
# System program
#################
  - priority_load
  - load_limit
  - solar_export
  - use_timer
  - prog1_time
  - prog2_time
  - prog3_time
  - prog4_time
  - prog5_time
  - prog6_time
  - PROG_CHARGE_OPTIONS
  - PROG_MODE_OPTIONS
  - prog1_power
  - prog2_power
  - prog3_power
  - prog4_power
  - prog5_power
  - prog6_power
  - prog1_capacity
  - prog2_capacity
  - prog3_capacity
  - prog4_capacity
  - prog5_capacity
  - prog6_capacity
  - prog1_charge
  - prog2_charge
  - prog3_charge
  - prog4_charge
  - prog5_charge
  - prog6_charge
  - prog1_mode
  - prog2_mode
  - prog3_mode
  - prog4_mode
  - prog5_mode
  - prog6_mode
  - prog1_voltage
  - prog2_voltage
  - prog3_voltage
  - prog4_voltage
  - prog5_voltage
  - prog6_voltage

#############
# Inverter settings
#############
  - grid_charge_battery_current
  - battery_max_charge_current
  - battery_max_discharge_current

Once you have configured the Add-on and have the USB to RS485 adapter plugged in you can start the plugin

Now head to the Log Tab and look at the logs

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun sunsynk (no readiness notification)
s6-rc: info: service legacy-services successfully started
16:49:07 INFO    Loading configuration: /data/options.json
16:49:07 INFO    sunsynk library version: 0.6.4
16:49:07 INFO    Schedules:
+-----------+-----+------+--------+-----------+----------+------------+
|    Key    | src | Read | Report | Change by | Change % | Change any |
+-----------+-----+------+--------+-----------+----------+------------+
| date_time |     |  60  |   60   |           |          |    True    |
|     rw    |     |  5   |  300   |           |          |    True    |
|     w     |  *  |  5   |   60   |     80    |          |            |
|    kwh    |     | 300  |  300   |           |          |            |
|  any_unit |     |  15  |  300   |           |          |            |
|  no_unit  |     |  15  |  300   |           |          |    True    |
+-----------+-----+------+--------+-----------+----------+------------+
16:49:07 INFO    Using Single phase sensor definitions.
16:49:07 INFO    Added hidden sensors as other sensors depend on it: Rated power, Serial
16:49:07 INFO    Connecting to /dev/ttyACM0
16:49:07 INFO    PyModbus 3.5.2 Serial: /dev/ttyACM0
16:49:07 INFO    Reading startup sensors Serial, Battery Low Capacity, Prog5 Time, Prog6 Time, Prog4 Time, Prog3 Time, Rated power, Prog2 Time, Prog1 Time

Leave a Reply

Your email address will not be published. Required fields are marked *