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.

SunSynk Logger Integration into Home Assistant

Featured Replies

15 minutes ago, Gary Waterworth said:

Just check the default SOC values :P

The initial are what my system is configured as 

I deliberately set it to disabled to stop the complaining brigade. 

"I loaded your flows and my settings weer broken" 

At least this way you have to deliberately go turn it on 

Mine is set to initial true and I have no problems.

My HA runs in a VM on a Intel NUC device. So lots of capacity and I dont need reboots. I have another asus mini pc I am looking to migrate so so I have access to usb ports. Want to look at active pylontech battery monitoring 

Shot thanks, yea caught those initial SOC in the config after a while but luckily before I got this to work so set them to my defaults 👍

Just one more thing as I'm not sure if it is mentioned in your notes and I just missed it but might need to point out the custom card used for the below needs to be installed as well

custom:multiple-entity-row 😉

image.png.84c0426583655fbbb14f8688e041975a.png

Edited by -cK-

  • Replies 948
  • Views 130.8k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • randomfool
    randomfool

    I am making good progress on converting slip06x excellent dashboard to work with Gary's brilliant work on gathering the data from the latest Sunsynk inverters remotely. Will publish the dashboard

  • @Gary Waterworth   Did a quick YouTube video on how to install your software and to get the data into HASS, no cards or anything so very basic.  Please let me know what you guys think of my first

  • randomfool
    randomfool

    Ok here goes; caveats to begin with - I am no HA expert, in fact I only discovered HA a few weeks ago through Gary's post and his subsequent links to slip06x dashboard, so my ability to provide "suppo

Posted Images

  • Author
22 minutes ago, -cK- said:

Shot thanks, yea caught those initial SOC in the config after a while but luckily before I got this to work so set them to my defaults 👍

Just one more thing as I'm not sure if it is mentioned in your notes and I just missed it but might need to point out the custom card used for the below needs to be installed as well

custom:multiple-entity-row 😉

image.png.84c0426583655fbbb14f8688e041975a.png

Thanks , forgot about that one.

My HA is very customised, so hard to track what is absolutely needed by a new user. 

The Charge settings are not in automation yet. Had a few issues so just need to spend some time and figure them out 

 

Edited by Gary Waterworth

No Probs

Yea I have no individual charge slots active for myself but can see the benefit of getting those to work as well. 

As long as I can set the priority load/batt and usetimer on/off I can start writing a few automation's that should help automate things on bad weather days so that I don't have to touch a thing myself or micro manage it anymore 🤞

Hi Gary / Others,

I've been struggling to get things working on my Pi 4. Before I totally give up, in desperation to get things working I thought I would reach out

I had my Pi working to a degree, pulling dat from my sunsynk using V1.0, but could never get it to show the actual figures on the powerflow card, perhaps a mapping issue. Recently I have re-installed Hassio and started from scratch, but I'm now having an issue when importing the flow using V2 where im getting this error image.png.399b95d794f6db86231f998a9fe41a75.png

What would really help me and I'm sure others is a simple guide, perhaps using one of the spare "blank"  posts at the beginning of this thread or a guide like https://kellerza.github.io/sunsynk/  ? Perhaps this is something that could be built by a shared select few for everyone to benefit from, I for one would be happy to contribute if this was available to simplify things - idiots guide so to speak :)

I.e. How to install on a Pi from scratch

The basics

1.) Flash SSD with Hassio Pi image using Raspberry Pi Imager

2.) Install File Editor - Any specific instructions

3.) Install Advanced SSH & Web Terminal - Any specific instructions

4.) Install Node Red - Enter any "credential secret" in the configuration page and turn off SSL

4.)a - Start Node Red, Launch Web GUI, Import flows from "here",  etc

5.) Import xyx files using the file editor into yaml / secrets files etc

6.) Enter specific user information i.e. synsynk username, SN into xyz files

 

Methods

Pulling from Sunsynk Web (Default) easier for majroity of users

MQTT with RS485 cable etc

MQTT with ESP32

Dashboards

7.) How to setup a really cool dashboard :)

Install xyz additional packages

Create dashboard, add card, import code from a here 

add additional cards from here...

 

Automations

Install x

Drop x code into y files

This is ultimately where everyone is trying to go, to help with the DSF, how to export and import easily with a single click or using automations

 

  • Author
47 minutes ago, chessmaster said:

Hi Gary / Others,

I've been struggling to get things working on my Pi 4. Before I totally give up, in desperation to get things working I thought I would reach out

I had my Pi working to a degree, pulling dat from my sunsynk using V1.0, but could never get it to show the actual figures on the powerflow card, perhaps a mapping issue. Recently I have re-installed Hassio and started from scratch, but I'm now having an issue when importing the flow using V2 where im getting this error image.png.399b95d794f6db86231f998a9fe41a75.png

What would really help me and I'm sure others is a simple guide, perhaps using one of the spare "blank"  posts at the beginning of this thread or a guide like https://kellerza.github.io/sunsynk/  ? Perhaps this is something that could be built by a shared select few for everyone to benefit from, I for one would be happy to contribute if this was available to simplify things - idiots guide so to speak :)

I.e. How to install on a Pi from scratch

The basics

1.) Flash SSD with Hassio Pi image using Raspberry Pi Imager

2.) Install File Editor - Any specific instructions

3.) Install Advanced SSH & Web Terminal - Any specific instructions

4.) Install Node Red - Enter any "credential secret" in the configuration page and turn off SSL

4.)a - Start Node Red, Launch Web GUI, Import flows from "here",  etc

5.) Import xyx files using the file editor into yaml / secrets files etc

6.) Enter specific user information i.e. synsynk username, SN into xyz files

 

Methods

Pulling from Sunsynk Web (Default) easier for majroity of users

MQTT with RS485 cable etc

MQTT with ESP32

Dashboards

7.) How to setup a really cool dashboard :)

Install xyz additional packages

Create dashboard, add card, import code from a here 

add additional cards from here...

 

Automations

Install x

Drop x code into y files

This is ultimately where everyone is trying to go, to help with the DSF, how to export and import easily with a single click or using automations

 

I dont like putting documentation in one forum where not all users come from. Anyone can branch the code and develop and then ask for a merge. My time is available on a free time basis as and when I have it. I have a fairly demanding job, so cannot allways be available and a lot of what has been done here has been through a lot of reverse engineering.  There is VERY little official documentation and that what there is is years out of date and incomplete. 

As far a Pi4 goes I cant help with teh basic config. I own a few Pi3's but they are in a box gathering dust. I moved to mini pc's a long time ago. Tiny bit more money, but far more usable. For the base install of any of the options there are far better guides available on the internet. 

Back to your problem:=

You have'nt followed all the steps here. You are missing the extra palette in node red 

https://github.com/gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk/wiki

V2 is very new and I still need to put up more detailed information

 

V1 had a very specific use case ( ie was designed around my installation at home ) , so without more examples and data extracts I cannot comment further. It was not designed for multi invertor plants. The data was all there, but you had to setup the sensors manually.

V2 was a full rewrite to try cater for the shortfall and limitations in V1 , it was designed as the base that could be built on, but atm is still specific, so depending on your plant/invertor setup there may be some work to do. 

I dont have a lab and I refuse to change my implementation at home :) , so the only way I can cater for other setups is for someone to give me access to their system so I can see how teh data extract and plant looks or for them to get more knowlegable in node red. One kind gent did that and that is now the reason that we can populate the generator data. One missing bit of information gathering is still the mini invertor data which is still a big (?).

What I dont have time for is someone who says, ok you can look at my system but you only have 4 days ( and yes that has happened ). I was actually on a business trip in Germany, so I just shrugged my shoulders. 

Edited by Gary Waterworth

Thanks Gary, appreciate everyone has their day job too :)

 

Didn't notice the wiki before, that is useful! Doh! 🤪

I've now followed those steps and added the flows into node red, also wasnt sure if I needed to add sensors to the yaml file? from  https://github.com/gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk/blob/Stable-Release/V1.1/Templates ( Region 2 ) - Sunsynk.txt

 

I'm now getting a "No Items Set" in the node: Setup Global Vars image.thumb.png.a0e7c8b049c68a5a5577dd785805c2fc.png

 

Also can't see any entities being pulled through in Dev Tools - States, yet!

config yaml file.txt

Edited by chessmaster
more info

2 hours ago, Gary Waterworth said:

I dont like putting documentation in one forum where not all users come from. Anyone can branch the code and develop and then ask for a merge. My time is available on a free time basis as and when I have it. I have a fairly demanding job, so cannot allways be available and a lot of what has been done here has been through a lot of reverse engineering.  There is VERY little official documentation and that what there is is years out of date and incomplete. 

As far a Pi4 goes I cant help with teh basic config. I own a few Pi3's but they are in a box gathering dust. I moved to mini pc's a long time ago. Tiny bit more money, but far more usable. For the base install of any of the options there are far better guides available on the internet. 

Back to your problem:=

You have'nt followed all the steps here. You are missing the extra palette in node red 

https://github.com/gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk/wiki

V2 is very new and I still need to put up more detailed information

 

V1 had a very specific use case ( ie was designed around my installation at home ) , so without more examples and data extracts I cannot comment further. It was not designed for multi invertor plants. The data was all there, but you had to setup the sensors manually.

V2 was a full rewrite to try cater for the shortfall and limitations in V1 , it was designed as the base that could be built on, but atm is still specific, so depending on your plant/invertor setup there may be some work to do. 

I dont have a lab and I refuse to change my implementation at home :) , so the only way I can cater for other setups is for someone to give me access to their system so I can see how teh data extract and plant looks or for them to get more knowlegable in node red. One kind gent did that and that is now the reason that we can populate the generator data. One missing bit of information gathering is still the mini invertor data which is still a big (?).

What I dont have time for is someone who says, ok you can look at my system but you only have 4 days ( and yes that has happened ). I was actually on a business trip in Germany, so I just shrugged my shoulders. 

That’s strange, it’s not like you were planning to do anything with their system 😳.

by all means if there is anything you ever need I am willing to share my system for as long as you need if I use the specific part of that system.

50 minutes ago, chessmaster said:

Thanks Gary, appreciate everyone has their day job too :)

 

Didn't notice the wiki before, that is useful! Doh! 🤪

I've now followed those steps and added the flows into node red, also wasnt sure if I needed to add sensors to the yaml file? from  https://github.com/gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk/blob/Stable-Release/V1.1/Templates ( Region 2 ) - Sunsynk.txt

 

I'm now getting a "No Items Set" in the node: Setup Global Vars image.thumb.png.a0e7c8b049c68a5a5577dd785805c2fc.png

 

Also can't see any entities being pulled through in Dev Tools - States, yet!

config yaml file.txt 34.81 kB · 1 download

If you are setting up v2 you must use only the v2 yaml's.

image.png.c0c6a5f9504133e1039d4d6bf118bea6.png

I'm seeing stuff from v1 still in the config as well.  The old mapping for slipx's card for one.

You might need to check your file and do a bit of clean up and reshuffeling. 

 

For instance you have template: setup in 2 locations

image.thumb.png.fd2c8d0acfc19fa5c6427342bd99a350.png

 

image.png

See below example e.g. if I where to add a second template: to my config in the wrong location.

image.png.fc8e794ac84bfe79cfaa11cb3298f890.png

Not sure if that was your full file but try the below structure and see if that might help.  Just to confirm you've setup your secret.yaml as well with the correct credentials?

config cleaned up.yaml.txt

 

 

Edited by -cK-

@Gary Waterworth two questions:

1) Any reason why I'm still seeing the old sensors from v1 in my developer tools -> states as unavailable?

image.thumb.png.0cba77d6c50918312f4085565179dc52.png

I've deleted the v1 flow from node-red and and from my config file and I've rebooted HA. 🤷‍♂️

2) The purge recorder is it supposed to be referencing the old entities or should those be the new ones?

image.png.c51a5bd6c4a53dec6d90b32aed90c9fb.png

sensor.sunsynk_usable_XXX

Purging these won't affect my ploty card data as long as they are not included in the list?

image.thumb.png.718898b31d1003be9184dd74018c3eaa.png

e.g. that 90 day looks at these

image.thumb.png.072ac13432caa192d2471010c5ea554c.png

Those are pulled from these effectively:

  - sensor:
      - name: "Sunsynk Grid Today"
        state_class: total_increasing
        unique_id: "sensor.sunsynk_grid_today"
        device_class: energy
        unit_of_measurement: kWh
        state: >
          {{state_attr('sensor.sunsynk_usable_grid', 'dailyusedin')|float}}
  - sensor:
      - name: "Sunsynk Grid Export Total"
        state_class: total_increasing
        unique_id: "sensor.sunsynk_grid_export_total"
        device_class: energy
        unit_of_measurement: kWh
        state: >
          {{state_attr('sensor.sunsynk_usable_grid', 'totalusedout')|float}}
  - sensor:
      - name: "Sunsynk Load Today"
        state_class: total_increasing
        unique_id: "sensor.sunsynk_load_today"
        device_class: energy
        unit_of_measurement: kWh
        state: >
          {{state_attr('sensor.sunsynk_usable_load', 'dailyused')|float}}

Thanks

Edited by -cK-

1 hour ago, -cK- said:

If you are setting up v2 you must use only the v2 yaml's.

image.png.c0c6a5f9504133e1039d4d6bf118bea6.png

I'm seeing stuff from v1 still in the config as well.  The old mapping for slipx's card for one.

You might need to check your file and do a bit of clean up and reshuffeling. 

 

For instance you have template: setup in 2 locations

image.thumb.png.fd2c8d0acfc19fa5c6427342bd99a350.png

 

image.png

See below example e.g. if I where to add a second template: to my config in the wrong location.

image.png.fc8e794ac84bfe79cfaa11cb3298f890.png

Not sure if that was your full file but try the below structure and see if that might help.  Just to confirm you've setup your secret.yaml as well with the correct credentials?

config cleaned up.yaml.txt 22.37 kB · 1 download

 

 

Thanks CK

Have used your file, but still getting the "No Items Set in "Setup Global Vars" in nodered.

Have also setup the secrets file with email, password / Set sunsynk_sn_flow to 0 with the serial number for SN_data

Struggling to figure out how do to these checks, perhaps could be related to the error im getting:

 

#####                   Do a run through then in node red look at global context data under 
#####                   SS_Consolidat -> Config Data -> Inverter Plant
#####                   [Inverter SN]:[Plantid]
##### sn_flow:          Plant ID to use for flow data
#####                   Do a run through then in node red look at global context data under 
#####                   SS_Consolidat -> Config Data -> Inverter Plant
#####                   [Inverter SN]:[Plantid]

13 hours ago, Gary Waterworth said:

Global Context 

image.thumb.png.a8e8710dd2a6040efe1f7d1d4b3015fe.png

You may need to open teh debug view then pulldown top right , select context data , hit refresh button 

image.png.ce6c2078126494b6a9172f1b353fbc3b.png

SS :- General Work Area 

SS_Consolid :- All Data actually pulled from account 

SS_EXport_Data :- Processed Data that will be populated to the sunsynk_usable.* entities 

This is the single function that is on it's own on that extra flow page. 

Designed that way so it can be swopped in and out for different plant inverter setups.

Needs a lot of documentation so people can see how to edit it for their own needs

 

Because we are exploring all plants and inverters in an account , we cant just export everything to a single entity. I tried it and HA was not happy with a sensor of over 16k bytes :D

 

You should find the SN and ID here. 👆

Not sure if your "No Items Set in "Setup Global Vars" is related to that or not.

14 minutes ago, -cK- said:

You should find the SN and ID here. 👆

Not sure if your "No Items Set in "Setup Global Vars" is related to that or not.

Mine appears to be missing, SS_Consolid

 image.thumb.png.f5be3f83da3ff369ced79e58fc63da10.png

  • Author
2 hours ago, chessmaster said:

Thanks Gary, appreciate everyone has their day job too :)

 

Didn't notice the wiki before, that is useful! Doh! 🤪

I've now followed those steps and added the flows into node red, also wasnt sure if I needed to add sensors to the yaml file? from  https://github.com/gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk/blob/Stable-Release/V1.1/Templates ( Region 2 ) - Sunsynk.txt

 

I'm now getting a "No Items Set" in the node: Setup Global Vars image.thumb.png.a0e7c8b049c68a5a5577dd785805c2fc.png

 

Also can't see any entities being pulled through in Dev Tools - States, yet!

config yaml file.txt 34.81 kB · 1 download

Check your 2 x global configuration nodes. I dont think you have put in a long life token .

step 7 in : https://github.com/gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk/wiki

 

On 2023/07/27 at 10:37 PM, slipx said:

Make sure you tick the "Enable global context store" when setting up your server node

image.png.31017e6d1f26c6e5b34b67f781062414.png

 

Mayby check this, on v1 someone else also had a similar error and this I think resoved it.  Check page 16.  Might be a miss configuration of node-red

  • Author
1 hour ago, -cK- said:

@Gary Waterworth two questions:

1) Any reason why I'm still seeing the old sensors from v1 in my developer tools -> states as unavailable?

image.thumb.png.0cba77d6c50918312f4085565179dc52.png

I've deleted the v1 flow from node-red and and from my config file and I've rebooted HA. 🤷‍♂️

2) The purge recorder is it supposed to be referencing the old entities or should those be the new ones?

image.png.c51a5bd6c4a53dec6d90b32aed90c9fb.png

sensor.sunsynk_usable_XXX

Purging these won't affect my ploty card data as long as they are not included in the list?

image.thumb.png.718898b31d1003be9184dd74018c3eaa.png

e.g. that 90 day looks at these

image.thumb.png.072ac13432caa192d2471010c5ea554c.png

Those are pulled from these effectively:

  - sensor:
      - name: "Sunsynk Grid Today"
        state_class: total_increasing
        unique_id: "sensor.sunsynk_grid_today"
        device_class: energy
        unit_of_measurement: kWh
        state: >
          {{state_attr('sensor.sunsynk_usable_grid', 'dailyusedin')|float}}
  - sensor:
      - name: "Sunsynk Grid Export Total"
        state_class: total_increasing
        unique_id: "sensor.sunsynk_grid_export_total"
        device_class: energy
        unit_of_measurement: kWh
        state: >
          {{state_attr('sensor.sunsynk_usable_grid', 'totalusedout')|float}}
  - sensor:
      - name: "Sunsynk Load Today"
        state_class: total_increasing
        unique_id: "sensor.sunsynk_load_today"
        device_class: energy
        unit_of_measurement: kWh
        state: >
          {{state_attr('sensor.sunsynk_usable_load', 'dailyused')|float}}

Thanks

1. Old Entities :- You need to clean those up . They are unavailable as you are not providing them anymore

Settings -> Entities -> select them, delete/erase

image.thumb.png.a135e4c62bf2ddae3731827bc351ff85.png

 

2. I will fix the purge recorder 😕

3. Any entity referencing a purged entity is fine. Keeps its own statistical

  Entities having main data in statistics wont have attributes ( which most of my core ones are ) as statistical data.

 

5 minutes ago, Gary Waterworth said:

Check your 2 x global configuration nodes. I dont think you have put in a long life token .

step 7 in : https://github.com/gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk/wiki

 

Top Man! Re-applied Long life tokens and restarted home assistant and its working now, getting entities now 🤩

 

Forgot to say earlier, 8kw Sunsynk  here in the UK with two Seplos Mason upright batteries

image.thumb.png.7bcb385d3bed6dcc5c068c1d0a5e482c.png

 

Now to create some dashboards, although might be one for Sunday when I have some time again - Any tips much appreciated in the meantime, but glad I moved forwards today

  • Author
23 minutes ago, chessmaster said:

Mine appears to be missing, SS_Consolid

 image.thumb.png.f5be3f83da3ff369ced79e58fc63da10.png

ss_consolid and ss_export will only appear after a successful run through. Flow is being stopped on the main setting up or variables.

I dont think you have secrets.yaml or your long life token correct

 

  • Author
32 minutes ago, -cK- said:

Mayby check this, on v1 someone else also had a similar error and this I think resoved it.  Check page 16.  Might be a miss configuration of node-red

Enable these and make your life easy.

Should be default if I remember correctly

As long as teh Node Red Companion integration is added it will work. Then teh long life token will only be needed for teh other config node

image.png.6229e85afb81787c035faeeb47f71d89.png 

 

 

Edited by Gary Waterworth

  • Author
15 minutes ago, chessmaster said:

Basic, but at least it's working

image.png.b363e894482bfe08012c06d372a5bf68.png

:)

At least you have a straight forward implementation.

I am a fan of the minimal looks.

I do have a seperate sheet with detailed information

I use home assistant to keep track of camera's/alarms/solar and also starting with other home automation stuff with sonoff's and smart devices ( tv/aircon etc )

Some simple stuff like turning outside light on as sundown etc and then getting into more complex logic as well

 

image.thumb.png.cf81cefa437d76d5889b452382727e7f.png

Someone asked me a while back why I dont create a proper integration.

1. Time

2. I like teh modularity of Node Red. Can do changes quickly and I use it for other device hacking like camera's etc

image.thumb.png.112f2db4fc1300eea9dd8ef5cb118e06.png

Edited by Gary Waterworth

  • Author
1 hour ago, chessmaster said:

Thanks CK

Have used your file, but still getting the "No Items Set in "Setup Global Vars" in nodered.

Have also setup the secrets file with email, password / Set sunsynk_sn_flow to 0 with the serial number for SN_data

Struggling to figure out how do to these checks, perhaps could be related to the error im getting:

 

#####                   Do a run through then in node red look at global context data under 
#####                   SS_Consolidat -> Config Data -> Inverter Plant
#####                   [Inverter SN]:[Plantid]
##### sn_flow:          Plant ID to use for flow data
#####                   Do a run through then in node red look at global context data under 
#####                   SS_Consolidat -> Config Data -> Inverter Plant
#####                   [Inverter SN]:[Plantid]

Extra note for others :

Dont do this :)

...  Set sunsynk_sn_flow to 0 with the serial number for SN_data

Only put in the plant and sn id's when you have them

The flows look for xxx as an error check

//Errors to Check
var ErrorCk = [undefined, "unavailable", "DONOTEDIT", "", "0000000", "[email protected]", "xxx" ];

Edited by Gary Waterworth

1 minute ago, Gary Waterworth said:

Extra note for others :

Dont do this :)

...  Set sunsynk_sn_flow to 0 with the serial number for SN_data

Only put in the plant and sn id's when you have them

The flows look for xxx as an error check

😀 I must go back and sort this

 

Dashboards look great btw, curious as to what you have in your Automations tab?

  • Author
9 minutes ago, chessmaster said:

😀 I must go back and sort this

 

Dashboards look great btw, curious as to what you have in your Automations tab?

This is South Africa Specific :D

1. Calculate ETA next load shedding and length of it

2. Modify 2 x SOC values based on weather predictions

3. Make sure that when load shedding is due I have a specific SOC in the battery by manipulating the "use timer" to force charge if needed. Fairly complex logic calculation taking into account :

a. current pv

b. time of day

c. weather predictions ( current and future )

d. when is load shedding

e. how long is it going to be

   and some other variables :D

4. Also some notifications on grid/use timer change. had to rewrite some of this to ude teh new v2 base to set inverter values instead up updating the sunsynk directly

5. Also a lot of error checking that logger is connected, sane data is being fetched etc

image.thumb.png.a2fbecfcf0b8475009255fdd090bfbed.png

 

Edited by Gary Waterworth

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.