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.

Home Assistant Sunsynk Power Flow Card and Dashboard

Featured Replies

23 hours ago, Patrick OReilly said:

Right now, I'm only getting updates every 5 minutes using the integration from @kellerza. This is fine for monitoring and supporting some automations about when to run my geyser. But I'll be looking into the local direct integration options using the RS485 as soon as I get a chance.

Did you try reading more often from your Solarman dongle? You should be able to do 15 seconds read/60seconds report - https://kellerza.github.io/sunsynk/reference/schedules#proposed-schedule-overrides-for-solarman

With RS485 I read every 1/2 seconds and report every 60 seconds.

  • Replies 592
  • Views 130.4k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • thank you @slipx, I've been using the power flow card for a while now but didn't know about the animations. now thanks your examples I've implemented the animations. I use a generator on my AUX port

  • I've made  a small update to the Dashboard. The load shedding card shows remaining time based on battery SOC and battery power. You will need to create some template sensors as discussed here and prov

  • Here's a slight contribution to the goodness on this thread which lives on my main HA screen: type: custom:bar-card entities: - entity: sensor.load_shedding_area_eskde_4_sandownext10cityofj

Posted Images

On 2023/11/20 at 8:18 AM, Deondup said:

@spotity Did you manage to get the mappings? I do know that the mappings for Solar Assistant (SA) can be found on Github at https://github.com/slipx06/sunsynk-power-flow-card/blob/master/docs/examples/sunsynk.rst. What I'm battling with is that the totals sent via MQTT from SA is weekly, as it resets on a Monday. How do you get daily totals, as an example below. It rolls up into 7 days (Monday to Sunday), hence it is not a daily total. I tried Utility meters on example measured in W, not kW. The results are completely incorrect. What I really need to see, back in the Sunsync card is the same as the totals from SA as per last screenshot. Any ideas?

day_load_energy_84: sensor.sunsynk_day_load_energy

 

 

image.png

image.png.b00f7997b91868cb19d374ac1772f787.png

 

@Deondup Yes have it all working - 

You need to use utility meters, 

Under Settings > Device & Services > Helpers 
image.thumb.png.59ede8a71467c5c9a499a1be8faf8e09.png

Click Create "New Helper" > Select Utility Meter 

Can then define the period - ensure you leave "Periodic Resetting" Enabled. 

Let me know if you don't come right. 

 

image.thumb.png.3c0aeb73b8e1835c2f54e2f7b887276c.png

Edited by spotity

Hi @spotity I did use the helpers, as per screenshot in my post. What I don't have is the periodically reseting; will try that. I also added a sensor to convert the Wh to kWh. The numbers I get however from these sensors and helpers are completely out of whack, and doesn't tie up with what I was expecting as per Solar Assistant. See below comparison, I was  expecting to see for today (21 Nov) 9.1kWh, I got 144.95kWh. This is all retrieved from sensor.sunsync_load_power in the Helper.

1. The Helper (without period reset, which I'll try - thanks!)

image.png.6c0d63ecd440b818bf9a934c8d68f72a.png

2. The sensor converted to kWh

image.png.a75522de8fd7654226269427ceecdaa5.png

 

3. In Solar Assist

image.png.9a0914326ec6d5aeccafe97ffab8a9d9.png

On 2023/11/20 at 12:18 PM, kellerza said:

Did you try reading more often from your Solarman dongle? You should be able to do 15 seconds read/60seconds report - https://kellerza.github.io/sunsynk/reference/schedules#proposed-schedule-overrides-for-solarman

With RS485 I read every 1/2 seconds and report every 60 seconds.

@kellerza - apologies, I wrote nonsense. 

My original installation is not yours - it is the work by @Gary Waterworth, which uses the Sunsynk cloud to read the status of the inverter every ~5 minutes. This is currently running with the Power Flow card from @slipx. I have enjoyed learning a lot about HA and node-red while mapping these two add-ons to work together.

I have been looking at your work for so long that I conflated it with what I originally installed.  My plan is to go with your add-on using the RS485-USB connection to my HA. I just have to get the bits of hardware and wiring organized, and then I'll be using your add-on to move to real-time data, and thus much more responsive control of my non-essential loads (i.e. geyser) based on PV vs. load, etc. And, of course, the ability to write to the inverter to adjust behavior around load shedding, poor weather, etc.

Thanks to all you guys who share so much with those of us who are still learning.  Perhaps one day I'll be in a position to share something too.

Edited by Patrick OReilly

21 hours ago, Deondup said:

Hi @spotity I did use the helpers, as per screenshot in my post. What I don't have is the periodically reseting; will try that. I also added a sensor to convert the Wh to kWh. The numbers I get however from these sensors and helpers are completely out of whack, and doesn't tie up with what I was expecting as per Solar Assistant. See below comparison, I was  expecting to see for today (21 Nov) 9.1kWh, I got 144.95kWh. This is all retrieved from sensor.sunsync_load_power in the Helper.

1. The Helper (without period reset, which I'll try - thanks!)

image.png.6c0d63ecd440b818bf9a934c8d68f72a.png

2. The sensor converted to kWh

image.png.a75522de8fd7654226269427ceecdaa5.png

 

3. In Solar Assist

image.png.9a0914326ec6d5aeccafe97ffab8a9d9.png

You shouldn't need to convert to kWh it should already 

image.thumb.png.60de6ebc3af6f4594d6010beb1463184.png

 

Heres mine for PV_Today (Important to make sure your timezone and date/time are set as well!) 

image.thumb.png.dc7f3907ee05d2abc64bb13386550f1c.png

Here's load - 

image.thumb.png.15eff8471e76c7d9a4083d8df6cff298.png

 

image.thumb.png.f983f6a067e0d5c1df8c44ef6d846fe3.png

Edited by spotity

7 hours ago, spotity said:

You shouldn't need to convert to kWh it should already 

image.thumb.png.60de6ebc3af6f4594d6010beb1463184.png

 

Heres mine for PV_Today (Important to make sure your timezone and date/time are set as well!) 

image.thumb.png.dc7f3907ee05d2abc64bb13386550f1c.png

Here's load - 

image.thumb.png.15eff8471e76c7d9a4083d8df6cff298.png

 

image.thumb.png.f983f6a067e0d5c1df8c44ef6d846fe3.png

Thanks that is the solution. Although the energy sensors totals up to a week, with reset on Monday, your suggestion of Daily Utility Meter, and forced reset is the key. I have adapted my sensors, will see how it turns out tomorrow. On another note I see that the 2024-11-22 Beta of Solar assistant claims configuration of when totals are reset. I can't see anything on either HA or MQTTExplorer though. For now your solution is great, thanks !

 

https://solar-assistant.io/help/updates/changelog

image.png.5565d70fbececb5149ede1676c17506b.png

 

Hey @slipx

Quick Q: Are you able to share what the hex colour code is for the grid visuals?
(I'd like to match the blue with the blue on the load shedding schedule on the left)
image.thumb.png.22b5a95da7ff83df5d9e28dce7988a1b.png

Also, happy to share the code for this if anyone is interested :)

15 minutes ago, Deondup said:

@Muttley Yes please do share your code.

Can't take the credit for this.
See here: Link (assuming you have the Load Shedding by Wernerhp add-on already running)

You'll basically need:

  • His load shedding add-on
  • Lovelace HTML Jinja2 Template card - found in HACS front end
  • This code (with your loadshedding area):

(line 77 changes the colour of the blue bars)

type: custom:html-template-card
ignore_line_breaks: true
content: >
  {% set area_sensor =
  "sensor.load_shedding_area_eskde_4_sandownext10cityofjohannesburggauteng" %}
  {% set number_of_days = 5 %} {% set show_day_borders = false %} {% set
  show_end_times = true %} {% set timeslots = 48 %} <style>
      @media (prefers-color-scheme: light) {
          {% if show_day_borders %}
          .day_container {
              background-color: #fbeff3 !important;
          }
          {% endif %}

          .current_time_indicator_text,
          .current_slot_indicator_start_text,
          .current_slot_indicator_end_text {
              color: #785551 !important;
          }

          .current_time_indicator,
          .current_slot_indicator_start,
          .current_slot_indicator_end {
              background-color: #785551 !important;
          }

          .slot {
              background-color: #66FF99 !important;
          }
      }

      .day_container {
          {% if show_day_borders %}
          background-color: #2b2120;
          border-radius: 0.75rem;
          {% endif %}
          padding-top: 0.5rem;
          padding-bottom: 1.75rem;
          margin: 0.25rem 0;
      }

      h3.day_heading,
      .current_time_indicator_text,
      .current_slot_indicator_start_text,
      .current_slot_indicator_end_text {
          font-family: Roboto, Ubuntu, sans-serif;
          font-weight: 600;
      }

      h3.day_heading {
          font-size: 1.0rem;
          margin: 0 0 0 1rem;
      }

      .slot_container {
          display: grid;
          grid-template-columns: repeat({{ timeslots }}, 1fr);
          gap: 0.0725rem;
          width: calc(100% - 2rem);
          margin: 0 1rem;
          line-height: 0.9375rem;
          position: relative;
      }

      .slot_container .slot:first-of-type {
          border-radius: 15%;

      }

      .slot_container .slot:last-of-type {
          border-radius: 15%;

      }

      .slot {
          border-radius: 15%;
          background-color: #3399FF;
      }

      .active_slot_stage_1 {
          background-color: #f6a829 !important;
      }

      .active_slot_stage_2 {
          background-color: #f8980d !important;
      }

      .active_slot_stage_3 {
          background-color: #e66e0e !important;
      }

      .active_slot_stage_4 {
          background-color: #e3493f !important;
      }

      .active_slot_stage_5 {
          background-color: #d93e3d !important;
      }

      .active_slot_stage_6 {
          background-color: #cf3131 !important;
      }

      .active_slot_stage_7 {
          background-color: #b21e1d !important;
      }

      .active_slot_stage_8 {
          background-color: black !important;
      }

      div.active_slot {
          background-color: black;
      }

      div.fade_slot {
          opacity:0.2;
      }

      .current_time_indicator {
          width: 0.125rem;
          position: absolute;
          height: 120%;
          top: -10%;
          border-radius: 15%;
          transform: translate(-50%, 0);
          background-color: #e6bdb7;
      }

      .current_time_indicator_text {
          position: absolute;
          bottom: 140%;
          transform: translate(-50%, 0);
          color: #e6bdb7;
      }

      .current_slot_indicator_start {
          width: 0.125rem;
          position: absolute;
          height: 40%;
          top: 100%;
          border-radius: 15%;
          transform: translate(-50%, 0);
          background-color: #e6bdb7;
      }

      .current_slot_indicator_start_text {
          position: absolute;
          top: 150%;
          transform: translate(-50%, 0);
          color: #e6bdb7;
      }

      .current_slot_indicator_end {
          width: 0.125rem;
          position: absolute;
          height: 40%;
          bottom: 100%;
          border-radius: 15%;
          transform: translate(-50%, 0);
          background-color: #e6bdb7;
      }

      .current_slot_indicator_end_text {
          position: absolute;
          bottom: 150%;
          transform: translate(-50%, 0);
          color: #e6bdb7;
      }
  </style> {% set area_schedule = state_attr(area_sensor, "forecast") %} {% if
  area_schedule is none %}{% set area_schedule = [] %}{% endif %} {% for
  day_offset_idx in range(number_of_days) %}
      {% set today_datetime_midnight = now().replace(hour=0,minute=0,second=0,microsecond=0) + timedelta(days=day_offset_idx) %}
      <div class="day_container">
          <h3 class="day_heading"
              style="{% if day_offset_idx == 0 or show_end_times %} margin-bottom: 1.5rem;
                  {% else %} margin-bottom: 0.5rem;
                  {% endif %}">{{ today_datetime_midnight.strftime("%A, %B %-d") }}</h3>
          <div class="slot_container">
              {% set ns = namespace(active_class_name="", last_slot_was_active=false, current_slot_was_activated=false) %}
              {% for half_hour_time_slot_idx in range(timeslots) %}
                  {% set half_hour_time_slot = today_datetime_midnight + timedelta(minutes=30*half_hour_time_slot_idx) %}
                  {% set ns.active_class_name = "" %}
                  {% set ns.current_slot_was_activated = false %}
                  {% for loadshedding in area_schedule %}
                      {% if not ns.current_slot_was_activated %}
                          {% if loadshedding["start_time"] <= half_hour_time_slot < loadshedding["end_time"] %}
                              {% if not ns.last_slot_was_active %}
                                  {% set percentage_of_region = (half_hour_time_slot_idx/timeslots)*100 %}
                                  <span class="current_slot_indicator_start" style="left:{{ percentage_of_region }}%">&nbsp;</span>
                                  <span class="current_slot_indicator_start_text" style="left:{{ percentage_of_region }}%;
                                              {% if half_hour_time_slot.hour == 0 %}transform: none;{% elif half_hour_time_slot.hour == 23 %}transform: translate(-100%,0);{% endif %}">{{ half_hour_time_slot.strftime("%H:%M") }}</span>
                              {% endif %}
                              {% set ns.current_slot_was_activated = true %}
                              {% set ns.last_slot_was_active = true %}
                              {% set ns.active_class_name = "active_slot active_slot_" + loadshedding['stage']|lower|replace(' ','_') %}
                          {% endif %}
                      {% endif %}
                  {% endfor %}
                  {% if not ns.current_slot_was_activated %}
                      {% if show_end_times and ns.last_slot_was_active %}
                          {% set percentage_of_region = (half_hour_time_slot_idx/timeslots)*100 %}
                          <span class="current_slot_indicator_end"
                              style="left:{{ percentage_of_region }}%">&nbsp;</span>
                          <span class="current_slot_indicator_end_text"
                              style="left:{{ percentage_of_region }}%;
                                      {% if half_hour_time_slot.hour == 0 %}transform: none;{% elif half_hour_time_slot.hour == 23 %}transform: translate(-100%,0);{% endif %}">{{ half_hour_time_slot.strftime("%H:%M") }}</span>
                      {% endif %}
                      {% set ns.last_slot_was_active = false %}
                  {% endif %}
                  <div class="slot {% if now() > half_hour_time_slot + timedelta(minutes=30) %}fade_slot{% endif %} {{ ns.active_class_name }}">&nbsp;</div>
              {% endfor %}
              {% if day_offset_idx == 0 %}
                  {% set current_time_indicator_progress = now().hour*2 + now().minute/30 %}
                  {% set percentage_of_region = (current_time_indicator_progress/timeslots)*100 %}
                  <span class="current_time_indicator"
                      style="left:{{ percentage_of_region }}%">&nbsp;</span>
                  {% if not show_end_times %}
                    <span class="current_time_indicator_text"
                        style="left:{{ percentage_of_region }}%">Now</span>
                  {% endif %}
              {% endif %}
          </div>
      </div>
  {% endfor %}

 

HI @slipx and all,

Not sure if I'm lazy, crazy or simply too noob.

Any idea why I would get undefined kWh on solar panels, when the flow card and others seem to be fine?

 

image.png.afac2defdb68ddb050452b24384dc129.png

 

image.png.bb793268b4661431b8740eb2ef76bf07.png

Really thought I had almost figured out my Deye / Solarman entities.

18 minutes ago, JTUBB said:

HI @slipx and all,

Not sure if I'm lazy, crazy or simply too noob.

Any idea why I would get undefined kWh on solar panels, when the flow card and others seem to be fine?

 

image.png.afac2defdb68ddb050452b24384dc129.png

 

image.png.bb793268b4661431b8740eb2ef76bf07.png

Really thought I had almost figured out my Deye / Solarman entities.

The dashboard can take a while to get right depending on how much data you have, I have just got mine sorted and started a while back.

Only after I really used @slipx wiki to figure things out did I really come right but worth it in the end.

undefined should show data once there are enough data points.

 

 

dash.png

Edited by Ronnie1102

  • Author

v3.17.0

🚀 Exciting New Features

  • feat: introduces new load attribute `dynamic_colour:` If set to `true` the essential icon colour will change based on the % contribution of the power source (battery, grid, solar) supplying the load. This is enabled by default. Set to `false` to disable. See #145 
  • fix: Revert essential_power calculation when `three_phase: true` and L1, L2 or L3 are not defined. Closes #148  

**Full Changelog**: https://github.com/slipx06/sunsynk-power-flow-card/compare/v3.16.1...v3.17.0

image.png.e467e1e1a5787275cd9a6087005bcd64.png

Edited by slipx

On 2023/11/19 at 12:18 PM, Patrick OReilly said:

Hi all.


Right now, I'm only getting updates every 5 minutes using the integration from @Gary Waterworth.

This depends on your settings on your dongle

The automations are every 30 seconds to a minute

The dongle can be set to update the sunsynk website once a minute

  • Author

v3.18.0

🚀 Exciting New Features

  • feat: add support for huawei inverters
  • fix: hide modern inverter image if set to false

spacer.png


**Full Changelog**: https://github.com/slipx06/sunsynk-power-flow-card/compare/v3.17.1...v3.18.0

v3.19.0

🚀 Exciting New Features

  • feat: adds new entity `environment_temp:` Display outside temperature or other environment temperature below the sun icon

spacer.png


**Full Changelog**: https://github.com/slipx06/sunsynk-power-flow-card/compare/v3.18.0...v3.19.0

Edited by slipx

On 2023/11/24 at 8:57 PM, slipx said:

feat: introduces new load attribute `dynamic_colour:` If set to `true` the essential icon colour will change based on the % contribution of the power source (battery, grid, solar) supplying the load. This is enabled by default. Set to `false` to disable. See #145 

Mr @slipx - I'm loving this new feature - very nifty.  And it adopted my personal colour selections automagically! :) 

I'm very new to HA, and the weirdness of YAML etc., and I've never worked with Python..., but I've been in software all my career (30+ years), and I admire the way you approach your work!  Your methodical thinking shows in the results!

Good work man!

Here's my sunny yellow house running on solar power...
image.png.88b034fc5cade296111ca7c1ca858369.png

On 2023/11/25 at 7:36 AM, Gary Waterworth said:

The dongle can be set to update the sunsynk website once a minute

Hi @Gary Waterworth

First - thank you for your integration.  I've been running it with great success for about 2 months now - very nice! It was really plug-n-play!

I have two questions if I may:

1) I have not seen any way to set the frequency of the data updates from the inverter to the Sunsynk.net service.  I have the Sunsynk dongle, not Solar Man.  Is it possible, and could you point me at where I can make that setting?

2) If I understood and observed your node-red flows correctly, it fetches updates every 60 seconds?  I'd most likely just want to set my data push to that same frequency. That way my automations that respond to load vs PV, etc. will be more responsive than they are now.

PS: your work was the first example that I started browsing through after I got HA running, so I've learned a lot of what I know about HAss, and a few things about the Sunsynk Inverter, from your stuff. Thank you!

 

Edited by Patrick OReilly

19 minutes ago, Patrick OReilly said:

Hi @Gary Waterworth

First - thank you for your integration.  I've been running it with great success for about 2 months now - very nice! It was really plug-n-play!

I have two questions if I may:

1) I have not seen any way to set the frequency of the data updates from the inverter to the Sunsynk.net service.  I have the Sunsynk dongle, not Solar Man.  Is it possible, and could you point me at where I can make that setting?

To set the frequency visit sunsynk.net, then click more, settings and change the data interval.

If you are not able to change it then you would need to request a user level elevation to Advanced User and then you should be able to drop it down to 60 seconds (down from the default of 300 seconds).

https://www.sunsynk.org/remote-monitoring and scroll down to User Level Access Change

Just note you cannot change the data interval on the app itself so would need to do so on the web app.

Edited by Ronnie1102

On 2023/11/24 at 8:57 PM, slipx said:

v3.17.0

🚀 Exciting New Features

  • feat: introduces new load attribute `dynamic_colour:` If set to `true` the essential icon colour will change based on the % contribution of the power source (battery, grid, solar) supplying the load. This is enabled by default. Set to `false` to disable. See #145 
  • fix: Revert essential_power calculation when `three_phase: true` and L1, L2 or L3 are not defined. Closes #148  

**Full Changelog**: https://github.com/slipx06/sunsynk-power-flow-card/compare/v3.16.1...v3.17.0

image.png.e467e1e1a5787275cd9a6087005bcd64.png

I can't get dynamic colour. I've added it like I think it should but it doesn't seem to work? I'm missing something 🤔

 

Screenshot_2023-11-26-16-47-04-999_io.homeassistant.companion.android-edit.jpg

23 minutes ago, cp69 said:

I can't get dynamic colour. I've added it like I think it should but it doesn't seem to work? I'm missing something 🤔

 

Screenshot_2023-11-26-16-47-04-999_io.homeassistant.companion.android-edit.jpg

Also not able to get it working.

13 hours ago, slipx said:

Strange. It's enabled by default so you don't need to change anything in your config unless you want to disable it

image.png.a9aac9c6ae5fc0957486830e1197be2a.png

Working, had to clear browser cache.

I managed to get the current temperature (under the sun icon; great functionality). Even the animated load/solar icon works well. Don't think it is related though , but nether less my Solar Left today has now dissapeared. In have it mapped (remaining_solar: sensor.energy_production_today_remaining). and the sensor does carry data. Any advice please, I am on the latest version.

 

image.png.396afc0c60c5ff7b9b01d49327d9f5c7.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.