I have a smart plug that controls a Humidifier, I have made a flow to inform me when the smart plug has started 5 times. Now I also want to check the time the smart plug was on during these 5 times to check the waterreservoir.
Eg. 1st Humidifier was on for 40 minutes, 2nd H was on for 2 hours, 3rd H was on for 1 hour, etc. I want to receive a message if the H is on for 3,5 hours
with Chronograph App for Homey | Homey it is possible to use a stopwatch.
Actually there is no reason to calculate time in flows. We can measure it directly
How to do it - to many possible paths and different timer apps, but main steps…
- Use some Timer ( does not matter it counts back or forwards, but You must set event when it reaches back to zero or to the specified runed time for H)
- When H starts, start ( actually resume, do not set new value) the Timer
- When H stops, pause ( again, not zero/set ) the Timer
- When the timer reaches zero/determined value - send message
- Use automatic ( together with “send message” ) or manual ( GUI / button / … ) re-setting The Timer
Above are the bones of logic, if i need to build something. Just for comment - i personally prefer to have separate event handling for re-seting timer, because there may be “human factor delay” between message and tank refill.
Hi Hielke,
Thanks, can you provide an example?
Regards,
John
:HI Cuprum,
Same as above, can you please provide an example?
Regards,
John
Ok, some PoC, As here is quite hot, i used Fan instead. Also used some other handfull pieces. But hope, the change of devices is easy… also take it easy, used only ~10 minutes and not fully tested/debuged it
thanks a lot I will try this tonight