I have a zooz switch that reports each time my sump pump goes to 0 power and writes the date and time to a hubitat txt file. Works perfectly for tracking how often my sump pump is running. I'd like to be able to calculate the most recent interval between sump cycles and display that on a dashboard tile. Seems possible but I have no idea how to do that.
How about this? Each trigger you get for a sump pump cycle, capture energyDuration as elapsed time between cycle stops. Then resetEnergy,
Seems like you'd need to be measuring the interval between a cycle stop to next cycle start to get interesting information, though. If you just measure stop to stop, then you are getting the same results regardless of how long the pump runs in a given cycle.
The pump typically runs for about 8 seconds. I'm interested in the current time between cycles. The 0 watt end of cycle point works as a cycle point mark. I just don't know how to to capture and display minutes between cycles. I can use power =0 as a trigger. How can I compute time between triggers and display it on the dashboard.
You might find an answer in the thread on Rule Machine Time Variables. In post 1, Bruce says that you can calculate the difference between two time variables, so you should be able to do exactly what you describe. Look into Global Connector as a way to get this variable into something you can display on a dashboard.
If for some reason that doesn't work out, you can come back to my alternate idea of letting the Zooz keep time for you by resetting energyTime upon each event, and therefore you can use energyDuration as the time between the stops.
I’d suggest HubiGraph and get a graph of it....
Thanks, That looks like it might work. I'll play with it.
- just tried timeline which works. I like the look of your timeline and will give it a go as well. For some reason I'm loosing the right edge of the iomage which has the first two on off cycles about an hour apart.