Hello,

i meassure my powermeter and read the total power consumption nearly every two minutes.

To calculate the real Wh value i use this query:

SELECT difference(mean(“value”)) *1000*12 FROM “MT174/Total_in” WHERE $timeFilter and value > 0 GROUP BY time(5m) fill(null)

I group it to 5 minutes because the two minutes readout is not exact. Multiply this by 12 → KWh and multiply by 1000 → Wh. All fine.

But sometimes the reading of values stumble somewhat. So i miss values up to 2 hours. In this case is the calculation wrong and the calculated value too high.

Is there a way to multiply it with the real time difference?

I hope my problem can be understood - i am not a native speaker and a novice with Grafana/Influx

best regards,

Mike