Thanks oberkc,
I feel like there should be a solution that doesn't require me to guess how long the pump takes to empty the pit - part of the motivation of this is that we recently had the pump go nonstop for a day before becoming overwhelmed, and had I gotten a warning that it was running for so long, I could have fixed the problem before it overflowed.
I did some reading up on the "wait" command, and I think it can do what I want. According to what I've seen, if the "If" condition triggers while a program is waiting, it will reevaluate the program - so if the condition stops being true while a program is "wait"ing, it will not keep waiting (I think).
The goal here is to have the "On" message sent as soon as it goes on, but only have the "Off" message sent when it switches off for 5+ seconds. In my tests, the time between on/off cycles the synchrolinc was picking up was on the order of 1.5 seconds or so, so 5 seconds seems safe. I much prefer guessing this value (since it seems consistent) rather than the time it takes the pump to empty the pit, which can depend on conditions like weather.
Here's what I'm trying:
--------------------------------
On program:
If
Status 'Sump' is On
And $Sump is 0
Then
Send Notification to 'Default' content 'Sump on'
$Sump = 1
Else
- No Actions - (To add one, press 'Action')
Off program:
If
Status 'Sump' is Off
And $Sump is 1
Then
Wait 5 seconds
Send Notification to 'Default' content 'Sump on'
$Sump = 0
Else
- No Actions - (To add one, press 'Action')
-------------------------
Anyone see a problem with this? I'll test it out next time it rains (and if I remember, I'll post an update).