OH3 - consumption power graphics report

  • Platform information:
    • Hardware: Raspberry pi4
    • OS: openhabian
    • Java Runtime Environment: _which java platform is used and what version_default installation
    • openHAB version:latest stable
  • Issue of the topic: how to recalcutae data in report

Hooe to be clear…
i have some Shelly in my home and monitor power consumtion.
I successfully create location, equipment and point and i can see realtime power consumtion in watt.
also i can switch in detail with graphs and aggregate valute for day and see for every hour total watt .
Now i would like to have not total Watt but in kWh and this can be do by this function: totalwatt / 60 (minute in an hour) / 1000 ( watt for 1Kw)
result is correctly my kWh consum in that hour and is the same reported by native shelly cloud.
How i can change for aggregation graph this formula or is possible to have a new option like custom forumla?

are there any other way to have this grafics?
thanks

Marco

I’m using a Shelly 2.5 which does give KwH
under the stateTopic

shellies/shellyswitch25-745118/relay/power.
Why don’t you use this ohne?

hi Jurgen and thanks for you reply.
Unfortunatly for my Shelly device i don’t have power in kWh but only this


in which i have

  • currentWatts, realtime consumption in Watts
    -totaleKWH, totale KWH consumption since it’s activation

this is valid or my shell1PM and shellyEM that have 2 sensor.

I joke with OH3 graphs and you suggestion and discovery that:

In this graphics you can see my consumption in Watt for this day…

and if you aggregate using average aggregation for every hour you have the average of watt consumption for every hour.
for 8 for exaample you have an average of 2,532.127 Watts if you divide per 1000 you have 2.532kWh

Now in shelly cloud, for the same house , you have 2.575kWh
ok a small different

how i can changescale in OH graphs and divide by 1000 the totale and have kWh?

If i use shelly channel that return me total kwh consumption how you suggest me…
in graphs in OH is this one:


thats is the same but show in kWh!!! BINGO!!!
but for this i need to change aggregation using diff_last and for 0 hour is empty.

Some one can help me to have same graphics but for all hour…

this graph is for yesterday, with all data for all 24 hour but for 0 hour always show me 0!!!

how can create a chart for this data?

another question: how i can sum total kWh consumtion for this day?

@MarcoZ could you find a solution for your problem and the empty value for hour 0?

hi Marco

can you send me the Code of your chart page?

Thx