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

  • Author
7 hours ago, Lloyd said:

Hi Gary, i have gone through the entire process.

1. Added Configuration.yaml sensors, added credentials etc.

2. Imported nodered flows

3. Created longlife token and added key

The debug shows an error when trying to update the sensors, message as follows:

"hass-post error: Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: Host: localhost. is not in the cert's altnames: DNS:mydomainname.duckdns.org"

It does appear to a Cert error, any advice on how to fix. 

Also, it does show that Nodered is connected to HA.

 

homeAssistant: object

states: object
services: object
isConnected: true
isRunning: true
 
I'm a bit stuck on this last part now.

When you put in the longlife token, did you change the endpoint from http to https 

You cannot use https unless you have proper certificates configured

  • Replies 948
  • Views 135.1k
  • 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

Looking for a bit of help. Unsure where I am going wrong...

I can see the values below in the sensor.sunsynk_battery template, I am trying to create a sensor for each of these attributes.

 

image.png.62830011f811c4d9debf9f02c6303d60.png

 

This is the yaml template I am using to get the data; this works for the etotalchg but not etodaychg

  - sensor:
      - name: "Sunsynk Battery Charge Today"
        state_class: total_increasing
        unique_id: "sensor.sunsynk_battery_etodaychg"
        device_class: energy
        unit_of_measurement: kWh
        state: >
            {{state_attr('sensor.sunsynk_battery', 'etodaychg')|float}}

I have also tried to create just the sensor to get the data; this also fails.

  - sensor:
      - name: "Sunsynk Battery Charge Today"
        state: >
            {{state_attr('sensor.sunsynk_battery', 'etodaychg')|float}}

I see these errors in the log file, however this is the same with many other sensors and has previously been discussed so not sure this is of any value.

TemplateError('ValueError: Template error: float got invalid input 'None' when rendering template '{{state_attr('sensor.sunsynk_battery', 'etodaychg')|float}}' but no default was specified') while processing template 'Template("{{state_attr('sensor.sunsynk_battery', 'etodaychg')|float}}")' for attribute '_attr_native_value' in entity 'sensor.sunsynk_battery_charge_today'

I am unsure where I am going wrong; any ideas HA experts?

Thanks

Edited by randomfool

  • Author
11 minutes ago, randomfool said:

Looking for a bit of help. Unsure where I am going wrong...

I can see the values below in the sensor.sunsynk_battery template, I am trying to create a sensor for each of these attributes.

 

image.png.62830011f811c4d9debf9f02c6303d60.png

 

This is the yaml template I am using to get the data; this works for the etotalchg but not etodaychg

  - sensor:
      - name: "Sunsynk Battery Charge Today"
        state_class: total_increasing
        unique_id: "sensor.sunsynk_battery_etodaychg"
        device_class: energy
        unit_of_measurement: kWh
        state: >
            {{state_attr('sensor.sunsynk_battery', 'etodaychg')|float}}

I have also tried to create just the sensor to get the data; this also fails.

  - sensor:
      - name: "Sunsynk Battery Charge Today"
        state: >
            {{state_attr('sensor.sunsynk_battery', 'etodaychg')|float}}

I see these errors in the log file, however this is the same with many other sensors and has previously been discussed so not sure this is of any value.

TemplateError('ValueError: Template error: float got invalid input 'None' when rendering template '{{state_attr('sensor.sunsynk_battery', 'etodaychg')|float}}' but no default was specified') while processing template 'Template("{{state_attr('sensor.sunsynk_battery', 'etodaychg')|float}}")' for attribute '_attr_native_value' in entity 'sensor.sunsynk_battery_charge_today'

I am unsure where I am going wrong; any ideas HA experts?

Thanks

 

etodayChg  - Capital C

Case matters :)

Edited by Gary Waterworth

On 2023/04/03 at 1:28 PM, Gary Waterworth said:

 

etodayChg  - Capital C

Case matters :)

I thought I had fixed this; but apparently not. Made it case sensitive and no change.

  - sensor:
      - name: "Sunsynk Battery etodaychg"
        state_class: total_increasing
        unique_id: "sensor.sunsynk_battery_etodaychg"
        device_class: energy
        unit_of_measurement: kWh
        state: >
            {{state_attr('sensor.sunsynk_battery', 'EtodayChg')|float}}

 I have also tried

  - sensor:
      - name: "Sunsynk Battery Charge Today"
        state: >
            {{state_attr('sensor.sunsynk_battery', 'EtodayChg')|float(0)}}

Still unsure what I am doing wrong.

image.png.6b64270324255336cd36c7bcd789233b.png

 

Edited by randomfool

  • Author
On 2023/04/03 at 3:24 PM, randomfool said:

I thought I had fixed this; but apparently not. Made it case sensitive and no change.

  - sensor:
      - name: "Sunsynk Battery etodaychg"
        state_class: total_increasing
        unique_id: "sensor.sunsynk_battery_etodaychg"
        device_class: energy
        unit_of_measurement: kWh
        state: >
            {{state_attr('sensor.sunsynk_battery', 'EtodayChg')|float}}

 I have also tried

  - sensor:
      - name: "Sunsynk Battery Charge Today"
        state: >
            {{state_attr('sensor.sunsynk_battery', 'EtodayChg')|float(0)}}

Still unsure what I am doing wrong.

image.png.6b64270324255336cd36c7bcd789233b.png

 

Paste the sunsynk_battery sensor attributes and values

dont use float(0). That will create issues in the graphs

Use float by itself

Eg :

image.png.0e75e5f62e25c060e0aee915de210dcd.png

Edited by Gary Waterworth

On 2023/04/03 at 3:24 PM, randomfool said:

Still unsure what I am doing wrong.

Go to developer tools -> states ... filter for sensor.sunsynk_battery

no look at the attributes

 

you are expecting a EtodayChg... since the state_attr  refers to the attribute for an entity

image.thumb.png.700404b102d676ef5d40110e96069b6d.png

time: Missing
etodayChg: '11.4'
etodayDischg: '2.6'
emonthChg: '61.1'
emonthDischg: '49.0'
eyearChg: '446.1'
eyearDischg: '404.2'
etotalChg: '405.7'
etotalDischg: '365.3'
type: 1
power: 325
capacity: 200
correctCap: 200
current: 6.1
voltage: 53.2
temp: 19
soc: 99
chargeVolt: 57.6
dischargeVolt: 0
chargeCurrentLimit: 21
dischargeCurrentLimit: 192
maxChargeCurrentLimit: 0
maxDischargeCurrentLimit: 0
bms1Version1: 0
bms1Version2: 0
current2: Missing
voltage2: Missing
temp2: Missing
soc2: Missing
chargeVolt2: Missing
dischargeVolt2: Missing
chargeCurrentLimit2: Missing
dischargeCurrentLimit2: Missing
maxChargeCurrentLimit2: Missing
maxDischargeCurrentLimit2: Missing
bms2Version1: Missing
bms2Version2: Missing
status: 2
batterySoc1: 0
batteryCurrent1: 0
batteryVolt1: 0
batteryPower1: 0
batteryTemp1: 0
batteryStatus2: 0
batterySoc2: Missing
batteryCurrent2: Missing
batteryVolt2: Missing
batteryPower2: Missing
batteryTemp2: Missing
numberOfBatteries: Missing
batt1Factory: Missing
batt2Factory: Missing
correctcapacity: 200
etotalchg: 405.7
etotaldischg: 365.3

 

I think I have just fixed it and noticed what is wrong.

In the attributes when you look at "Entities" it shows for example "EtodayChg", but the attribute when you go to Developer Tools and States shows "etodayChg". I was not aware it would be different and did not know the Developer Tools State Attributes could differ from the entities attribute values.

Edited by 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 below for others to use when I have ported all of the sensors and fixed the various layout issues and CSS irregularities. I have integrated the Automation and Events card on the right hand side. Still need to fix the System Timer and some other parts but will get on to that.

image.thumb.png.f5bbc4aa72a1df547f3f019687d60e9f.png

Edited by randomfool

On 2023/04/06 at 5:09 PM, randomfool said:

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 below for others to use when I have ported all of the sensors and fixed the various layout issues and CSS irregularities. I have integrated the Automation and Events card on the right hand side. Still need to fix the System Timer and some other parts but will get on to that.

image.thumb.png.f5bbc4aa72a1df547f3f019687d60e9f.png

I'm digging this layout think this will work brilliant for a wall mount tablet 👌 (something on my roadmap down the line)

33 minutes ago, -cK- said:

I'm digging this layout think this will work brilliant for a wall mount tablet 👌 (something on my roadmap down the line)

It just needs a few minor visual edits then it's ready to share. On holiday this week so dont have much time to look at it.

I will share where I am at later tonight, everything now works. Got the inverter status and using the same timer layout slip06x uses.

I was planning on integrating the Octupus Agile Dashboard rates card for UK users but I've not done yet.

You'll require a slightly modified configuration.yaml to go with this dashboard.

 

 

Edited by 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 "support" will be limited. I am more than happy for any of this work to be updated and improved upon and added to any github to help others as needed. I will be making many other changes to suit my specific needs (e.g. integrating Octupus Agile automations and cards); have left this largely vanilla so you can customise to your own specific requirements.

All of that said; attached is the modified slip06x Sunsynk dashboard; I have made a few changes:-

  • Removed load shedding as it's not applicable to the UK
  • Moved some of the cards around; dropped the energy cards from the bottom as I felt they were a duplication although I may add them back in at a later date.
  • Today's graph focuses on last 6 hours; not 24 hour period (scroll still enabled). I'm still playing around with this and may change to 12 hours but for the UK a 24 hour period didn't look right to me.
  • Integrated Gary's Time Left to Discharge - this requires the Sunsynk automation flows Gary provided on his github.
  • Added the event card and integrated the timer card; note the "Override Mode" currently does nothing; and I will probably change this around in the coming months to better suit my needs.
  • Only 2 grid layouts; desktop (I am using 2560x1440 and it aligns perfectly) and mobile/tablet 800px - you will need to modify to suit your needs. 
  • You will need to add the additions below to your configuration.yaml or equivalent.
- sensor:
      - name: "Sunsynk PV Today"
        state_class: total_increasing
        unique_id: "sensor.sunsynk_pv_today"
        device_class: energy
        unit_of_measurement: kWh
        state: >
            {{state_attr('sensor.sunsynk_input', 'etoday')|float}}
  - sensor:
      - name: "Sunsynk Battery etodaychg"
        state_class: total_increasing
        unique_id: "sensor.sunsynk_battery_etodaychg"
        device_class: energy
        unit_of_measurement: kWh
        state: >
            {{state_attr('sensor.sunsynk_battery', 'etodayChg')|float}}
  - sensor:
      - name: "Sunsynk Battery etodaydischg"
        state_class: total_increasing
        unique_id: "sensor.sunsynk_battery_etodaydischg"
        device_class: energy
        unit_of_measurement: kWh
        state: >
            {{state_attr('sensor.sunsynk_battery', 'etodayDischg')|float}}
  - sensor:
      - name: "Sunsynk Grid Export Today"
        state_class: total_increasing
        unique_id: "sensor.sunsynk_grid_export_today"
        device_class: energy
        unit_of_measurement: kWh
        state: >
            {{state_attr('sensor.sunsynk_grid', 'etodayTo')|float}}
  - 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_grid', 'etodayFrom')|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_grid', 'etotalTo')|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_load', 'dailyUsed')|float}}

Screenshots (Monthly Production missing from screenshots below but it is included on the dashboard, there is just no data as yet so I have not posted it):-

image.thumb.png.b10b56af093b9fb4482b924f3a734497.png

image.thumb.png.2d1c49e85a5cce68f0ae26be8e72d98a.png

 

 

Sunsynk.yaml

Edited by randomfool

Thank you @randomfool

Just a little note to other, you will need some custom cards for this to work, here are the lot I was told I was missing when loading this up 😉

Layout-Card

Flexable Horseshoe Card

Plotly Graph Card

 

Will play around with it a bit and try to amend to fit my needs 👍

 

Just want to confirm the 3 bottom graphs are those based on the sensors that was just added in the config?  Asking as mine is blank at the moment so if it is based of the new sensors that will make sense why it is blank.

 

Will also see if I can figure it out how to swap out the SunSynk Automations for the loadshedding Calender as I don't use the automation of Gary just the gathering, pretty new to all of this myself and only google/youtube educated in HA 😅

image.thumb.png.c81cdad51673220a790c858205b4d648.png

Whoops just saw I need to go set my SOC back to normal (had 2 bad weather days so had to run long and deep to stay off grid)

image.thumb.png.ca75f95aec20854a97b342585c70cd29.png

Edited by -cK-

9 minutes ago, -cK- said:

Thank you @randomfool

Just a little note to other, you will need some custom cards for this to work, here are the lot I was told I was missing when loading this up 😉

Layout-Card

Flexable Horseshoe Card

Plotly Graph Card

 

Will play around with it a bit and try to amend to fit my needs 👍

 

Just want to confirm the 3 bottom graphs are those based on the sensors that was just added in the config?  Asking as mine is blank at the moment so if it is based of the new sensors that will make sense why it is blank.

 

Will also see if I can figure it out how to swap out the SunSynk Automations for the loadshedding Calender as I don't use the automation of Gary just the gathering, pretty new to all of this myself and only google/youtube educated in HA 😅

image.thumb.png.c81cdad51673220a790c858205b4d648.png

Whoops just saw I need to go set my SOC back to normal (had 2 bad weather days so had to run long and deep to stay off grid)

image.thumb.png.ca75f95aec20854a97b342585c70cd29.png

9 minutes ago, -cK- said:

Thank you @randomfool

Just a little note to other, you will need some custom cards for this to work, here are the lot I was told I was missing when loading this up 😉

Layout-Card

Flexable Horseshoe Card

Plotly Graph Card

 

Will play around with it a bit and try to amend to fit my needs 👍

 

Just want to confirm the 3 bottom graphs are those based on the sensors that was just added in the config?  Asking as mine is blank at the moment so if it is based of the new sensors that will make sense why it is blank.

 

Will also see if I can figure it out how to swap out the SunSynk Automations for the loadshedding Calender as I don't use the automation of Gary just the gathering, pretty new to all of this myself and only google/youtube educated in HA 😅

image.thumb.png.c81cdad51673220a790c858205b4d648.png

Whoops just saw I need to go set my SOC back to normal (had 2 bad weather days so had to run long and deep to stay off grid)

image.thumb.png.ca75f95aec20854a97b342585c70cd29.png

Glad to see it's working for you. Re the daily and total that should populate tomorrow then onwards will work as expected (that's what happened for me anyway).

Monthly still has not populated anything for me, waiting until May to determine if there is an issue or not.

The cards for automations is grid-layout  "ssauto".

 

24 minutes ago, randomfool said:

Glad to see it's working for you. Re the daily and total that should populate tomorrow then onwards will work as expected (that's what happened for me anyway).

Monthly still has not populated anything for me, waiting until May to determine if there is an issue or not.

The cards for automations is grid-layout  "ssauto".

 

Thanks, managed to shuffle in my loadshedding calendar into that spot 👌

image.thumb.png.70b59d9d784a05c43ba2d7a6c4b12b90.png

Edited by -cK-

2 hours ago, randomfool said:

Glad to see it's working for you. Re the daily and total that should populate tomorrow then onwards will work as expected (that's what happened for me anyway).

Monthly still has not populated anything for me, waiting until May to determine if there is an issue or not.

The cards for automations is grid-layout  "ssauto".

 

The monthly card should update each day but you need to use the right sensor i.e daily totals. It fetches HA statistics, calculating the delta between the daily totals of two consecutive days and then summing them.

      - entity: sensor.daily_load_power_kwh
        statistic: sum
        name: |
          $fn ({ ys,meta }) =>
            "Load" + ""
        period: month
        type: bar
        filters:
          - delta
        texttemplate: '%{y}'
        marker:
          color: rgb(95, 182, 173)

 

On 2023/03/20 at 9:18 AM, Gary Waterworth said:

Thanks. Will definately make use of that 

Two thing I added in on mine

1. Temperature of Battery Stack

2. Predicted time battery will last till 20% soc on current usage with no other power available. 

I used a function node, so the code is based on javascript

 

if ( soc < socmin )
{ ttime = "Battery Below " + socmin +"%" } else
{
 var secondstemp = 0;
 var soctemp = 0;
 secondstemp = ((((soc - socmin) / 100 * totalw) / (load + 60)) * 60 * 60);
 
// (load + 60) -- The +60 is for power used internally by the sunsynk invertor 
// socmin is the 20% minimum 
 
 var thours = parseInt((secondstemp / (60*60)));
 var tminutes = (secondstemp / 60) - (thours*60);
 var ttime ="";
  if ((tminutes <= 1) && ( thours === 0))
 {
   ttime = " Less than 1 Minute "
 } else if ( thours === 0 )
 {
   ttime = tminutes.toFixed(0) + " Minutes Left" ;
 } else
 {
   ttime = thours + " Hour(s) " + tminutes.toFixed(0) + " Minutes Left";
 }
}
 

 

Been thinking about adding this to the card. Here is another way to calculate using a sensor template in HA for those who don't use Node Red

- platform: template
  sensors:
    soc_battery_time_left:
      friendly_name: "Battery Depletion Seconds"
      unit_of_measurement: Seconds
      value_template: "{{ ((((states('sensor.battery_soc') | float - 20) /100) * 15960) / ((states('sensor.load_power') | float + 60 ) | float) * 60 * 60 ) | timestamp_custom('%s', 0)}}"
    soc_battery_time_left_friendly:
      friendly_name: "Battery Depletion Time"
      value_template: >
        {% set time = states('sensor.soc_battery_time_left') | int %}
        {%- set minutes = ((time % 3600) // 60) %}
        {%- set minutes = '{} minutes'.format(minutes) if minutes > 0 else '' %}
        {%- set hours = ((time % 86400) // 3600) %}
        {%- set hours = '{} hours, '.format(hours) if hours > 0 else '' %}
        {%- set days = (time // 86400) %}
        {%- set days = '{} day, '.format(days) if days > 0 else '' %}
        {{ 'Less than 1 minute' if time < 60 else days + hours + minutes }}

15960 = Battery capacity in Wh (Update to match your battery size)

20 = Minimum SOC

Added 60W as per your logic to cater for inverter self power

Probably add it to my load shedding card 

image.png.0e63db1a96e357fc7e2e9a39eba220f9.png

Edited by slipx

  • Author
16 hours ago, slipx said:

Been thinking about adding this to the card. Here is another way to calculate using a sensor template in HA for those who don't use Node Red

- platform: template
  sensors:
    soc_battery_time_left:
      friendly_name: "Battery Depletion Seconds"
      unit_of_measurement: Seconds
      value_template: "{{ ((((states('sensor.battery_soc') | float - 20) /100) * 15960) / ((states('sensor.load_power') | float + 60 ) | float) * 60 * 60 ) | timestamp_custom('%s', 0)}}"
    soc_battery_time_left_friendly:
      friendly_name: "Battery Depletion Time"
      value_template: >
        {% set time = states('sensor.soc_battery_time_left') | int %}
        {%- set minutes = ((time % 3600) // 60) %}
        {%- set minutes = '{} minutes'.format(minutes) if minutes > 0 else '' %}
        {%- set hours = ((time % 86400) // 3600) %}
        {%- set hours = '{} hours, '.format(hours) if hours > 0 else '' %}
        {%- set days = (time // 86400) %}
        {%- set days = '{} day, '.format(days) if days > 0 else '' %}
        {{ 'Less than 1 minute' if time < 60 else days + hours + minutes }}

15960 = Battery capacity in Wh (Update to match your battery size)

20 = Minimum SOC

Added 60W as per your logic to cater for inverter self power

Probably add it to my load shedding card 

image.png.0e63db1a96e357fc7e2e9a39eba220f9.png

Will have a look at including this in the templates. One less thing to do in Node Red then

 

Made some changes to the template sensor. It makes more sense to look at the battery output power instead of the load. If the battery power is positive it calculates the remaining battery time based on how much battery power is being consumed. If battery power is negative the batteries are being charged and assumes there is sufficient solar to cover the load and charge batteries

- platform: template
  sensors:
    soc_battery_time_left:
      friendly_name: "Battery Depletion Seconds"
      unit_of_measurement: Seconds
      value_template: >
        {% set state = states('sensor.battery_output_power') | int %}
        {% if state == 0 -%}
         {{ ((((states('sensor.battery_soc') | float - 20) /100) * 10640) / (1) * 60 * 60 ) | timestamp_custom('%s', 0) }}
        {%- else -%}
         {{ ((((states('sensor.battery_soc') | float - 20) /100) * 10640) / (states('sensor.battery_output_power') | float) * 60 * 60 ) | timestamp_custom('%s', 0) }}
        {%- endif %}
    soc_battery_time_left_friendly:
      friendly_name: "Battery Depletion Time"
      value_template: >
        {% set state = states('sensor.battery_output_power') | int %}
        {% if state > 0 -%}
         {%- set time = states('sensor.soc_battery_time_left') | int %}
         {%- set minutes = ((time % 3600) // 60) %}
         {%- set minutes = '{} minutes'.format(minutes) if minutes > 0 else '' %}
         {%- set hours = ((time % 86400) // 3600) %}
         {%- set hours = '{} hours, '.format(hours) if hours > 0 else '' %}
         {%- set days = (time // 86400) %}
         {%- set days = '{} day, '.format(days) if days > 0 else '' %}
         {{ 'Less than 1 minute' if time < 60 else days + hours + minutes }}
        {%- else -%}
         {{ 'Running on solar power' }}
        {%- endif %}

I've created a markup card that changes based on the conditions

{% set soc1 = states('sensor.soc_battery_time_left_friendly') %}
{% set load1 = states('sensor.load_power') %}
{% set socsec1 = states('sensor.soc_battery_time_left') | int %}
{% set state = states('sensor.battery_output_power') | int %}
{% if state <= 0 -%}
  <ha-alert alert-type="success">{{ soc1 }} at current ({{load1}} W) load</ha-alert>
{% else %}
  {% if socsec1 > 21601 %}
  <ha-alert alert-type="success"> Battery runtime is {{ soc1 }} at current ({{state}} W) battery load</ha-alert>
  {% elif 10800 < socsec1 <= 21600 %}
  <ha-alert alert-type="warning">Battery runtime is {{ soc1 }} at current ({{state}} W) battery load</ha-alert>     
  {% elif socsec1 <= 10800 %}
  <ha-alert alert-type="error"> Battery runtime is {{ soc1 }} at current ({{state}} W) battery load</ha-alert>
  {% endif %}
{% endif %}

 

image.png.9e141ac4ccd35a00aba98e412aa01736.png

image.png.0326546038f9d0e6592e557f13b7758e.png

image.png.2189a3586634589352479e92611bc821.png

 

Edited by slipx
Updated the sensor to work when battery load is 0

  • Author

I use both

Based on current load : Gives me a reading of how long the battery will last to 20% soc under current load if all power drops

Based on battery load : How long battery will last if it is currently discharging

 

Thank you so much for all the hard work Gary.

I'm sitting at the same point now as CK, etc earlier.

I'm also stuck at the get bearer token node - account or password error. I have confirmed Region1. Also complete noob. been using HA, Linux and NodeRed for 3 days, I can edit script but can't write it.

PLEASE help

On 2023/04/16 at 11:23 PM, slipx said:

The monthly card should update each day but you need to use the right sensor i.e daily totals. It fetches HA statistics, calculating the delta between the daily totals of two consecutive days and then summing them.

      - entity: sensor.daily_load_power_kwh
        statistic: sum
        name: |
          $fn ({ ys,meta }) =>
            "Load" + ""
        period: month
        type: bar
        filters:
          - delta
        texttemplate: '%{y}'
        marker:
          color: rgb(95, 182, 173)

 

Trying to figure out why the monthly card isn't populating because to me it looks like it is pointing to the daily totals and if I understand slipx correctly it should update daily and then at the end of the month you end up with your montly total?

Any ideas what the issue might be

image.thumb.png.3d4881e5e27b4481a1af26b3e08f92b2.png

image.thumb.png.8ca4cb053a6063373a470dd2dad7cd22.png

On 2023/03/26 at 8:57 AM, -cK- said:

I just updated to the latest itteration and can confirm everything is working.

Lets just check that you did everything you should haved (I'm no expert just gonna list what I do to get things working)

1) you've imported the template.txt. to the configuration.yaml with your login details.

2) you've restarted home assitant

3) you've have installed node-red-contrib-hass under manage palette

4) you've imported the garther file SunSynk Gather Flow.json

5) you have added the long life token to the  image

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

6) you've deployed the node image.png.021f52d62d82173632052d573b8a72d3.png (if it isn't deployed it will be red, if deployed it is grey like this)

This should get things up and running.

 

@SteveRCT can you just confirm you went through all of the above steps

Just note Gary did update the wiki for point 5 to a different node to enter the long life token (that reply was still based on one of the previous itterations of his code that was a bit differrent but steps otherwise should be the same)

Just trying to help eliminate any possible oversights in the install as you stated you are pretty new to HA 😉

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.