Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

My Sunsynk 8Kw & data collection setup

Featured Replies

4 hours ago, lun123 said:

no the sensor does not show up there. 

No template sensors are shown, only the original "Master" and "Slave" entities

Is there something i can do to show these sensors? 

image.thumb.png.dd132a1c7bcc9711edc29e6ef6935999.png

Try adding:

state_class: total_increasing

to your template sensor i.e.

#  sensor.sunsynk_total_pv_energy
      sunsynk_total_pv_energy:    
        friendly_name: Sunsynk Total PV Energy
        value_template: "{{ states('sensor.master_master_total_pv_energy') | float + states('sensor.sunsynk1_slave_total_pv_energy') | float }}"  
        unit_of_measurement: "kWh"
        device_class: energy_storage
        state_class: total_increasing

 

  • Replies 657
  • Views 178k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • If you want to try this card in home assistant follow these steps. 1. Create a new directory under www/community/ and name it sunsynk-card. If you don't have HACS installed you can create directo

  • Hi all. Here is my version to get Sunsynk 8.8 Modbus metrics in Home Assistant: Required Hardware: ESP32 Development Board @R149.95 https://www.diyelectronics.co.za/store/espressif-iot/1495-

  • Thought I would also contribute with something small. Not as impressive as what some of the others here but a contribution nonetheless. The GUI for Sunsynk System Mode, or lack thereof, has reall

Posted Images

Hi, 
I'm not sure if any of you have already checked this but I'm interested in the difference between the consumption displayed by the app (solarmann) and EspHome (# 084 Day Load Energy).

Example from yesterday # 084 Day Load Energy

 image.png.25420579c1c90b440f95a9cbd0fc7779.png

 

 

Solarmann application: 

image.png.4749d3634aae816a5ba237d76f0b853a.png

Example from today:

image.png.112ac9f8d8fcd8678cfd3e4f10094f50.png

Solarmann application: 

 

image.png.3e951d3e3305d2cbd55833f4c38fc578.png

A small update to this topic. I managed to solve the problem and I have the same results as in the orginal application. 

I added the code to ESPHOME:

 

############################################### Day Energy Consumption TOTAL ###########################################

  - platform: template        # Sum of Day Load Energy and Day Grid Import and Day Battery Discharge to get total Day Energy Consumption
    name: "${friendly_name} Day Energy Consumption"
    unit_of_measurement: "kWh"
    accuracy_decimals: 2
    device_class: energy
    state_class: total_increasing
    lambda: |-
      return (id(sunsynk_esphome_day_load_energy).state + id(sunsynk_esphome_day_grid_import).state + id(sunsynk_esphome_day_battery_discharge).state);
    update_interval: 5s

 

Edited by Dariusz
UPDATE

On 2023/09/01 at 9:01 PM, lun123 said:

It has been running like this for days now and there is no if shown on the solar. , 

The issue I have with the template sensor created for "sensor.sunsynk_total_day pv" is that it does not read the state. State is shown as undefined.  the other sensors read correctly, however this is info taken either form the master or the slave inverter. As soon as I create ethe combines sensor template, I get the same result. 

 

image.png.dc83c9c30489fba48963c32b33d4ae26.png

Hi, 

Did you manage to solve this problem? I don't know where the problem is but some sensors are not displayed correctly.

 

Problem solved. As someone mentioned earlier it should be added:

 state_class: total_increasing

 

Edited by Dariusz

 

Hi @slipx
I have a three phase hybrid inverter Deye SUN-10K-SG04LP3 with battery pack.
Will your yaml work with my inverter?

Hi. The registers for the 3 phase are different so it wont work without some modification. There is an example to get you started on the github but I have not tested this 

https://github.com/slipx06/Sunsynk-Home-Assistant-Dash/blob/main/DEY12k-modbus.yaml

 

  • Author
 

Hi @slipx
I have a three phase hybrid inverter Deye SUN-10K-SG04LP3 with battery pack.
Will your yaml work with my inverter?

If you use the 3-phase Yaml file you should be pretty good.

They both use the same Modbus Registry document with the difference between the single phase and 3-phase inverters being when it comes to the values ones concerning the 3-phases of incoming and outgoing power. Otherwise the registers are pretty much the same.

Attached is the Modbus Registry file I have

sunsynk_modbus - no chinese (1).pdf

 

If you use the 3-phase Yaml file you should be pretty good.

They both use the same Modbus Registry document with the difference between the single phase and 3-phase inverters being when it comes to the values ones concerning the 3-phases of incoming and outgoing power. Otherwise the registers are pretty much the same.

Attached is the Modbus Registry file I have

sunsynk_modbus - no chinese (1).pdf 309.74 kB · 

@Sc00bs I'll check soon. Thx

Does anyone know how to convert the Modbus register values for the MCU and COMM firmware to the actual values?

These are registers 13 and 14 and my results when reading these are:

MCU/13      6.0.2.4       Register Value: 24612

COMM/14   E.4.2.6       Register Value: -7130

The register document does not seem to give any indication of how to do this.

Thanks

Mark

Edited by MarkvG

 

Does anyone know how to convert the Modbus register values for the MCU and COMM firmware to the actual values?

These are registers 13 and 14 and my results when reading these are:

MCU/13      6.0.2.4       Register Value: 24612

COMM/14   E.4.2.6       Register Value: -7130

The resister document doe snot seem to give any indication of how to do this.

Thanks

Mark

Hex is your friend...

 

Hex is your friend...

Thank you. I had tried that, but still not getting to expected result. Any further hints would be appreciated. Thanks

 

Thank you. I had tried that, but still not getting to expected result. Any further hints would be appreciated. Thanks

Use the raw register values and not the twos-complement. So not the negative number.

Since 24612 is a smaller number it's pretty straight forward. 0x6024

Thanks for the continued development and improvement, Johan @kellerza!

This might be nothing, but I'm getting the following in my log. Any thoughts on why the "Unknown sensor specified" messages appear? Prolly a noob question, so apologies in advance! 

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
17:48:06 INFO    Loading configuration: /data/options.json
17:48:06 INFO    sunsynk library version: 0.6.4
17:48:06 INFO    Schedules:
+-----------+-----+------+--------+-----------+----------+------------+
|    Key    | src | Read | Report | Change by | Change % | Change any |
+-----------+-----+------+--------+-----------+----------+------------+
| date_time |     |  60  |   60   |           |          |    True    |
|     rw    |     |  5   |  300   |           |          |    True    |
|     w     |  *  |  15  |   60   |     80    |          |            |
|    kwh    |     | 300  |  300   |           |          |            |
|  any_unit |     |  15  |  300   |           |          |            |
|  no_unit  |     |  15  |  300   |           |          |    True    |
+-----------+-----+------+--------+-----------+----------+------------+
17:48:06 INFO    Using three phase sensor definitions.
17:48:06 ERROR   Unknown sensor specified: aux_power
17:48:06 ERROR   Unknown sensor specified: essential_power
17:48:06 ERROR   Unknown sensor specified: grid_connected
17:48:06 ERROR   Unknown sensor specified: inverter_current
17:48:06 ERROR   Unknown sensor specified: load_frequency
17:48:06 ERROR   Unknown sensor specified: non_essential_power

@kellerza
My log with Deye 10k, three phase:
 

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

18:01:55 INFO    Loading configuration: /data/options.json

18:01:55 INFO    sunsynk library version: 0.6.4

18:01:55 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    |

+-----------+-----+------+--------+-----------+----------+------------+

18:01:55 INFO    Using three phase sensor definitions.

 

18:01:55 ERROR   Unknown sensor specified: aux_power

18:01:55 ERROR   Unknown sensor specified: essential_power

18:01:55 ERROR   Unknown sensor specified: grid_connected

18:01:55 ERROR   Unknown sensor specified: inverter_current

18:01:55 ERROR   Unknown sensor specified: load_frequency

18:01:55 ERROR   Unknown sensor specified: non_essential_power

18:01:55 INFO    Added hidden sensors as other sensors depend on it: Rated power, Serial

18:01:55 INFO    Connecting to tcp://192.168.1.167:8899

18:01:56 INFO    Reading startup sensors Prog1 Time, Prog6 Time, Battery Low Capacity, Prog2 Time, Prog3 Time, Prog5 Time, Serial, Prog4 Time, Rated power

18:01:57 INFO    ############################################################

18:01:57 INFO                 Inverter serial number '****6152'

18:01:57 INFO    ############################################################

 

18:01:57 INFO    MQTT: Connecting to homeassistant@core-mosquitto:1883

18:01:57 INFO    MQTT: Connection successful

18:01:58 INFO    Read every (inverter 1)

+-----+----------------------------------------------------------------------------------+

|  s  |                                     Sensors                                      |

+-----+----------------------------------------------------------------------------------+

|  5  |  prog1_capacity, prog1_charge, prog5_charge, prog6_time, use_timer, grid_power,  |

|     |       prog3_capacity, grid_ct_power, prog2_charge, prog4_time, pv1_power,        |

|     |   prog4_charge, prog1_time, battery_low_capacity, prog2_time, prog6_capacity,    |

|     |       battery_power, prog3_power, prog6_charge, pv2_power, prog2_capacity,       |

|     | prog1_power, prog5_power, prog2_power, priority_load, prog3_time, prog3_charge,  |

|     |      prog5_capacity, prog5_time, prog4_capacity, prog6_power, prog4_power,       |

|     |                            load_limit, inverter_power                            |

 

|  15 |    battery_current, grid_frequency, overall_state, pv1_current, grid_voltage,    |

|     |                    battery_voltage, pv1_voltage, battery_soc                     |

| 300 |      day_load_energy, day_grid_export, day_grid_import, day_battery_charge,      |

|     | day_pv_energy, total_grid_export, total_battery_discharge, total_battery_charge, |

|     |            total_pv_energy, total_grid_import, day_battery_discharge             |

+-----+----------------------------------------------------------------------------------+

18:01:58 INFO    Report every (inverter 1)

+-----+---------------------------------------------------------------------------------+

|  s  |                                     Sensors                                     |

+-----+---------------------------------------------------------------------------------+

|  60 |  battery_power, grid_power, pv2_power, grid_ct_power, pv1_power, inverter_power |

| 300 |    day_grid_export, pv1_current, prog1_capacity, prog1_charge, prog5_charge,    |

|     |   prog6_time, battery_current, day_grid_import, use_timer, total_grid_export,   |

|     |  prog3_capacity, total_battery_charge, grid_voltage, prog2_charge, prog4_time,  |

|     | pv1_voltage, battery_soc, day_battery_discharge, prog4_charge, day_load_energy, |

|     |      prog1_time, grid_frequency, overall_state, prog2_time, prog6_capacity,     |

|     | day_pv_energy, battery_low_capacity, prog3_power, prog6_charge, prog2_capacity, |

|     |     total_pv_energy, prog1_power, prog5_power, battery_voltage, prog2_power,    |

|     |   priority_load, prog3_time, prog3_charge, prog5_capacity, day_battery_charge,  |

|     |  prog5_time, prog4_capacity, total_battery_discharge, prog4_power, prog6_power, |

|     |                          total_grid_import, load_limit                          |

+-----+---------------------------------------------------------------------------------+

18:02:10 INFO    Frame error retry attempt(0): V5 frame contains invalid sequence number

18:02:12 INFO    Frame error retry attempt(1): V5 frame contains invalid sequence number

 

18:02:40 INFO    Frame error retry attempt(0): V5 frame contains invalid sequence number

18:03:10 INFO    Frame error retry attempt(0): V5 frame contains invalid sequence number

18:03:12 INFO    Frame error retry attempt(1): V5 frame contains invalid sequence number

18:03:40 INFO    Frame error retry attempt(0): V5 frame contains invalid sequence number

18:04:10 INFO    Frame error retry attempt(0): V5 frame contains invalid sequence number

18:04:12 INFO    Frame error retry attempt(1): V5 frame contains invalid sequence number

 

I also get the frame errors:

17:55:59 INFO    Frame error retry attempt(0): V5 frame contains invalid sequence number
17:56:01 ERROR   OSError in read_deye: timeout reading 1 registers from 117 poll_need_to_read
18:01:58 INFO    Frame error retry attempt(0): V5 frame contains invalid sequence number
18:07:12 ERROR   OSError in read_deye: timeout reading 1 registers from 117; timeout reading 37 registers from 141 poll_need_to_read
18:07:13 ERROR   Error retry attempt(0): Connection already closed
18:14:05 INFO    Frame error retry attempt(0): V5 frame contains invalid sequence number
18:15:00 ERROR   (1 in 5 min) OSError in read_deye: timeout reading 1 registers from 117 poll_need_to_read
18:15:01 INFO    Frame error retry attempt(0): V5 frame contains invalid sequence number
 

Thanks for the continued development and improvement, Johan @kellerza!

Thanks, glad you find it useful!

 

 

17:48:06 INFO    Using three phase sensor definitions.
17:48:06 ERROR   Unknown sensor specified: aux_power
17:48:06 ERROR   Unknown sensor specified: essential_power
17:48:06 ERROR   Unknown sensor specified: grid_connected
17:48:06 ERROR   Unknown sensor specified: inverter_current
17:48:06 ERROR   Unknown sensor specified: load_frequency
17:48:06 ERROR   Unknown sensor specified: non_essential_power

Since you use sensor groups in your config (power_flow_card) https://kellerza.github.io/sunsynk/reference/definitions#power-flow-card-power-flow-card it includes several sensors. It seems like the names of the three-phase sensors do not match exactly, or these are not present in the three-phase inverter definition.

 

 

18:04:12 INFO    Frame error retry attempt(1): V5 frame contains invalid sequence number

 

 

 

I also get the frame errors:

17:55:59 INFO    Frame error retry attempt(0): V5 frame contains invalid sequence number
17:56:01 ERROR   OSError in read_deye: timeout reading 1 registers from 117 poll_need_to_read
18:01:58 INFO    Frame error retry attempt(0): V5 frame contains invalid sequence number
18:07:12 ERROR   OSError in read_deye: timeout reading 1 registers from 117; timeout reading 37 registers from 141 poll_need_to_read
18:07:13 ERROR   Error retry attempt(0): Connection already closed
18:14:05 INFO    Frame error retry attempt(0): V5 frame contains invalid sequence number
18:15:00 ERROR   (1 in 5 min) OSError in read_deye: timeout reading 1 registers from 117 poll_need_to_read
18:15:01 INFO    Frame error retry attempt(0): V5 frame contains invalid sequence number

Apparently the solarman dongle is quite temperamental. There is some improvement (using native errors correction) in the edge addon. I've also asked the pysolman authors what they recommend to make this more reliable.

Probably best to open an issue, as its easier to track on Github than in a forum.

 

  • Newbie
    •  

Does anyone have a solution to this weird problem? We have a SOLARMAN app running for a few years without any issues. Now it reports the daily energy use, but the curves disappear the next day. So only shows the current day curves. 
 

The data is being collected and stored and I can download it to Excel. 
 

But we can’t see the history on the main page. 
 

We have tried everything. Deleting the account, reloading. Etc. 

The other 250 SOLARMAN apps we have installed work fine. 
 

In desperation, about to change to Sunsynk dongles and app for this client. 

Thanks,

  • Author
 
  • Newbie
    •  

Does anyone have a solution to this weird problem? We have a SOLARMAN app running for a few years without any issues. Now it reports the daily energy use, but the curves disappear the next day. So only shows the current day curves. 
 

The data is being collected and stored and I can download it to Excel. 
 

But we can’t see the history on the main page. 
 

We have tried everything. Deleting the account, reloading. Etc. 

The other 250 SOLARMAN apps we have installed work fine. 
 

In desperation, about to change to Sunsynk dongles and app for this client. 

Thanks,

Have you tried contacting the guys at Solarman? 

  • 2 weeks later...
 

@kellerza, I figured it out....

Here is the addon added to @slipx  .yaml file in order for the Force Generator functionality to be managed by HA.

Adding it here in case it can help someone else in future...

image.png.334e4d64bee9dc248e0060d4b9332db3.png

Wow, this is exactly what Im looking for... Can i trigger this as a script?

 

I just want to add, after numerous failed attempts and frustrating hours, I finally got my 5kw Sunsynk in HomeAssistant via a ESP32. 

 

Ditto from my side for an 8.8kW Sunsynk  :)
Thanks to all the bright folk on this channel who posted all the info/tips/code/photos etc.  Also to the Solar Intergrations YouTube channel. 

  • Author
 

@kellerza Is there something in the configuration that could be causing my SolarMan dongle to freeze and become inaccessible?

If you have the refresh's set too often then it will overload the dongle and can interfere with the uploading of data to the cloud. Just increase the time between refreshes in the settings.  

 

If you have the refresh's set too often then it will overload the dongle and can interfere with the uploading of data to the cloud. Just increase the time between refreshes in the settings.  

 

 

@kellerza Is there something in the configuration that could be causing my SolarMan dongle to freeze and become inaccessible?

 

Try https://kellerza.github.io/sunsynk/reference/schedules#proposed-schedule-overrides-for-solarman

Try those. YMMV depending on the amount of sensors you read. In this case less is better, else the dongle resets and disappears for a while

Edited by kellerza

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.