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

  • 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
On 2023/12/23 at 12:00 AM, slipx said:

@Gary Waterworth The BLE proxy works well and all you need is a power source and wifi signal. I shared my config and setup in this post. 

 

 

OK I hate you now :)

I looked at ESP's in the past and didnt take them tooo seriously.

Ordered a bunch of them and a robo car project and a few other things to do with my youngest son.

R4500 later, thanks for that lol

Hi,

I'm looking for some help with getting my SunSynk data into HA again.

I previously had this working, I set it up a good few months ago.

But now SunSynk have moved my account from Region 1 to Region 2, I didn't get any data any more.

I've tried removing the old gather flow and yaml changes.

I then followed the instructions on the wiki page on github

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

My username/password are in the secrets.yaml file.

I've restarted home assistant.

I don't see any data, and I see errors in Node Red

I see errors on the function node "Setup Global Vars" saying "No Item Set"

Any ideas what to look at?

Thanks

J

  • Author
11 hours ago, jJasG said:

Hi,

I'm looking for some help with getting my SunSynk data into HA again.

I previously had this working, I set it up a good few months ago.

But now SunSynk have moved my account from Region 1 to Region 2, I didn't get any data any more.

I've tried removing the old gather flow and yaml changes.

I then followed the instructions on the wiki page on github

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

My username/password are in the secrets.yaml file.

I've restarted home assistant.

I don't see any data, and I see errors in Node Red

I see errors on the function node "Setup Global Vars" saying "No Item Set"

Any ideas what to look at?

Thanks

J

Redo long life tokens

Point 7 : Home · gdwaterworth/Home-Assistant---E-Linter-Logger---Sunsynk Wiki · GitHub

Did you import v1 or v2 flows ? 

Did you setup the config params properly ? 

Edited by Gary Waterworth

Thanks, I did actually skip that step as I thought it was getting node red talking to HA (Which I previously had working) but maybe I was mistaken - certainly wouldn't be the first time :)

I did go for the v2 flows, assuming they would be more up-to-date?

I'll go through the steps again and try not to skip any this time.

Thanks

 

I had this all working just fine for a few months, but went away for a week and when I came back, it seems to have stopped importing the data.

Opening Node-Red, I get a warning that "Flows stopped due to missing node types:  Server"

I've tried restoring a backup, no joy.  I've tried creating a new longlife token and adding it in, no joy.

Any advice on what else I can do to get everything back up and running other than rip it all out and start again?

 

  • Author
4 hours ago, Saftlad said:

I had this all working just fine for a few months, but went away for a week and when I came back, it seems to have stopped importing the data.

Opening Node-Red, I get a warning that "Flows stopped due to missing node types:  Server"

I've tried restoring a backup, no joy.  I've tried creating a new longlife token and adding it in, no joy.

Any advice on what else I can do to get everything back up and running other than rip it all out and start again?

 

Go back to an older backup. 

I have seen this once before with a node red upgrade that went badly 

Not sure how you can fix it 

I have had a few requests from UK users for an updated version of the Octopus Agile script I created a few months ago which automates various parts of charge/discharge and wanted to share this with the community for anyone to use as they see fit.

I hope it is of some use to others

Here is a summary of what the script does and the attached JSON file.

// This script attempts to charge the battery by controlling the inverter throughout a 24 hour period
// Firstly it performs an overnight check based on weather conditions from openweathermap
// For example if it is rainy we charge the battery higher than if it were partlycloudy
// Further, it should only charge the battery at the cheapest price points overnight so use
// (https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy) and create custom target sensors that turn on during the cheapest price periods
// In this script they are referenced as timer1 (overnight) and timer2 (daytime)
// As the battery can run low (particularly in winter) during the day time timer2 charges the battery to the value of the variable "timer2_target" before the peak period (peak period is usually 4-7pm)
// Finally, a third target sensor import_highprice is used to identify edge cases where the battery SOC is below 30% but it is a peak price period. In this case allow the battery to deplete as low as 10%

// ** As an override to all of the above, if the import_current_price is less than import_current_price_target the inverter will sell back to the grid to take advantage of preferential export prices
// This can run at any point and will ensure the battery charges/discharges on a loop between the 70 to 80% range **

// This script automatically accounts for daylight savings
// It will automatically ensure timer1 is always up to date, ensure all other timers on the inverter are removed

Sunsynk Octopus Agile Automation Version 3.json

  • Author
11 hours ago, randomfool said:

I have had a few requests from UK users for an updated version of the Octopus Agile script I created a few months ago which automates various parts of charge/discharge and wanted to share this with the community for anyone to use as they see fit.

I hope it is of some use to others

Here is a summary of what the script does and the attached JSON file.

// This script attempts to charge the battery by controlling the inverter throughout a 24 hour period
// Firstly it performs an overnight check based on weather conditions from openweathermap
// For example if it is rainy we charge the battery higher than if it were partlycloudy
// Further, it should only charge the battery at the cheapest price points overnight so use
// (https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy) and create custom target sensors that turn on during the cheapest price periods
// In this script they are referenced as timer1 (overnight) and timer2 (daytime)
// As the battery can run low (particularly in winter) during the day time timer2 charges the battery to the value of the variable "timer2_target" before the peak period (peak period is usually 4-7pm)
// Finally, a third target sensor import_highprice is used to identify edge cases where the battery SOC is below 30% but it is a peak price period. In this case allow the battery to deplete as low as 10%

// ** As an override to all of the above, if the import_current_price is less than import_current_price_target the inverter will sell back to the grid to take advantage of preferential export prices
// This can run at any point and will ensure the battery charges/discharges on a loop between the 70 to 80% range **

// This script automatically accounts for daylight savings
// It will automatically ensure timer1 is always up to date, ensure all other timers on the inverter are removed

Sunsynk Octopus Agile Automation Version 3.json 11.09 kB · 0 downloads

I have had a quick look through it.

This will only work on V1 of the flows 

There are much cleaner solutions now in V2

 

I had a quick look at your script and I noticed something that has come up in the past with scheduling. It may have been fixed, but older inverters will have a problem. I have seen the problem on mine

 

The 1st time slot should allways start at 00:00. 

The way yours are done this wont be the case 

example mine are : 

image.png.a5732fcd2609264ffe9fc1840062bbf7.png

Edited by Gary Waterworth

Hi,

9 hours ago, Gary Waterworth said:

I have had a quick look through it.

This will only work on V1 of the flows 

There are much cleaner solutions now in V2

 

I had a quick look at your script and I noticed something that has come up in the past with scheduling. It may have been fixed, but older inverters will have a problem. I have seen the problem on mine

 

The 1st time slot should allways start at 00:00. 

The way yours are done this wont be the case 

example mine are : 

image.png.a5732fcd2609264ffe9fc1840062bbf7.png

 

Hi Gary, in the 3 months I have been running with this timer configuration it has worked flawlessly for me.
It sets the timer1 value to the nearest 5 minutes before the current time e.g. 16:23 becomes 16:20
timer2 is always set to 23:55, so the inverter only ever needs to look at timeslot 1; therefore all other time slots can be set to 00:00.

I will download your new script and re-factor mine to take advantage, thank you for all of your hard work.

Edited by randomfool

@Gary Waterworth I am trying to switch over to version 2.

Followed all the steps in the quick guide. 

Obtained my serial number and plantid, got a long life token.

I can see raw data being obtained as shown below:-

image.thumb.png.b4fe4916c667aae3e1c0939020fd66f7.png

 

however it failing here: image.png.2a05f06576f2dd0614d036ac023cdf07.png

Also

Calc Last Update Time & General Status Check has error

"11/01/2024, 20:10:46node: Calc Last Update Time & General Status Checkfunction : (error)

"Logger Not Online - Error With Data ""

 

Edited by randomfool

  • Author

Some notes 1st :)

That function will not get called unless there is one of the inputs gets called . ie input_* that is in the monitor list

SO that may just be an update from when you deployed and it has not been called since

ie no soc/time/charge change

 

OK Lets work Backwards

That error is a check on this sensor :

image.thumb.png.2b1e26ee8dcb0fd43a21d5dca6fdd1ba.png

That comes from :

  - sensor:
      - name: "SunSynk Logger Status"
        state: >
         {% if state_attr("sensor.sunsynk_usable_inverter", "status") == 0 -%}
            Offline
         {%- elif state_attr("sensor.sunsynk_usable_inverter", "status") == 1 -%}
            Online
         {%- elif state_attr("sensor.sunsynk_usable_inverter", "status") == 2 -%}
            Warning
         {%- elif state_attr("sensor.sunsynk_usable_inverter", "status") == 3 -%}
            Fault
         {%- elif state_attr("sensor.sunsynk_usable_inverter", "status") == 4 -%}
            Upgrading
         {%- else -%}
            {{state_attr("sensor.sunsynk_usable_inverter", "status")}}
         {%- endif %}

This get its information from the sensor :

image.thumb.png.433bd001a72932dbf011cb1758fe8a65.png

 

Can you send me the output of yours ? Can see from there if it has been correctly populated.

  • Author
32 minutes ago, randomfool said:

image.thumb.png.a688abc98ab86b8ae64cf6e17c5140e6.png

 

image.thumb.png.a4c2d3afb460d37cfff6edcb55e54c07.png

 

 

 

 

Post the contents of your secrets file plse , Send it to me in DM, just blot out login and pwd

Also a screen shot of the the contents of the global context : ss_Consolid -> Config_data 

image.png.c57348fd9070ded617af540ae3b2e1e6.png

Are there any errors under

image.thumb.png.3fab022b2944b67f6e60546685c46536.png

and more important here

image.png.75f28604213e0ae5475420af8a6f74a8.png

Then also check that data is in teh global context ready to be exported to entities

image.thumb.png.9e5b0e2df01a38105812e1c9db17f6ca.png

 

 

Edited by Gary Waterworth

Just for reference @randomfool this is how mine looks and it works (obviously fake details)

image.png.bc4d49b24a9e6798e9712a9a536f7dbb.png

 

One of the things I encountered when I had the wrong serial numbers in there was only partial info was pulling through.  I don't have anything relating to master of slave added to my serial numbers perhaps try it without that parameter if you have something setup for it, otherwise as Gary said send him your secrets files.

 

Edited by -cK-

  • Author

Just for Everybody's info 

This is the flow of information 

image.png.1694f0143c0f43808997d1c68f0b552e.png

Data is 1st gathered into SS_Consolid - This is the COMPLETE set of raw data 

layout is : 

SS_Consolid -> Plant [plant id] -> Inverter [Inverter ID]

This data is then processed by [Export Data Export to Entity ] and placed in SS_Export_Data

SS_Export_Data is then populated to the Sunsynk_usable_* entities 

image.png

@Gary Waterworth just out of curiosity sake, the master / slave parameter that was added to the secrets file is it related to this.

image.png.53b1730685601994954be28e609521de.png 

Only saw this now when I was fiddling around.  My flows work so not keen to mess with this while it is working (don't fix what isn't broken).

I do know my inverter is in "slave mode" due to some stupid mistake I made trying to hook up to the RS485 port before finding your integration which tripped the inverter so I just left in in "slave mode" as things seems to work just fine and trying to switch to master had the inverter turn off (granted I was fiddling with that at night during loadshedding so was shedding myself when everything just went dark 😅). 

Also as it is a single inverter setup its not running parallel so I believe that is why mine is probably showing a null.

image.png.d6d44c22d911f8af21ee276be0239402.png

  • Author
56 minutes ago, -cK- said:

@Gary Waterworth just out of curiosity sake, the master / slave parameter that was added to the secrets file is it related to this.

image.png.53b1730685601994954be28e609521de.png 

Only saw this now when I was fiddling around.  My flows work so not keen to mess with this while it is working (don't fix what isn't broken).

I do know my inverter is in "slave mode" due to some stupid mistake I made trying to hook up to the RS485 port before finding your integration which tripped the inverter so I just left in in "slave mode" as things seems to work just fine and trying to switch to master had the inverter turn off (granted I was fiddling with that at night during loadshedding so was shedding myself when everything just went dark 😅). 

Also as it is a single inverter setup its not running parallel so I believe that is why mine is probably showing a null.

image.png.d6d44c22d911f8af21ee276be0239402.png

You only add the sn in the secrets file, not anything after it. Don't add the-null

I wrote it out to the global context for an easy way to see which one was master/ slave

Edited by Gary Waterworth

Started working, I deleted the the entire node-red configuration and re-imported and everything is up now.

I purged all old entries and shut down HA prior to doing this, not sure if this made any difference but either way it's all looking good now!

 

Edited by randomfool

@randomfool, I had the same error you had, what steps did you follow to fix your issue? Besides your error, I was not getting SOC, so I manually changed the node-red flows to updated home assistant, but I know that is not the way to go.

Just wanted to add that everything was working fine for over a year until the latest home assistant updates this year.

What I did was update sensor.sunsynk_battery_soc_184 from Process Inv Output as the state of charge was not updated.

Edited by HowserMD

4 hours ago, HowserMD said:

@randomfool, I had the same error you had, what steps did you follow to fix your issue? Besides your error, I was not getting SOC, so I manually changed the node-red flows to updated home assistant, but I know that is not the way to go.

Purged recorder

Removed flows

Rebooted HA

Followed full install procedure again

Fixed

Edited by randomfool

12 hours ago, randomfool said:

Purged recorder

Removed flows

Rebooted HA

Followed full install procedure again

Fixed

 

I did the same (or rather tried).

I am getting the following errors from node-red.

image.thumb.png.488e7e4b18d02998176cb04988033043.png

I can see being retrieved and updated in SS_Consolid.Plant.<id>.Inverter.<id>. I can see the bmsSoc, soc, etc, but they are not updating on the card or the home assistant states.

 

image.png.2df126f529613349b2e4dbb20c48db8a.png

I am pretty sure I missed something.

Hi all

 

yhis looks great. Been looking for an automation that doesn’t rely upon direct cabling into the inverter

 

my main use case is to automate force charging when we get a cheap period on our so toous Intelligent tarrif outside of the normal hours. 
 

Before I start integrating can I check…

 

1. This will allow me to force charge (maybe my toggling the “Use timers” setting?

 

2. Presume it’s best to use v2?

 

I have a 10kW 3 phase Sunsynk inverter 

  • Author
3 hours ago, HowserMD said:

 

I did the same (or rather tried).

I am getting the following errors from node-red.

image.thumb.png.488e7e4b18d02998176cb04988033043.png

I can see being retrieved and updated in SS_Consolid.Plant.<id>.Inverter.<id>. I can see the bmsSoc, soc, etc, but they are not updating on the card or the home assistant states.

 

image.png.2df126f529613349b2e4dbb20c48db8a.png

I am pretty sure I missed something.

Please send the information asked for a few posts back for a similar problem

 

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.