GroveStreams
pat private msg quote post Address this user
Hi,

I have a sensor indicating with a stream when a door is open (state 'opened') or closed (state 'closed').
How would I calculate how long the door is in the opened state in seconds each time it is opened or have the total opening time within one day, one week, one month, ... ?

Is there a derivation function to retrieve the time of the arrival of the data for a variable offset -1 or 0 ?

Thank you,
Post 1 IP   flag post
MikeMills private msg quote post Address this user
Try my last suggestion in this thread.

Once you have a stream that is calculating duration, its rollup information will be available automatically (SUM-Hour, SUM-Day, SUM-Month, SUM-Year) for alerts, derivation, and dashboarding.
Post 2 IP   flag post
2965 2 2
Log in or sign up to compose a reply.