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

6 hours ago, Gary Waterworth said:

@Gary Waterworth pretty sure its all connected, below is the log from Node-Red. I use the IP address of the server as opposed to local host as this is recomended when using a NAS setup (I have however also tried with local host and get the same message). I have also done a fresh install on a VM I am running on a laptop and get exactly the same error.

image.thumb.png.e2f0c74bb702666c98fe1d92e85eeffb.png

  • Replies 948
  • Views 131.6k
  • 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
15 minutes ago, Motty09 said:

@Gary Waterworth pretty sure its all connected, below is the log from Node-Red. I use the IP address of the server as opposed to local host as this is recomended when using a NAS setup (I have however also tried with local host and get the same message). I have also done a fresh install on a VM I am running on a laptop and get exactly the same error.

image.thumb.png.e2f0c74bb702666c98fe1d92e85eeffb.png

Post a screenshot of this plse as per that post I linked on your system

The reason for that error is that the entity is not being seen 

Also include the HA variable shown in my pic

image

 

12 minutes ago, Gary Waterworth said:

Post a screenshot of this plse as per that post I linked on your system

The reason for that error is that the entity is not being seen 

Also include the HA variable shown in my pic

image

 

@Gary Waterworth...this is what I see in both of my installs. I dont see the last box in either ( maybe thats because of the error ?)

image.png.48223c55d906412dae4067c7b43f7620.png

Hi @Gary Waterworth I have recently switched over to Octopus Agile; a wholesale variable rates which update every 30 minutes in the UK. 

Using the mobile app or web site you can configure the inverter to automatically charge the battery when the target price is below a specific value. See graphic below:-

image.png.57a4fe9d5afa149cf1c42757fc12b988.png

In this example I have set it to import up to a price of 12p. Unfortunately this is not a dynamic process so it does not update daily; what I would like to be able to do is update the "Charge Battery" value by looking at the prices within a specified time period.

Thankfully, there is an Octupus Agile addon (HomeAssistant-OctopusEnergy/_docs/setup_target_rate.md at develop · BottlecapDave/HomeAssistant-OctopusEnergy · GitHub) which allows me to create a flow to capture the cheapest price points.

What I would ask for your assistance with is identifying the attribute "Charge Battery" and what the process would look like to update this value on the inverter.

In my limited testing, as soon as I set the price manually; if the current price period is below that value the grid immediately starts to charge the battery.

Thank you for any assistance; and I hope this makes sense.

EDIT

Checked the API documentation and it looks like it could be something in the "Price Domain" array under Plant Info:-

image.thumb.png.e63477a24eaa14cd2ce27959c487e445.png

I think "price" maybe the required attribute, however I also noticed the e-linter api manual only shows 2 income types whereas if you login to sunsynk.net there are 3:-

1-Fixed price

2-Interval price

3-Live price (this is what you select when you want to use Octopus Energy)

Also noted on Node-Red you are pointing at global.set("SS.url.hostname","https://pv.inteless.com"); so it may not be possible without repointing the API at the current commented out URL global.set("SS.url.hostname","https://api.sunsynk.net") ; 
I am still on region 1.

Edited by randomfool

On 2023/07/12 at 7:54 AM, Gary Waterworth said:

Looks like teh website is not showing individual like teh unit. You will need to look at the various main sensors and try figure out if they are populating it in one of teh main sensor attributes

@Gary Waterworth, thanks. Do I need to do any coding change and/or enter debug mode or will this be in the existing attributes that I see on the on developer tools?

Just had a random thought, assuming I have optimized and automated my system usage as best as possible. How would i go about calculating (using my real life average daily usage over a few months) the exact number of batteries i should have to not require grid. Like a constantly updating card showing

"Average additional usage: 7.123kWh pd"

"Peak nadir additional grid usage: 9.234kWh"

"To maintain overnight charge of 65% across 95% of the currently monitored days [calculated from 3Jan2023 - 15Jul2023] you would require an approximate additional capacity of 6.2kWh" 

I say 95% as example to account for freak 3 to 4 day stormfronts.

Similarly:

To enter overnight capacity of 100% for 95% of the year [calculated from 3Jan2023 - 15Jul2023] you require 2300W of additional solar. 

Or even

To enter overnight capacity of 100% for 95% of the year [calculated from 3Jan2023 - 15Jul2023] you are currently over-producing 3200W of additional solar power day. 

At next forecasted sunny day automation will begin to export 3200W of power to the grid once batteries are at 100% maintaining a charge of 100%.

Hi all.  My dual inverters were installed last week so I immediately looked around and stumbled on this integration from @Gary Waterworth, which I tried by following the video from @Sc00bs. Thanks for all your efforts.

 

I have scanned through 16 pages of this thread and would like to confirm that I am up to date; that setting up paralleled inverters is still in the works?

I don't see any values for inverter two even after setting inverter 2 index to 1.

Once again thanks for the efforts

 

  • Author
15 hours ago, gimme_power said:

Hi all.  My dual inverters were installed last week so I immediately looked around and stumbled on this integration from @Gary Waterworth, which I tried by following the video from @Sc00bs. Thanks for all your efforts.

 

I have scanned through 16 pages of this thread and would like to confirm that I am up to date; that setting up paralleled inverters is still in the works?

I don't see any values for inverter two even after setting inverter 2 index to 1.

Once again thanks for the efforts

 

Depending on how your plants are configured in the webapp. Do they both show in the app ?

On 2023/07/14 at 3:26 PM, randomfool said:

Hi @Gary Waterworth I have recently switched over to Octopus Agile; a wholesale variable rates which update every 30 minutes in the UK. 

Using the mobile app or web site you can configure the inverter to automatically charge the battery when the target price is below a specific value. See graphic below:-

image.png.57a4fe9d5afa149cf1c42757fc12b988.png

In this example I have set it to import up to a price of 12p. Unfortunately this is not a dynamic process so it does not update daily; what I would like to be able to do is update the "Charge Battery" value by looking at the prices within a specified time period.

Thankfully, there is an Octupus Agile addon (HomeAssistant-OctopusEnergy/_docs/setup_target_rate.md at develop · BottlecapDave/HomeAssistant-OctopusEnergy · GitHub) which allows me to create a flow to capture the cheapest price points.

What I would ask for your assistance with is identifying the attribute "Charge Battery" and what the process would look like to update this value on the inverter.

In my limited testing, as soon as I set the price manually; if the current price period is below that value the grid immediately starts to charge the battery.

Thank you for any assistance; and I hope this makes sense.

EDIT

Checked the API documentation and it looks like it could be something in the "Price Domain" array under Plant Info:-

image.thumb.png.e63477a24eaa14cd2ce27959c487e445.png

I think "price" maybe the required attribute, however I also noticed the e-linter api manual only shows 2 income types whereas if you login to sunsynk.net there are 3:-

1-Fixed price

2-Interval price

3-Live price (this is what you select when you want to use Octopus Energy)

Also noted on Node-Red you are pointing at global.set("SS.url.hostname","https://pv.inteless.com"); so it may not be possible without repointing the API at the current commented out URL global.set("SS.url.hostname","https://api.sunsynk.net") ; 
I am still on region 1.

@Gary Waterworth following on from this post I have made "some" progress, but JSON is anything but my speciality...

I have the console Payload output from https://sunsynk.net/plants/edit/[PlantID] showing the POST message, I am trying to update the "ratesThreshold" under direction 1 which is Import, direction 0 looks to be Export.

{id: "12345", currency: 366, invest: 0,…}
charges
: 
[{price: 0, type: "3", startRange: "", endRange: ""}]
currency
: 
366
id
: 
"12345"
invest
: 
0
products
: 
[{direction: 1, ratesThreshold: "15", provider: 1, regionId: 12},…]
0
: 
{direction: 1, ratesThreshold: "15", provider: 1, regionId: 12}
direction
: 
1
provider
: 
1
ratesThreshold
: 
"15"
regionId
: 
12
1
: 
{direction: 0, ratesThreshold: 60, provider: 1, regionId: 12}
direction
: 
0
provider
: 
1
ratesThreshold
: 
60
regionId
: 
12

I have attached a sunsynk automation JSON file I am using. 
The Check Price Node works, and I have entered static information under the Create request; I see Set Status as a success but there is no visible change when I check the web site.

Thank you.

 

 

 

 

 

Auto Price Update Sunsynk.json

Edited by randomfool

On 2023/07/21 at 7:36 PM, randomfool said:

@Gary Waterworth following on from this post I have made "some" progress, but JSON is anything but my speciality...

I have the console Payload output from https://sunsynk.net/plants/edit/[PlantID] showing the POST message, I am trying to update the "ratesThreshold" under direction 1 which is Import, direction 0 looks to be Export.

{id: "12345", currency: 366, invest: 0,…}
charges
: 
[{price: 0, type: "3", startRange: "", endRange: ""}]
currency
: 
366
id
: 
"12345"
invest
: 
0
products
: 
[{direction: 1, ratesThreshold: "15", provider: 1, regionId: 12},…]
0
: 
{direction: 1, ratesThreshold: "15", provider: 1, regionId: 12}
direction
: 
1
provider
: 
1
ratesThreshold
: 
"15"
regionId
: 
12
1
: 
{direction: 0, ratesThreshold: 60, provider: 1, regionId: 12}
direction
: 
0
provider
: 
1
ratesThreshold
: 
60
regionId
: 
12

I have attached a sunsynk automation JSON file I am using. 
The Check Price Node works, and I have entered static information under the Create request; I see Set Status as a success but there is no visible change when I check the web site.

Thank you.

 

 

 

 

 

Auto Price Update Sunsynk.json 8.65 kB · 1 download

I have got this working (on region 1).

I will tidy it up and post the JSON shortly; perhaps @Gary Waterworth you could add it to the templates on github for UK users who want to dynamically set the pricing.

 

  • Author
On 2023/07/18 at 2:26 PM, gimme_power said:

I have one plant, two inverters in parallel. They both show up under the one plant.

Check the invertor list sensor and make sure both serial numbers are there. If so then the index should be fine

6 hours ago, Gary Waterworth said:

Away on a business trip atm. Will look at the posts properly when I am back

 

I added the following into the Setup Global Vars function node on the Sunsynk Gather flow:-

global.set("SS.url.income", global.get("SS.url.hostname") + "/api/v1/plant/" + global.get("SS.Plantid") + "/income");

This could exist in a separate automation script and not the Gather flow as it used for POST requests but to keep everything together I put it in the same place.

-----

I'm still working through the code I bastardised, so far it just updates the import ratesThreshold but it should be easy enough from here to configure other plant information, including the ratesThreshold for export as needed.

I have attached a sample automation node which checks the price of an external sensor then updates the ratesThreshold. For users with variable pricing this could be useful.

For example I have two function nodes; one which finds the cheapest periods during the night and sets the import price accordingly; I also have another one for the day time for when I want to top up the battery from the grid on low solar days. Used in combination with the weather check for grid charge % it's a good way to maximise the cost efficiency.

 

For information purposes (see screenshot). If you chose to enable dynamic pricing from Octopus timer1 is updated every hour to show the current hour, it also automatically enables grid/gen and use timer on both timer1 and timer2.
As this changes every hour automatically, timer2 and beyond are never invoked.
In the screenshot attached the price obtained from the Octopus API is currently greater than ratesThreshold therefore SOC/V is set at 20% automatically. If the price is lower than ratesThreshold then SOC/V is set to 100% automatically (we can later adjust this with your weather check to be even more optimum).
By configuring ratesThreshold using the JSON I have attached based on the prevailing daily rates we can dynamically adjust when SOC/V is set to 100% when it is cheapest to grid charge; otherwise this is a static value and not optimum.

 

sunsynk auto timer.jpg

ratesThreshold automation.json

Edited by randomfool

Refactored the code and outputs to a sensor to compare if we need to make changes.

Pre-Requisites:-

1. Only makes sense if you are using dynamic pricing
2. Ideal for use with Octopus Agile (UK tariff)
3. Right now I only care about the import price; but I will make further additions to account for export pricing
4. I would recommend using this integration and configuring target rate sensor data for half hourly pricing (https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/blob/develop/_docs/setup_target_rate.md)

Just some background info on how I have configured 4. as it's probably the most important part for this to work effectively...For my setup with 10kw batteries I need circa 2.5 hours to charge overnight (3.6kw inverter) and weather dependant 1.5 hours during the mid afternoon before the peak cost starts at around 16:00. I have therefore setup an overnight and daytime sensor which work on intermittent half hourly basis to obtain the best prices. Further to this for the daytime sensor I take the latest period where possible to maximise battery into the evening, and solar is usually better for me mid morning through mid afternoon. Finally; I take the 'overall_max_cost' attribute which is the cheapest highest half hour time segment identified within the period and rounding up to the nearest whole number, you can change this to suit your needs; for me this is to ensure I always get the desired charge time if needed. On a 1.5 hour charge that would be the 1st, 2nd and 3rd lowest identified prices within the desired monitor window e.g. 10am - 4pm.
On some days if solar is good, then the daytime run may not be required but with this automation we can set and forget about it, forever.

Still a few bits to add in:-
1. Add export dynamic pricing
2. Tie in weather for automatic SOC (Gary has done this excellent work already so should be straight forward)

I'll post the final version of it when ready with the above additions for reference purposes in case anyone else wants to use this, but for most the attached should be sufficient.

Auto ratesThreshold.json

Edited by randomfool

  • Author
On 2023/07/23 at 9:00 PM, randomfool said:

I added the following into the Setup Global Vars function node on the Sunsynk Gather flow:-

global.set("SS.url.income", global.get("SS.url.hostname") + "/api/v1/plant/" + global.get("SS.Plantid") + "/income");

This could exist in a separate automation script and not the Gather flow as it used for POST requests but to keep everything together I put it in the same place.

-----

I'm still working through the code I bastardised, so far it just updates the import ratesThreshold but it should be easy enough from here to configure other plant information, including the ratesThreshold for export as needed.

I have attached a sample automation node which checks the price of an external sensor then updates the ratesThreshold. For users with variable pricing this could be useful.

For example I have two function nodes; one which finds the cheapest periods during the night and sets the import price accordingly; I also have another one for the day time for when I want to top up the battery from the grid on low solar days. Used in combination with the weather check for grid charge % it's a good way to maximise the cost efficiency.

 

For information purposes (see screenshot). If you chose to enable dynamic pricing from Octopus timer1 is updated every hour to show the current hour, it also automatically enables grid/gen and use timer on both timer1 and timer2.
As this changes every hour automatically, timer2 and beyond are never invoked.
In the screenshot attached the price obtained from the Octopus API is currently greater than ratesThreshold therefore SOC/V is set at 20% automatically. If the price is lower than ratesThreshold then SOC/V is set to 100% automatically (we can later adjust this with your weather check to be even more optimum).
By configuring ratesThreshold using the JSON I have attached based on the prevailing daily rates we can dynamically adjust when SOC/V is set to 100% when it is cheapest to grid charge; otherwise this is a static value and not optimum.

 

sunsynk auto timer.jpg

ratesThreshold automation.json 12.19 kB · 0 downloads

Just a technical note

Timer 1 should allways be midnight

I have seen problems with the scheduling when this is not the case

On 2023/07/26 at 4:12 AM, Gary Waterworth said:

Just a technical note

Timer 1 should allways be midnight

I have seen problems with the scheduling when this is not the case

Timer1 is automatically updated when Live Pricing is enabled.

  • Author
5 hours ago, randomfool said:

Timer1 is automatically updated when Live Pricing is enabled.

You may need to change this. Sunsynk use to ( probably still has ) a problem with their scheduling when timer 1 is not midnight 

Edited by Gary Waterworth

10 hours ago, slipx said:

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

image.png.31017e6d1f26c6e5b34b67f781062414.png

 

@slipx you are an absolute genius 🙂 ... I have just enabled this and everything has populated. Thank you so much !!

10 hours ago, Gary Waterworth said:

You may need to change this. Sunsynk use to ( probably still has ) a problem with their scheduling when timer 1 is not midnight 

This looks like it might still be an issue, just spoke with one of their support team as had a few issues with it not charging despite being set correctly. This is odd though as when you turn on "Live Price" it automatically starts adjusting timer1  to the current hour so you would have thought this would have been tested.

image.png.05b9b5a38ca13f6bdc0961c00ed46461.png

In other news, the final stage of the Region 2 DC move looks to be going ahead this weekend.

 

Edited by randomfool

After having multiple issues with the temperamental Octopus Agile API used by Sunsynk messing up the timer values and subsequently not functioning as required I have created an entirely new script, this is much improved and having run it now a few days so far working well for me.

Maybe this will be of use to someone else?

Do not enable Live Price in the Sunsynk UI;
You will need to provide a sensor where the script can pull the current price from, a key difference is this can be any energy supplier who provides dynamic pricing, and not restricted to Octopus providing you can get sensor data.

I would recommend cleaning any existing timer values you have setup before running this.

The script will automatically update timer1 to be the current hour every hour based on the system locale defined in HA.
It will check your price sensor and in my case; when the sensor is ON it will set the SOC/V based on the weather and enables Grid Charge.
When the sensor is OFF it changes SOC/V to 25% and disables Grid Charge effectively forcing it to use the battery.
As noted above I have also included the weather check in this script so that the SOC charge % is variable.
All of this can adjust to your needs.
With this script you should be able to set and forget if you are lucky enough to receive dynamic pricing.

 

Sunsynk automation Dynamic Pricing.json

Edited by randomfool

On 2023/07/23 at 2:24 PM, Gary Waterworth said:

Check the invertor list sensor and make sure both serial numbers are there. If so then the index should be fine

Hi Garry, thanks, I managed to get some info. It seems there are differences between what is reported back between the two though. See attached 1) where the value of load for inverter two equals 'Success' while for inverter one it reports a value. Also 2) there are several attributes returned for inverter one but they are not returned for inverter two.

 

2023-08-06_14-14.png

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.