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

 

Nice bit of work

My folks spend 6 months of the year in Margate (we're originally from South Africa) so hear all about it. Being in the UK its all about loading your batteries when the price is cheap but i feel I might need an automation in the summer when solar is high, but the pool needs heating and I need enough battery to keep supplying the house. 😀

 

  • 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

You are using grafana for your charts ?

I prefer apexcharts, but that is all personal preference 

https://community.home-assistant.io/t/apexcharts-card-a-highly-customizable-graph-card/272877

I cut out a lot of charts , although they looked nice , I did really use them and had access to long term data if I needed

Just starting out with sonoff, Need to go still buy units to measure appliance power usage.

I have other projects on the go atm lol, looking at automating and seeing what is available tech wise. I have bluetooth monitoring on my gas bottles for geysers and stoves. Still trying to see what is hackable there. Not very many smart offerings for this atm

I have a borehole 10k L watertank and filtering for teh house ( Another South AFrican special with access to water ) . That still needs to be looked at.

Between saving on water and solar , money spent on both has paid investment off in under 5 years

 

Edited by Gary Waterworth

8 minutes ago, Gary Waterworth said:

You are using grafana for your charts ?

I prefer apexcharts, but that is all personal preference 

https://community.home-assistant.io/t/apexcharts-card-a-highly-customizable-graph-card/272877

No plotly graph cards. 

https://github.com/dbuezas/lovelace-plotly-graph-cardimage.png.22a063587dcdba7b98aa85ab23fb175c.png

Used to use the apex cards but switched the plotly cards mainly as you can scroll backwards and forwards on them to look stuff up beyond the set timeframe of the apex cards.

But I still have some apex cards hidden on my main display for those quick graph glances

image.thumb.png.33c8723e58fef3966beac31030ba8db7.png

Edited by -cK-

All of those power reading on the right are from sonoff devices.  Can't go wrong with them.  I like to use Dual R3's that have power reading you also get the lite version without power reading.  Just be mindfull of the power limit on these smart switches 10a per channel on the Dual R3 (two channels) and an overall 15a if both are pulling power if I'm not mistaken. 

Our vacuum sometimes trip te smart switch when you turn it on with an initial high power spike so I always have an unmonitored plug I can use for these devices that can cause a spike on startup and trip them.

Hence a virtual DB was setup 😆

image.thumb.png.f8eacbde2868aa7455a8c99620c6e388.png

Edited by -cK-

  • Author
16 minutes ago, -cK- said:

All of those power reading on the right are from sonoff devices.  Can't go wrong with them.  I like to use Dual R3's that have power reading you also get the lite version without power reading.  Just be mindfull of the power limit on these smart switches 10a per channel on the Dual R3 (two channels) and an overall 15a if both are pulling power if I'm not mistaken. 

Our vacuum sometimes trip te smart switch when you turn it on with an initial high power spike so I always have an unmonitored plug I can use for these devices that can cause a spike on startup and trip them.

Hence a virtual DB was setup 😆

image.thumb.png.f8eacbde2868aa7455a8c99620c6e388.png

My plan is to get there sometime :D

Just time and money lol

On 2023/12/15 at 10:37 AM, -cK- said:

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 🤞

Interested to see what you come up with automations on bad weather days and the integration you are using for weather, I want to set some automations up as well but not sure if I can trust the weather predictions as it seems all over the place.

My initial setup false triggered so I need to tweak the conditions a bit but think I might just have had my batt and SOC sensors swapped around. 

I'm not using the weather to check conditions but rather the battery level and the PV level at given times.  Because I run on batteries all the time at night I will always have a high PV draw in the mornings to recharge the batteries so my logic will be something like:

At fixed time (say timeslot 2-4 on my SOC's 09:30, 10:00 & 11:00 )

Check if current batt < SOC level

if so check PV

if below 750w and Priority load is on

Call service turn off

energymode

Not perfect but this is kinda what I manually check and make a judgement call on.

alias: Sunsynk Priority Mode
description: Check PV and set Priority Mode [Load/Battery]
trigger:
  - platform: time
    at: "09:30:00"
    id: "09:30"
  - platform: time
    at: "10:00:00"
    id: "10:00"
  - platform: time
    at: "11:00:00"
    id: "11:00"
condition: []
action:
  - if:
      - condition: trigger
        id:
          - "09:30"
      - condition: and
        conditions:
          - condition: numeric_state
            entity_id: sensor.sunsynk_battery_soc_184
            below: sensor.battery_cap
          - condition: numeric_state
            entity_id: sensor.sunsynk_pv_today
            below: 750
          - condition: state
            entity_id: input_boolean.sunsynk_energymode
            state: "on"
    then:
      - service: input_boolean.turn_off
        target:
          entity_id:
            - input_boolean.sunsynk_energymode
          device_id: []
          area_id: []
        data: {}
  - if:
      - condition: trigger
        id:
          - "10:00"
      - condition: and
        conditions:
          - condition: numeric_state
            entity_id: sensor.sunsynk_battery_soc_184
            below: sensor.battery_cap
          - condition: numeric_state
            entity_id: sensor.sunsynk_pv_today
            below: 750
          - condition: state
            entity_id: input_boolean.sunsynk_energymode
            state: "on"
    then:
      - service: input_boolean.turn_off
        target:
          entity_id:
            - input_boolean.sunsynk_energymode
          device_id: []
          area_id: []
        data: {}
  - if:
      - condition: trigger
        id:
          - "11:00"
      - condition: and
        conditions:
          - condition: numeric_state
            entity_id: sensor.sunsynk_battery_soc_184
            below: sensor.battery_cap
          - condition: numeric_state
            entity_id: sensor.sunsynk_pv_today
            below: 1000
          - condition: state
            entity_id: input_boolean.sunsynk_energymode
            state: "on"
    then:
      - service: input_boolean.turn_off
        target:
          entity_id:
            - input_boolean.sunsynk_energymode
          device_id: []
          area_id: []
        data: {}
mode: single

A second automation will just reset the boolean again at midnight back to on

Edited by -cK-

First of all i wanted to say what excellent work you have all done, the integration is great and i have had it running for a few months.

In the UK we have Octopus Agile tariff and there are some specific settings for battery charging and discharging against this 1/2 hourly pricing, these are hidden under the plant list and revenue info.

I would like to automatically update the numbers each night based on the day ahead calculation for the next day, i can calculate the price, but i don't know how i would build this into the node red flow and trigger it to send.

I captured the API call that is sent back to update

 {"id":"262605","currency":366,"invest":10000,"charges":[{"price":0,"type":"3","startRange":"","endRange":""}],"products":[{"direction":1,"ratesThreshold":14.5,"provider":1,"regionId":2},{"direction":0,"ratesThreshold":"52","provider":1,"regionId":2}]}

the two numbers are 14.5 & 52

Any help or pointing me in the right direction would be much appreciated

 

Screenshot 2023-12-19 150020.png

  • Author

It isnt that easy :)

Quite a bit of work to add in new fields to monitor for changes and then code for teh updates. Let me have a look at mine later and see how my revenue info is set up

Been battling with a stoopid update ( true/false ) on the time?on sensors. Website says cool with the updates, but they never reflect

I have also updated teh request headers in the "developement" branch to more accurately reflect what region 2 is now doing

  • Author

You cant just blindly send to teh website continually.

Bad coding and also not good and prone to causing problems.

So effectively need to see how to get teh current state 1st, make sure you are in a sane state ( logger online , updates in last 2 minutes etc and only send if there are changes.

Offhand it looks doable. Headers are slightly different to teh otehr settings requests

image.thumb.png.6714c76bfa8e4e9b183b36bd920a4df9.png

BUT the who settings request layout is a bugger up

It doesnt look like I even pull in the revenue information yet. The way I get the plant information is not teh way they do it to get the revenue information. Going to need to think on this as it could affect a lot of the logic flow I use.

Going to have to see how to handle this

image.png.311ecca90c9c88f454a2acde6883ed83.png

image.png.c9ff963c4189b934411102a76743d0f4.png

image.thumb.png.a0de9d89344ab437abee027a58369721.png

Edited by Gary Waterworth

  • Author
On 2023/12/15 at 7:38 PM, -cK- said:

No plotly graph cards. 

https://github.com/dbuezas/lovelace-plotly-graph-cardimage.png.22a063587dcdba7b98aa85ab23fb175c.png

Used to use the apex cards but switched the plotly cards mainly as you can scroll backwards and forwards on them to look stuff up beyond the set timeframe of the apex cards.

But I still have some apex cards hidden on my main display for those quick graph glances

image.thumb.png.33c8723e58fef3966beac31030ba8db7.png

Trying to sooth out the lines ..

Any ideas  ?

image.png.503e65179c0fcba8f5d7dbd67d79f224.png

  • Author
On 2023/12/18 at 12:00 PM, Ronnie1102 said:

Interested to see what you come up with automations on bad weather days and the integration you are using for weather, I want to set some automations up as well but not sure if I can trust the weather predictions as it seems all over the place.

I use for my weather.

Funny enough I turn off my alarm monitoring on my electric fence for rainy weather. Still get notifications on my HA though

Predictions seem to be ok for me

Signed up for this plan . I stay under the 1000 API calls

image.thumb.png.44d30f01a5eeea4ab207f34e9b43012c.png

 

image.thumb.png.9bb65074fece05d43b6e6f31dd58b706.pngimage.thumb.png.105542a621274b8e9dfd251713fe512a.png

Edited by Gary Waterworth

Also have that OpenWeather integration setup mostly accurate for the Solar prediction, might not be a bad idea to maybe add an additional condition to consider in my automation if the predicted production is also below xKw for the day. 

Should help prevent triggering and switching when one could perhaps still push through without flipping to grid when the weather might pick up a bit later on. 🤔

image.png.d5a841b5c4462c8c9628d126496f4455.png

Already have it showing the current day and next day expected production to help me make decisions on the day if need be.

Edited by -cK-

  • Author
39 minutes ago, -cK- said:

Also have that OpenWeather integration setup mostly accurate for the Solar prediction, might not be a bad idea to maybe add an additional condition to consider in my automation if the predicted production is also below xKw for the day. 

Should help prevent triggering and switching when one could perhaps still push through without flipping to grid when the weather might pick up a bit later on. 🤔

image.png.d5a841b5c4462c8c9628d126496f4455.png

Already have it showing the current day and next day expected production to help me make decisions on the day if need be.

Openweathermap does solar prediction ?

 

Pfft ok , never mind. A paid service and actually quite expensive ( South AFrican terms ) 

image.thumb.png.cddc23d58073520d56e6405e932b4fbb.png

 

Edited by Gary Waterworth

Appoligies those predictions are not from openweathermap but from forecast.solar 🤦‍♂️  image.thumb.png.ea168eaff82d553c54f62261da783ed6.png

I set that up so long ago I forgot what I used.

image.thumb.png.c1e828a0b8d9ca1710c8432c47cf7a0e.png

Edited by -cK-

3 hours ago, Gary Waterworth said:

Trying to sooth out the lines ..

Any ideas  ?

image.png.503e65179c0fcba8f5d7dbd67d79f224.png

The only thing I found so far to smooth out the lines with my limited knowledge of the cards are

shape: spline

image.thumb.png.d2d662f029cb419b2009e524643df5e2.png

image.thumb.png.39b3da60deda0ceebde43ae0d49f74df.png

it doesn't always work though for instance the bottom center if I put spline on the yellow line it looks like this 🤷‍♂️

image.png.4ff5ad8417fce52a1195d8060e031c52.png

Without Spline

image.thumb.png.d6bfde9c0963bf236d2801e1549c1403.png

With spline

image.thumb.png.1c991811d1a8fc2f6a0b4326edaa23a7.png

Edited by -cK-

It might also be useful to add a filter if you are getting drop outs or missing data.

  - entity: sensor.ss_battery_soc_184
    name: |
      $fn ({ ys,meta }) =>
        "SOC" + "" + "(" +ys[ys.length - 1]+"%)"
    yaxis: y2
    line:
      color: red
      width: 1
      shape: spline
    fill: none
    filters:
      - median:
          window_size: 2
          extended: true
          centered: true

I don't like the sliding moving average as it flattens out spikes i.e. if you turn on the kettle for 1 min.

Edited by slipx

  • Author

Other thing I am busy playing with is monitoring for my Gas Bottles.

I have 2 sets of 2 (48kg) , 1 for downstairs ( Kids/Kitchen ) . 1 for upstairs bathroom & kitchen

Using a smart meter called https://www.eyegas.co.za/, rebranded Sonar Powered Tank Monitoring | MopekaIOT

Homeassisant actually picks up the bluetooth updates which is interesting.

Only problem is getting a usb dongle for bluetooth that is actually supported by Home assistant is a royal pain in the arse.

The Pi 3 and Pi 4 as well as intel nuc bluetooths all work. I have been trying to get one that I can put on the end of a 20m usb cable. But yah

Been through 4 x chinese shops in my area and bought 8 dongles with different branding so far lol

The list of unsupported dongles is longer than the supported.

At the moment I have hidden a pi3 with HA on setup as a remote unit behind a cupboard in my sons room that is near the 1 set of bottles on the opposite side of the wall. My main HA can see the other set of bottles.

 

Graphs are just rough for now. Will make things nice and pretty

image.thumb.png.32dcf312860160c6b76115ffd4e07799.png

 

 

 

 

 

Edited by Gary Waterworth

14 hours ago, Gary Waterworth said:

Other thing I am busy playing with is monitoring for my Gas Bottles.

I have 2 sets of 2 (48kg) , 1 for downstairs ( Kids/Kitchen ) . 1 for upstairs bathroom & kitchen

Using a smart meter called https://www.eyegas.co.za/, rebranded Sonar Powered Tank Monitoring | MopekaIOT

Homeassisant actually picks up the bluetooth updates which is interesting.

Only problem is getting a usb dongle for bluetooth that is actually supported by Home assistant is a royal pain in the arse.

The Pi 3 and Pi 4 as well as intel nuc bluetooths all work. I have been trying to get one that I can put on the end of a 20m usb cable. But yah

Been through 4 x chinese shops in my area and bought 8 dongles with different branding so far lol

The list of unsupported dongles is longer than the supported.

At the moment I have hidden a pi3 with HA on setup as a remote unit behind a cupboard in my sons room that is near the 1 set of bottles on the opposite side of the wall. My main HA can see the other set of bottles.

 

Graphs are just rough for now. Will make things nice and pretty

image.thumb.png.32dcf312860160c6b76115ffd4e07799.png

 

 

 

 

 

What about BLE proxy on ESP32?

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.