question

bipedalprimate avatar image
bipedalprimate asked

Venus-Docker-Grafana - How to calculate KWH from watts?

Victron provide a nice 'Advanced Victron Dashboarding' solution at:

https://github.com/victronenergy/venus-docker-grafana

Having played with it for a while, I am struggling to figure out to calculate kWh values from time series point in time values such as "vebus/Ac/ActiveIn/L1/P" which are stored as Watts with a time stamp in InfluxDB.

I have tried using the INTEGRAL function with a result that jumps widely between MWh & Wh.

Have also tried MEAN() CUMULATIVE_SUM() MATH(/1800) with a result that is far more stable but does not match VRM.

1800 is used as the divisor because InfluxDB seems to update every 2 seconds & 1800 equals 60 minutes times the 30 InfluxDB entries per minute.

Home Assistant offers a Riemann sum integral which is promoted as an effective method to calculate kWh from W, but I am reluctant to add another monitoring/control platform.

Has anyone managed to calculate kWh values in Venus-Docker-Grafana?

If so, how did you do it?

If not, is this impossible?

Venus OSgrafanadocker
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

0 Answers