Bill Morrow Posted December 26, 2016 Posted December 26, 2016 I assume the below will do what I want? If either of 3 motion sensors is triggered and it's between 11:00 PM and Sunrise then trigger the Front Lights. I tried it with output B, I've just never used the parenthesis before. TIA Front Motion Test - [iD 0009][Parent 0001] If ( Status 'EZIO8SA - B' is On Or Status 'EZIO8SA - A' is On Or Status 'EZIO8SA - 9' is On ) And From 11:00:00PM To Sunset (next day) Then Set Scene 'Front Lights' On Wait 2 minutes Set Scene 'Front Lights' Off Else - No Actions - (To add one, press 'Action')
jtara92101 Posted December 26, 2016 Posted December 26, 2016 Yes, parenthesis do what one would expect parenthesis to do. Does it do as you wish, or not?
MWareman Posted December 27, 2016 Posted December 27, 2016 Remember, it's event driven. Every time the status of anything in 'If'' changes, the entire If is evaluated and either 'Then' or 'Else' is run. Does not matter for this program, but be aware that at 11:00:00PM and at Sunset (next day) the 'Else' branch will run even if the motions status does not change. The other thing, the wait in the 'Then' branch will be aborted if any 'If' condition changes during the wait period. Again, likely not an issue for this program...
oberkc Posted December 27, 2016 Posted December 27, 2016 Again, likely not an issue for this program... The time this could be an issue is when the timer is active when sunrise occurs. In such a case, the.lights.will remain on. Your program also has "sunset" rather than "sunrise".
Bill Morrow Posted December 27, 2016 Author Posted December 27, 2016 Remember, it's event driven. Every time the status of anything in 'If'' changes, the entire If is evaluated and either 'Then' or 'Else' is run. Does not matter for this program, but be aware that at 11:00:00PM and at Sunset (next day) the 'Else' branch will run even if the motions status does not change. The other thing, the wait in the 'Then' branch will be aborted if any 'If' condition changes during the wait period. Again, likely not an issue for this program... Yeah, I was considering using the Else as a fail-safe to turn off the Scene in case something went wrong. 11:00 PM and SunRise (not SunSet) would actually work, but I assume the Else would fire any time all of the motion sensors were off. The Wait does not work, at least I know why now. I assume the best way to get around this is to set a variable that launches another program and put the wait in there? The time this could be an issue is when the timer is active when sunrise occurs. In such a case, the.lights.will remain on. Your program also has "sunset" rather than "sunrise". Yes, s/b sunrise, as I discovered this morning. thanks
oberkc Posted December 27, 2016 Posted December 27, 2016 Yes, the else would fire when motion sensors turn off. For this reason, I prefer "control" rather than "status" conditions here. Yes, I would include lights off command in the else path. No need to set a variable to launch another program. An unnecessary complication, in my mind.
Bill Morrow Posted December 27, 2016 Author Posted December 27, 2016 Yes, the else would fire when motion sensors turn off. For this reason, I prefer "control" rather than "status" conditions here. Yes, I would include lights off command in the else path. No need to set a variable to launch another program. An unnecessary complication, in my mind. Yes, but the variable would make it event driven, so I could use the same code snippet to turn the Scene off in other situations. Got an example of using Control?
oberkc Posted December 27, 2016 Posted December 27, 2016 Got an example of using Control? Use your same program logic and steps but update each "status" condition to "control". I believe that this is a selection from the drop-down box.
Bill Morrow Posted December 27, 2016 Author Posted December 27, 2016 Use your same program logic and steps but update each "status" condition to "control". I believe that this is a selection from the drop-down box. Yep, I did a little reading. So the control maintains it's true state once the event occurs, whereas the status is only true when the motion sensor is activated. Hence the Wait fails. Thanks
oberkc Posted December 27, 2016 Posted December 27, 2016 A control-on condition is triggered only by receipt of the ON command. A status-on condition is triggered by any change of state, from on-to-off, or off-to-on.
oberkc Posted December 27, 2016 Posted December 27, 2016 Furthermore, I suspect you have flipped state conditions of control vs status. Status-on remains true until off. Control-on is true only at the moment of trigger.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.