Community
OpenEnergyMonitor

Community

Feed processing

Tags: #<Tag:0x00007f6e0fa11d58>

I have created a feed (datatype: realtime, PHPTIMESERIES) to store information about when a sensor is on (feed value is 1) and off (feed value is 0).
I would like to get for how long time (hours) the sensor has been on (feed value = 1) since the start of the feed (3 years ago) .
Could anyone help on this ? THX

Good to see you back, Giuseppe.

Can you use “Input on-time”?
I’ve never had the need to use it, the ‘Help’ says:

Counts the amount of time that an input is high in each day and logs the result to a feed. Created for counting the number of hours a solar hot water pump is on each day

Output: Does NOT modify value passed onto next process step.

I don’t know whether you can apply this to history using Post-processing, that is something to look into.

Rather than process inputs as data arrives in emoncms such as calculating cumulative kWh data from power data with the power to kWh input process, this module can be used to do these kind of processing steps after having recorded base data such as power data for some time. This removes the reliance on setting up everything right in the first instance providing the flexibility to recalculate processed feeds at a later date.

Hi Robert,
I really appreciate your enduring support in the forum.

From your advices I start to use the “input on-time” input process ; in the next days I will see if it works.

I also looked into post-processing and I applied the “accumulator” process to my feed but as shown in the picture below I get useless data (yellow line)

Then I tried the “histogram” feature with the “time on value” in the data viewer page which sounded as the solution for my needs. But I get unexpected results.
In the following picture there is my feed data which have 0 or 1 values during time time

and this is what I get when using “histogram” feature The bar on the right with values > 1 could represent for how long the feed has value = 1 but there is also a column representing data with value < 0.1 which is supposed not to be as feed values are only 0 or 1. Could you help in what I am doing wrong. Thanks

Sorry, I can’t. You need someone who knows emonCMS far better than I do.

Ultimately @TrystanLea wrote most of it, so when he gets time, he might be able to help you - if nobody else comes forward first.

Thank you anyway. In the meantime I will post any results of my trying. Ciao

Did the input ontime process work for you @gmaui? Its been a while since I’ve used or tested this process but it was originally designed to do what you are after but as a daily count of the amount of time…

Hi Trystan

Yes, it worked. After some days of data recording I can say the daily ontime process is working . For completeness I show the results.

Here is my data with a feed counting “1” for some period during June 10th ; the total time is about 72 minutes.


Here is the derived daily ontime feed showing 4370 seconds = 72,8 minutes for that day .

@Robert.Wall, @TrystanLea thanks a lot for pointing me to this.

1 Like