How to Calculate Historical Power Consumption For a Given Period

User avatar
klew
Posts: 11339
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław

Post

Juddy14 wrote: Tue Apr 01, 2025 8:51 am You are right, I seem to get the right values if I choose 18:50 instead of 19:00.

So let's say I want to get data from 26.03.2025 19:00 to 26.03.2025 20:00.
Does it mean that I need to query 26.03.2025 18:50 to 26.03.2025 20:00 i.e. always subtract 10 minutes from the start date?
Is that correct?

Thanks for your help.
It depends on a time your server store data. In general to get 60 min energy usage, you have to calculate difference between two measurement which are ~60 min apart.

Server stores data every 10 min, but this time may change when server is restarted. Also it may happen that you'll have gaps i.e. when meter was offline
Supla: bo GPIO to dopiero początek.

Return to “Help”