FloridaGary Posted May 11, 2022 Posted May 11, 2022 (edited) Hi All - I need some assistance programming the Timeout program for my Leak Detectors. As I learned from @MrBillcomments do nothing and I am not sure how to follow these instructions. The programming I have followed - https://www.termpro.com/asp/pubs.asp?ID=443 What I know - The 9 Leak Detectors all work and trip the electronic valve to shut down water supply to house. New Energizer Lithium batteries in each. After testing each Detector, I pressed the re-set button to return to dry status The programming I followed to measure the Detector's heartbeat has been sending updates within every 24 hours for the past week. This is what the programming should look like: This is what I have: ( I know this is not correct ) I have // Time is Last Run..........as a comment. When I click on Add And (...) I can not figure out how to add Time is Last Run Time for 'Guest Bath Sink - Heartbeat' + 25 hours without it being a comment. Guest Bath Sink-Timeout - [ID 001E][Parent 0012] If $sGuestBathroomSink is not 3 // Time is Last Run Time for 'Guest Bath Sink - Heartbeat' + 25 hours Then $sGuestBathroomSink = 2 Else - No Actions - (To add one, press 'Action') What am I missing? Thanks in advance for anyone's help. Gary Edited May 11, 2022 by FloridaGary
Solution MrBill Posted May 11, 2022 Solution Posted May 11, 2022 Click on the IF statement, Click the schedule button, the last dropdown in the TIme line defaults to "Time", change it to last run and you should be able to figure out the rest.
oskrypuch Posted May 11, 2022 Posted May 11, 2022 (edited) Does that help!? ? FWIW ... Here is my heartbeat routine, it works. I don't bother repeating the warning. It sends an initial email to confirm that it is active. If a heartbeat comes within 26 hrs, then it restarts and sends another email to show it is working. I don't monitor those emails, they get filtered to a folder for reference should I need it. But, if there is no heartbeat within 26 hours, it sends a text message indicating that heartbeats have lapsed. It is also important to monitor for switched ON + switched OFF. * Orest Heartbeat Kitchen - [ID 021B][Parent 0135] If 'kitchen / LEAK - Kitchen-Heartbeat' is switched On Or 'kitchen / LEAK - Kitchen-Heartbeat' is switched Off Then Send Notification to 'xxxxxxxx - GMail' content '$my_alert' Wait 26 hours Send Notification to 'xxxxxx - Text' content 'LEAK Heartbeat MISSED' Run Program 'Heartbeat Kitchen' (If) Else - No Actions - (To add one, press 'Action') Edited May 11, 2022 by oskrypuch 1
MrBill Posted May 11, 2022 Posted May 11, 2022 @oskrypuch Without testing I don't think this is doing what you want it to: Heartbeat Kitchen - [ID 021B][Parent 0135] If 'kitchen / LEAK - Kitchen-Heartbeat' is switched On Or 'kitchen / LEAK - Kitchen-Heartbeat' is switched Off Then Send Notification to 'xxxxxxxx - GMail' content '$my_alert' Wait 26 hours Send Notification to 'xxxxxx - Text' content 'LEAK Heartbeat MISSED' Run Program 'Heartbeat Kitchen' (If) (then) Else - No Actions - (To add one, press 'Action') Specifically I'd make the change in RED. When it run's If as you have it set, the if will be false. "is switched" is looking for the signal to come in, that only happens for less than 1 second each day. Therefor when you re-run (if) the If will be false and it will execute the empty else. If you change as indicated above you will get a repeat nag in 26 hours if the heartbeat sill hasn't arrived.
FloridaGary Posted May 11, 2022 Author Posted May 11, 2022 (edited) 43 minutes ago, MrBill said: Click on the IF statement, Click the schedule button, the last dropdown in the TIme line defaults to "Time", change it to last run and you should be able to figure out the rest. Thank you @MrBill. This helped, but how did the programs author add the (+ 25 hours )? Edited May 11, 2022 by FloridaGary
FloridaGary Posted May 11, 2022 Author Posted May 11, 2022 37 minutes ago, oskrypuch said: Does that help!? ? FWIW ... Here is my heartbeat routine, it works. I don't bother repeating the warning. It sends an initial email to confirm that it is active. If a heartbeat comes within 26 hrs, then it restarts and sends another email to show it is working. I don't monitor those emails, they can filtered to a folder for reference should I need it. But, if there is no heartbeat within 26 hours, it sends a text message indicating that heartbeats have lapsed. It is also important to monitor for switched ON + switched OFF. * Orest Heartbeat Kitchen - [ID 021B][Parent 0135] If 'kitchen / LEAK - Kitchen-Heartbeat' is switched On Or 'kitchen / LEAK - Kitchen-Heartbeat' is switched Off Then Send Notification to 'xxxxxxxx - GMail' content '$my_alert' Wait 26 hours Send Notification to 'xxxxxx - Text' content 'LEAK Heartbeat MISSED' Run Program 'Heartbeat Kitchen' (If) Else - No Actions - (To add one, press 'Action') Thank you. I still had a question which I posted in response to Mr.Bill. You show the "wait time" in the Then section, but the author of the program I am following shows it in the "If" statement. Trying to figure out how he did that.
oskrypuch Posted May 11, 2022 Posted May 11, 2022 (edited) 44 minutes ago, MrBill said: @oskrypuch .... Therefor when you re-run (if) the If will be false and it will execute the empty else. If you change as indicated above you will get a repeat nag in 26 hours if the heartbeat sill hasn't arrived. Thanks, but no, actually, I only want to receive ONE nag text, preceded by the $alert email when a beat is actually sent, so that is why I send it back to IF to reset the routine. I actually won't lose track of that single text. The email alert I use more for archive. Of course if it remains without a heartbeat, there will be no further activity. * Orest Edited May 11, 2022 by oskrypuch
FloridaGary Posted May 11, 2022 Author Posted May 11, 2022 17 minutes ago, MrBill said: Thank you, sir.
MrBill Posted May 11, 2022 Posted May 11, 2022 2 hours ago, oskrypuch said: Thanks, but no, actually, I only want to receive ONE nag text, preceded by the $alert email when a beat is actually sent, so that is why I send it back to IF to reset the routine. I actually won't lose track of that single text. The email alert I use more for archive. Of course if it remains without a heartbeat, there will be no further activity. * Orest In that case you can simply delete that line from the program. 3 hours ago, MrBill said: Run Program 'Heartbeat Kitchen' (If) (then) It doesn't do anything. 1
oskrypuch Posted May 11, 2022 Posted May 11, 2022 (edited) 4 minutes ago, MrBill said: In that case you can simply delete that line from the program. It doesn't do anything. Thanks, you are quite right. Looking at it again, that line must be a bit of old code that never got deleted, when I was reworking the routine at some time in the past. * Orest Edited May 11, 2022 by oskrypuch
MrBill Posted May 11, 2022 Posted May 11, 2022 4 minutes ago, oskrypuch said: Thanks, you are quite right. Looking at it again, that line must be a bit of old code that never got deleted, when I was reworking the routine at some time in the past. * Orest Probably copied from one of my examples. I like to restart the Then, so that if i don't deal with it today I'll get reminded tomorrow if the issue still exists. If it doesn't still exist (i.e. new heartbeat received) that resets the clock again and kills the nag. Some of my 2421's are horrible about dropping heartbeats.
oskrypuch Posted May 11, 2022 Posted May 11, 2022 (edited) Likely, here is where it came from ... Quote Heartbeat TEST - [ID 021F][Parent 0135][Not Enabled] If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Wait 1 minute Send Notification to 'xxxxxxx - Text' content 'LEAK Heartbeat MISSED' Run Program 'Heartbeat TEST' (If) Else - No Actions - (To add one, press 'Action') This was a bit of sandbox code testing out the text message text, before I rolled it into the actual routines. * Orest Edited May 13, 2022 by oskrypuch
Recommended Posts