Quantcast
Viewing all articles
Browse latest Browse all 199

Help with power meter which resets energy usage at midnight

Hi everyone,

I have a bunch of energy monitors and most of them record energy usage (kWh) cumulatively but I have some legacy ones (Meross) which record energy during the day but then reset at midnight every night. This is frustrating because when I try and use the queries I’ve developed for the other energy monitors on these plugs, at midnight, the energy usage goes into negative values and I’m hoping someone might be able to help me formulate a query where the consumption data rolls on rather than resetting at midnight? Here’s an example bar graph of what I’m talking about

This is the query I’m using:

SELECT difference(distinct("value"))/1000 FROM "Wh" WHERE ("entity_id"::tag = 'smart_plug_19090329639802251h1448e1e900eb97_energy') AND $timeFilter GROUP BY time(1h) fill(null) tz('Australia/Brisbane')

Side note: because my other energy monitors record the data to influxdb in kWh but these meross plugs record their energy in Wh, is using ‘/1000’ in the query the best way to convert this data or is there a better way?

Can someone help me please? Many thanks in advance.

5 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 199

Trending Articles