larryllix Posted September 15, 2014 Posted September 15, 2014 For the purpose of this illustration I will use the multiple Notifications problem, being a common one for many, but this could apply to any response taken from an event trigger where repeated actions could be an unwanted effect. A common method of avoiding multiple notifications is to have a second disabled program disable the first, and triggering, program for a set amount of time. Program.1 -------------- If water_leak_detected Then run program.2 Else -- Program.2 -------------- If -- Then disable Program1 send notification "we got leaks!" wait 1 hour enable Program.1 Else -- Can anyone see a problem with using only a single program (below) to do this same thing? The program would already be triggered and disabling it would not stop it's progress. Could this be caught in a power failure and lock out as disabled? Program -------------- If water_leak_detected Then disable Program send notification "we got leaks!" wait 1 hour enable Program Else -- Thoughts?
LeeG Posted September 15, 2014 Posted September 15, 2014 Unfortunately Disabling the running Program stops the Program. The statement after the Disable executes but that is all. Program AAA2 If Control 'SwitchLinc Dimmer DB' is switched On Then Disable Program 'AAA2' Send X10 'A5/On (3)' Wait 5 seconds Send X10 'A6/On (3)' Wait 5 seconds Send X10 'A7/On (3)' Wait 5 seconds Send X10 'A8/On (3)' Enable Program 'AAA2' Else - No Actions - (To add one, press 'Action') Mon 09/15/2014 11:23:57 AM : [iNST-SRX ] 02 50 1D.23.6B 00.00.01 CB 11 00 LTONRR (00) Mon 09/15/2014 11:23:57 AM : [std-Group ] 1D.23.6B-->Group=1, Max Hops=3, Hops Left=2 Mon 09/15/2014 11:23:57 AM : [D2D EVENT ] Event [1D 23 6B 1] [DON] [0] uom=0 prec=-1 Mon 09/15/2014 11:23:57 AM : [ 1D 23 6B 1] DON 0 Mon 09/15/2014 11:23:57 AM : [D2D-CMP 0042] CTL [1D 23 6B 1] DON op=1 Event(val=0 uom=0 prec=-1) is Condition(val=0 uom=0 prec=-1) --> true Mon 09/15/2014 11:23:57 AM : [D2D-CMP 0013] CTL [1D 23 6B 1] DON op=1 Event(val=0 uom=0 prec=-1) is Condition(val=0 uom=0 prec=-1) --> true Mon 09/15/2014 11:23:57 AM : [iNST-SRX ] 02 50 1D.23.6B 22.80.0B 41 11 01 LTONRR (01) Mon 09/15/2014 11:23:57 AM : [std-Cleanup ] 1D.23.6B-->ISY/PLM Group=1, Max Hops=1, Hops Left=0 Mon 09/15/2014 11:23:57 AM : [iNST-DUP ] Previous message ignored. Mon 09/15/2014 11:23:57 AM : [D2D EVENT ] Event [1D 23 6B 1] [sT] [102] uom=0 prec=-1 Mon 09/15/2014 11:23:57 AM : [ 1D 23 6B 1] ST 102 Mon 09/15/2014 11:23:57 AM : [X10-RSP ] 02 63 61 00 06 Mon 09/15/2014 11:23:57 AM : [D2D-CMP 002B] STS [1D 23 6B 1] ST op=1 Event(val=102 uom=0 prec=-1) is Condition(val=0 uom=0 prec=-1) --> false Mon 09/15/2014 11:23:57 AM : [ Time] 11:24:00 2(0) Mon 09/15/2014 11:23:57 AM : [ X10] A5 Mon 09/15/2014 11:23:57 AM : [ X10] A5/On (3) Mon 09/15/2014 11:23:58 AM : [X10-RSP ] 02 63 62 80 06 Mon 09/15/2014 11:23:59 AM : [X10-RX ] 02 52 61 00 Mon 09/15/2014 11:23:59 AM : [ X10] A5 Reduce your Wait from 1 hour to 30 seconds. The Program will not Enable itself.
larryllix Posted September 15, 2014 Author Posted September 15, 2014 (edited) Unfortunately Disabling the running Program stops the Program. The statement after the Disable executes but that is all. Program AAA2 <big snippage> Reduce your Wait from 1 hour to 30 seconds. The Program will not Enable itself. Thanks LeeG. That's what I was looking for! Your event reading skills are invaluable here. (jealous) I haven't spent the time to learn that, which is unlike my usual behaviour. Edited September 15, 2014 by larryllix
ravedog Posted September 16, 2014 Posted September 16, 2014 (edited) Why learn? I've added the LeeG module (1$). SUCH a great investment! Sent from my iPhone using Tapatalk Edited September 16, 2014 by ravedog
Michel Kohanim Posted September 16, 2014 Posted September 16, 2014 Hi ravdog, I agree wholeheartedly. To be honest, not one week goes by without me learning something from LeeG. But, then again, why learn? LeeG, thanks AS ALWAYS. With kind regards, Michel
Recommended Posts