Energy Dashboard with poweropti from powerfox

For a month now, I have been using the energy dashboard from Home Assistant (HA) to bring all meters “under one hat”. Solar-Log and the poweropti from powerfox are used for.
The post could be most relevant for users in Germany, because it is offered by a number of electricity suppliers in Germany.

That there is unfortunately no integration, the configuration must be done via configuration.yaml. Powerfox provides a documented interface.

How it works
1. Put your credentials (powerfox.energy - cloud) in /config/secrets.yaml
like this

#  - Powerfox -
ovag-user: User
ovag-pw: PW
##

2. Define the sensors in /config/configuration.yaml
like this

For german speaking users: https://www.it-und-hausautomation-blog.de/energie-dashboard/

3 Likes

It is very nice to see several different implementations of the Poweropti for Home Assistant.
Unfortunately I still have some trouble creating a working Energy Dashboard with this. Mostly, this is due to the way the energy dashboard handles the Solar Input…
It expects a value in KWh while the Input is (naturally) in KW or Watt. I still haven’t figured out how to fix this…

My Growatt Inverter provides plenty of Data, but if I add anything to the Solar Input, then things go wrong…
Currently I have just the Powerfox running with the Input and Output Sensor data.

Any advice?

You would have to integrate over your power with a Riemann sum integral sensor to calculate the energy.

1 Like

Thanks! I might tackle that at a later date.

add info: as seanomat mentioned you should use this integration. In my case, the solar-log provides the requiered sensor (kWh). In your case, you can use the current sensor (W) in order to calculate the kWh sensor. The easiest way is using the “Helper” functionality. There is a “Helper” for Rieman sum available via GUI. You have just to create a new “Helper” with your sensor (W) as Input.

1 Like

I got the energydashboard running without any helpers, just from the plain growatt and powerfox yaml sensors.

This is the Powerfox config:

# Powerfox template sensors
  - sensor:
    - name: "powerfox_aktuell"
      state: "{{ state_attr('sensor.powerfox_all_values', 'Watt') }}"
      unit_of_measurement: "W"
      device_class: "power"
      state_class: "measurement" 
      unique_id: "123456789987654321"
  - sensor:
    - name: "bezug_powerfox"
      state: "{{ state_attr('sensor.powerfox_all_values', 'A_Plus') }}"
      unit_of_measurement: "kWh"
      device_class: "energy"
      state_class: "total_increasing" 
      unique_id: "12345678998765432"
  - sensor:
    - name: "einspeisung_powerfox"
      state: "{{ state_attr('sensor.powerfox_all_values', 'A_Minus') }}"
      unit_of_measurement: "kWh"
      device_class: "energy"
      state_class: "total_increasing" 
      unique_id: "1234567899876543"

and attached what I use in the energy dashboard


2 Likes

Sure, have been using that for a while now. Since Powerfox has been so unreliable lately I have switched over to using a Shelly 3EM now though. Working that into the Dashboard is a whole new challenge though… :smiley:

As there are some problems with the API calls to the powerfox backend currently, I tried to get the data directly from the device.
Took some time to figure it out, but I’m able to read the values now.
Working on integrating that in my ha config now

There’s a local RPC endpoint at http://IP of the device/rpc
All you need is the correct json payload for the RESTful sensor.
Returns json with the result encoded in the value result as base64 string.
Decoding that gives another json with all the data you need

1 Like

Fantastic! I hope you can get this to work so we can all use the Poweropti to get at least the “current power” value reliably!

Here’s my current test setup. No errors yet.
Powerfox local network

1 Like

Hi,

I’ve read a text who said the connection is instabile for him. How’s your experience?

I’m thinking to get the poweropti aswell for me but it should be realible

Hi Thomas,

thanks - I am thinking about Powerfox as well.
I have one question about your dashboard though.

What’s needed to show the sum of Solar vs. power consumption vs. power feed into the grid like this:
image

I have a small Balcony Solar panel and would expect the total (total consumption minus Solar generation).
But I only get these two separate:

Not sure how to change the energy dashboard, but you can easily create a template sensor where you subtract the generated energy from the total used energy. Then you make a statistics bar graph.

Best
Thomas