TexMike Posted August 9, 2017 Posted August 9, 2017 Still a bit of a noob (few weeks with ISY). Anything wrong with temporarily disabling a program for a motion sensor so as not to get repeated alerts for a time period. The programs below work, I'm just wondering if it's a good technique or any pitfalls. Thanks Away Motion If $Away is 1 And 'Entry motion E11' Status is On Then Send Notification to 'SMS Mike' content 'Open while away' Set 'Entry RC xceiver Can light E9' On Set 'Chime E16' On Run Program 'Enable entry motion' (Then Path) Disable Program 'Away Motion' Else - No Actions - (To add one, press 'Action') Enable entry motion If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Wait 1 minute and 30 seconds Set 'Entry RC xceiver Can light E9' Off Enable Program 'Away Motion'
stusviews Posted August 9, 2017 Posted August 9, 2017 Due to the sequential execution of statements, you may want to have the light turned on first.
oberkc Posted August 9, 2017 Posted August 9, 2017 I am not certain what you want these programs to do, but I see nothing inherently "wrong" with your programs. If it works, even better. As far as technique, why did you choose to split these two programs? What about: If $Away is 1 And 'Entry motion E11' Status is On Then Send Notification to 'SMS Mike' content 'Open while away' Set 'Entry RC xceiver Can light E9' On Set 'Chime E16' On Disable Program 'Away Motion' Wait 1 minute and 30 seconds Set 'Entry RC xceiver Can light E9' Off Enable Program 'Away Motion' Else - No Actions - (To add one, press 'Action') ?
larryllix Posted August 9, 2017 Posted August 9, 2017 I am not certain what you want these programs to do, but I see nothing inherently "wrong" with your programs. If it works, even better. As far as technique, why did you choose to split these two programs? What about: If $Away is 1 And 'Entry motion E11' Status is On Then Send Notification to 'SMS Mike' content 'Open while away' Set 'Entry RC xceiver Can light E9' On Set 'Chime E16' On Disable Program 'Away Motion' Wait 1 minute and 30 seconds Set 'Entry RC xceiver Can light E9' Off Enable Program 'Away Motion' Else - No Actions - (To add one, press 'Action') ? A program will not execute further lines after a Wait program line, and disabling itself. Control has to be passed to another program during the disabled period.
TexMike Posted August 9, 2017 Author Posted August 9, 2017 Yep, learned early on through trial and error and reading the forums about the nuances of the wait command. As I understand the wait command also causes a reevaluation of the program execution status. My question was just about the technique of disabling/re-enabling a program within a program. In my short time, I haven't seen it used a lot in the forum examples. Guess I should turn the light on first and get it on a fraction of a second sooner. Thanks for the feedback so far, Mike
stusviews Posted August 9, 2017 Posted August 9, 2017 TexMike, you are correct. A second program is needed if you want to disable and enable a program.
oberkc Posted August 10, 2017 Posted August 10, 2017 A program will not execute further lines after a Wait program line, and disabling itself. Control has to be passed to another program during the disabled period. Cool. I did not know that. My question was just about the technique of disabling/re-enabling a program within a program. On the other hand, count me among those who disable and re-enable programs within a program.
stusviews Posted August 10, 2017 Posted August 10, 2017 On the other hand, count me among those who disable and re-enable programs within a program. You enable and disable a program within itself or you use a second program to disable and enable the first program?
TexMike Posted August 10, 2017 Author Posted August 10, 2017 The program can disable its self, then 2nd program is used to enable after a wait or another condition is met.
stusviews Posted August 10, 2017 Posted August 10, 2017 My concern was wrt/oberkc's post, one program or two?
oberkc Posted August 10, 2017 Posted August 10, 2017 You enable and disable a program within itself or you use a second program to disable and enable the first program? I have, in the past, disabled programs within their own actions. I dont think I have any of those now, but do have currently programs that disable other programs.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.