Pump Sump Interval Monitor

variables

#1

1) Give a description of the problem
Trying to design a piston to monitor my sump pump which only is engaged when it rains but if its cycling more than once per minute, I need to check if there is standing water / something wrong. I am monitoring the pump with a Zooz power meter on the plug.

2) What is the expected behavior?
I want it to count the number of times the pump cycles (goes over 700W power) and after 10 cycles, tell me the duration from the first to the last. For example, when raining I might get a message every 9 minutes telling me it is cycling faster than once a minute. If its not raining I might get a message every 2 weeks saying it completed 10 cycles.

3) What is happening/not happening?
I know a variable is involved with a count, and maybe $now but I dont know how to get it to keep track of the time and do the math.

**4) Post a Green Snapshot of the piston!


#2

Right now you are send the notification every 10 minutes. If I understand correctly, you want to send it every 10 cycles

Create a new variable of type time/date

First_cycle_Time

Get rid of the “Every 10 minutes” statement at line 43

add this code

If count = 1
then
set variable First_cycle_Time = $now

If count =11
then
set variable count = 0
send sms notificaiton “time for last 10 cycles is” $now - First_cycle_Time

I’m fairly certain that will work. You may need to concatenate a string to make the entire notification show up.