Changing Counters to Deltas??

The data I get from my meters is raw counter data. The actual value is somewhat meaningless, but rather the changes indicate the actual usage patterns.

In my 'inputs' I've added 'Total pulse count to pulse increment' as a process step, however when I go and visualize the data or add a realtime graph to the dashboard, I see the total, rather than the delta.

It feels like counter data is pretty common, so I must be missing something obvious on how to accurately bring in this data to visualize it. I'd be appreciative to any suggestions or help from anyone else that is trying to track water and gas rates from raw counter data.

TrystanLea's picture

Re: Changing Counters to Deltas??

Hello hplato. There are two main options I would recommend here. The first is to take the approach I outlined here https://openenergymonitor.org/emon/node/12308 using the wh_accumulator process to log the counter data to a feed and then bargraph to pull out the amount used in a particular interval - the interval doesnt have to be daily, it could be hourly or every minute

Lets say the counter data is in watt hours and you select the interval to be 60 seconds. In one 60s period perhaps 20Wh is used which would be 20Wh * 3600 =  72000 Joules, 72000 / 60s = 1200Watts.

You can use the scale property in bargraph to convert the wh to Watts in this case the scale value would need to be 3600 / 60 = 60.

The second option would be to add code to the pulse counter to measure the time between each pulse in order to calculate the power, there's an example of this here: https://github.com/openenergymonitor/emonTxFirmware/blob/master/emonTxV2...

Hope that helps a bit.

hplato's picture

Re: Changing Counters to Deltas??

Thanks for the note! So somehow I've managed to create duplicate feeds -- the first two are the actual counters, and another one is the delta. I just saw a 1 pop up which was the counter ticking over. Ideally it would be nice to be able to break down usage per time slice like you indicated. Once I get a EMR on my power meter, this makes a lot more sense.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.