I have setup in a local emonsd a feed that gives me the total amount measured my a water meter. I process it in order to log it (total value of the meter), then get the rate of change and finally I want to accumulate it in so I can reset it every midnigth. Therefore the value of this feed will always be the total amount of water used in a particular day.
However for some unknown reason, this feed is never populated with data.
What am I doing wrong?
Just in case it is a REDIS problem (thus I guess it is correct)
I think you might be accumulating the rate of change. However, I’m not a process expert. @TrystanLea?
Hello @Jujonet I would recommend approaching this differently, take a look at the guide section here on ‘Creating daily kWh data from cumulative Wh or kWh inputs’ the same would apply to your water meter: Calculating Daily kWh - Guide | OpenEnergyMonitor
Hi @TrystanLea thanks a lot for your answer
I already visited thet, and have the daily/weekly/montly graph…
However would like to set a feed with just the consumption done today in this moment, so I can set up a label with a value in the dashboard, or I can get and advise if it reaches a limit (ie water leak)
Is there a way I can get the value in a separate feed?
Thanks a lot
Good points, there is a new dashboard widget called ‘kwhperiod’ that will calculate today’s value from a cumulative kwh feed, but that doesnt help with the alert/limit requirement
This sort of thing is better handled in an automation tool such as Home Assistant or Node-Red.
@TrystanLea - could this be a process so the value can be exported? Perhaps 2
- Cumulative since midnight (local - oh that may cause fun!).
- Cumulative in last x period?
Could these be done by a crafty API call?
As of today I took a shortcut through a set of bash scripts:
- Every midnight write the counter value to a file
- Every 5 minutes compare actual counter value with midnight value
- Feed emoncms with that particular value (daily consumption)
- Next midningt it is reset to zero due to calculation formula
Probably it is too quick and dirty and too much bash-dependant… but is the most I know…