PV overview widget, Fronius UI based, full SVG

PV widget inspired by the Fronius inverter web interface. Extended with main power sinks in a common estate - car, heatpump and laundry - and a few other things.

(Screenshot taken when the car just started charging. It ramps up slowly from 0 to 8 kW, the inverter takes some time to realize and draw power from the battery. The grid jumps in for a few seconds.)

The widget is based on initial work by @pwoehrer done here: [OH 4.2] Fronius inspired energy flow widget [4.2.1; 5.0.0]

Changes to the above version:

  • All icons/graphics embedded as SVG, no external ressources required
  • Solar plant, battery and heatpump feature dynamic icons
    • Solar plant dims to grey based on actual power to max power
    • Battery shows charging level in real time during charge, in addition remaining percentage as number during discharge
    • Heatpump vent rotates with speed based on actual power to max power
  • All icons dim to grey if related power/level drops below threshold
  • All icons feature a popup item
  • Car, heatpump and laundry icons will not display if no item is configured
  • Advanced configuration allows adjusting all colors and a few other things

Configuration is a bit of a mess because it uses 7 data nodes, each requiring at least 2 data sources (up to 4) and a popup item. So expect spending some time in picking all items :slight_smile:

Feedback greatly welcome!

Current and previous versions can be found here: OpenHab/Widgets at main · daabm/OpenHab · GitHub

Changelog

Version 0.1

  • initial release (file fronius_energy_flow_v3.yaml)

Version v4

  • Drop “0.x” versioning - one major version per release
  • Split energy flow from solar plant, now 2 flows to inverter and battery. Since it is a hybrid inverter that passes solar DC directly to the battery, this represents the real flow better
  • The heatpump now shows its real operating state instead of power/“Standby” in the dial text. This results from my modbus implementation for kermi heatpumps (the kermi extension for the modbus binding doesn’t work for the state description): * Things file - * Items file - * Required transforms
  • Reordered and reviewed parameters for easier configuration

Resources

https://raw.githubusercontent.com/daabm/OpenHab/refs/heads/main/Widgets/fronius_energy_flow_v4.yaml

Really nice!

You should update the link to the widget to the raw though, otherwise openHAB will fail to install the widget.

Done. Thanks! :slight_smile:

I switched from the original fronius widget and found that one really useful. However, I have some issues with dots showing the flow. The are simply not apearing. All other values (power, soc etc) are there. Could you please advise?

The screenshot looks impossible. The house cannot consume 518W if neither the inverter nor the grid are providing power. Seems you picked wrong items in some places.

I assume Mateuz is running on 5.1.4 or so asfaik there is some changes which breaks the powerflow … (is not working for me either but had no time so far to dig into the issue deeper)
anyhow I might be wrong :wink:

I am also running 5.1.4, no issue with the dots so far. But they will possibly break if the inverter items aren’t properly selected, since they contribute heavily for dot size calculations. Without them, dots have a zero size rendering them invisible.

thank you … will double check item selection

My bad. Indeed, after setting up items correctly the dots apeared. Thanks!

Then a helping hand would be appreciated:
For Solar Power I use Fronius_Production_Power = powerflowchannelppv
For Inverter Power I use Fronius_AC_Power = inverterdatachannelpac
For Grid Power I use Fronius_Grid_Power = powerflowchannelpgrid
For Load Power I use Fronius_Load_Power = powerflowchannelpload

thanks for a hint

Looking at your screenshot, the PV battery has no item currently. The dot size is calculated by a function that requires solar production, battery, grid and house. If any of these items isn’t configured or doesn’t provide a number value, it will silently fail and dot size is zero.

          resize_dot: "=value => Math.abs(value) < props.power_min ? 0 :
            `${Math.pow(Math.max(Math.abs(value) / Math.max(
            (Math.abs(#props.power_house) + (#props.power_grid > 0 ?
            #props.power_grid : 0)), Math.abs(#props.power_grid),
            Math.abs(#props.power_solar), Math.abs(#props.power_battery)),
            0.05), 0.5) * 6}px`"

If you don’t have a battery, simply create a dummy item Number:Power, assign it a value of zero and use it for the battery. Or replace

Math.abs(#props.power_battery)

in the widget code with a 0 (zero).

To be honest, I never thought of PV plants without a battery - they are so common these days, at least for new installations.

thank you so much .. I’m in the process to expand my PV system in the coming weeks therefore I start preparing OH :wink:

Thanks for provding this clean and helpful widget,

I’ve tweaked the widget code so that the dots should flow from the battery to the inverter if the battery power is negative (meaning battery is discharging). This works fine in the preview of the widget editor. However, when including the modified wirdget within a page, the flow is shown reversed from the inverter to the battery. I’ve checked that the actual modified widget code is used with same items as in the widget preview.

Any idea what might cause the different behaviour and how to fix it?

The flow from battery to inverter was already implemented, so I miss the requirement for tweaking :slight_smile: And since I don’t know what you tweaked exactly, it’s hard to tell. The direction depends on this path definition:

d: '=#props.power_battery >= 0 ? "M80,220L120,180" : "M120,180L80,220"'

So if battery power is positive, it flows from 80,200 to 120,180. If power is negative, it flows from 120,180 to 80,220. In my configuration, power is negative when the battery is charging and positive when it is discharging.

Having a path that can reverse direction is a leftover of the original widget code where the battery was only connected to the inverter. The direct link from the solar plant to the battery didn’t exist there.

To add some background: With the fronius inverter, power positive/negative is all seen from the inverter’s point of view. Power that “leaves” the inverter is negative, be it to battery, grid or house. Power that “enters” the inverter is positive, be it from solar plant, battery or grid.

House power is always negative since the house never delivers power. Solar plant power is always positive since a solar panel never consumes power. Grid and battery change signs.

My change is just to check for negative battery power. The issue is rather that I’m getting the correct flow direction (according to my convention) in the widget preview of the developer tool, but the direction is reversed when the widget is displayed on a page. This may be completely unrelated to the widget (UI bug?), but it’s obviously quite confusing.

Hm, ok strange. I assume you double checked for using the same item in preview and in the widget. If yes, it‘s not the widget code but something weird…