EmonCMS feeds / processes

Is there a way to detect the rate of change in a input or feed, ie if a input or feed is rising that could produce a boolean value and vice versa if it is falling? Presumably this would require so sort of buffer to store previous sample values?

Here’s an idea that might work? Two feeds, one that tracks the input and the other tracks the delta. Can subtract the previous value from the feed from the new value from the input. Log to the delta feed, reset and log new value to the primary feed for next time.


‘Multiply by -1’ if you need it the other way up, and ‘Allow positive’ to ignore negative deltas.

How would you generate the delta feed?

The process list I showed above will generate the delta feed (as well as the non-delta feed).

Ah by subtracting the feed from itself?

Yes, cos the feed is lagging by 1 reading at this point, so this will give you the delta.

Here’s graph of my test feeds. Orange is the incoming data, blue goes up or down whenever the input changes.

Probably works best with data that comes in at a slow interval.

1 Like