klebel Posted December 22, 2012 Posted December 22, 2012 Hey All, I just created a program called Morning Trail. I am always the first one up in the morning. If I push button B on my KPL it lights the way from the bedroom down into the kitchen and out to the garage. I have a wait statement that then shuts the scene back off after 30 minutes. How do I add an OR to the program. The OR statement would be that OR IF I fastoff the garage light it shuts the whole scene back down. That way the lights don't stay on the entire 30 minutes if I hit the garage light button quickly on my way out the door in the morning. Is this even possible? Thanks!
arw01 Posted December 22, 2012 Posted December 22, 2012 Copy your program in to the posts here so we can take a gander at it. Optionally, you could add another program that looks for the fast off in the garage and turns off the scene, but there are or statements available from the programming drop downs that you can add to the if. and there are () for precedence control) e.g. (if time between 7:30 and 8:15 and garage fast off)
klebel Posted December 22, 2012 Author Posted December 22, 2012 Sorry about that I should have done that in the first place. If Control 'Master Bedroom / Master Bedroom-B' is switched On Then Set Scene 'Morning Trail' On Wait 30 minutes Set Scene 'Morning Trail' Off Else Set Scene 'Morning Trail' Off What I want to do is make it such that IF Switch B is on it does the Then Statement, OR if Morning Trail is ON and I fastoff the Garage switch, it turns off the Morning Trail scene and turns Master Bedroom B (Which I used to turn is all on) to back off. Does that make sense or is it clear as mud? Thanks.
oberkc Posted December 22, 2012 Posted December 22, 2012 Of course one can and an "or", or an "and". In the program, create a new conditon. In the condition window, choose "or" or "and". Select "add to "if"". Done.
klebel Posted December 22, 2012 Author Posted December 22, 2012 Of course one can and an "or", or an "and". In the program, create a new conditon. In the condition window, choose "or" or "and". Select "add to "if"". Done. Thanks. Maybe I am just not used to the ISY interface yet. If I just type it out in Notepad I get the logic just fine. I just cant figure out how to do the groupings in the admin console.
LeeG Posted December 22, 2012 Posted December 22, 2012 Use a second Program to turn the Scene Off. Using one Program requires the If Condition to be False to drive the Else Clause. It is difficult to generate a positive control multi condition If that drives the Else clause. Too many If condition combinations result in a False evaluation If Status 'Master Bedroom / Master Bedroom-B' is On And Control 'garage light' is switched Fast Off Then Set Scene 'Morning Trail' Off Else - No Actions - (To add one, press 'Action')
Vyrolan Posted December 22, 2012 Posted December 22, 2012 This will do exactly what you want in one program... If Control 'Master Bedroom / Master Bedroom-B' is switched On And Control 'Garage Switch' is not switched Fast Off Then Set Scene 'Morning Trail' On Wait 30 minutes Set Scene 'Morning Trail' Off Else Set Scene 'Morning Trail' Off
klebel Posted December 22, 2012 Author Posted December 22, 2012 Great! Thanks guys for the super fast responses. All working now. I had been hoping to do it all in one program but I understand why you wouldn't do that now.
Vyrolan Posted December 23, 2012 Posted December 23, 2012 Great! Thanks guys for the super fast responses. All working now. I had been hoping to do it all in one program but I understand why you wouldn't do that now. I see no reason NOT to do it one program. The one in my post above will do it one program. That's hardly a complicated set of conditions. If things get too crazy then more programs help, but this situation isn't that bad.
klebel Posted December 23, 2012 Author Posted December 23, 2012 Great! Thanks guys for the super fast responses. All working now. I had been hoping to do it all in one program but I understand why you wouldn't do that now. I see no reason NOT to do it one program. The one in my post above will do it one program. That's hardly a complicated set of conditions. If things get too crazy then more programs help, but this situation isn't that bad. I tried it your way as well and both work just fine. I will keep it in one program until I run into issues and then I might break it into two. Thanks again!
apostolakisl Posted December 23, 2012 Posted December 23, 2012 Vyrolan's approach is excellent. By including a "control not fast off" in the if clause he has created a second trigger (fast off). In the event that a "fast off" command is received, the program re-triggers. A program that re-triggers always terminates any current activity (the wait clause here) and starts over from scratch. Since the "fast off" is preceded by "not" this results in a "fast off" command received causing a false if condition which runs the else clause. So, in summary, if upon leaving the house, should you do a fast off on that switch, the wait currently running terminates, the program re-evaluates to false, the else clause runs, and the lights shut off.
LeeG Posted December 23, 2012 Posted December 23, 2012 The single Program approach turns the Scene Off any time the garage light sends a Fast Off. The original requirement was to turn the Scene Off if Morning Trail is active AND there is a Fast Off. The single Program approach does not consider Morning Trail when reacting to the Fast Off. If the Morning Trail condition does not matter the single Program approach is best. If Morning Trail being active is important the single Program does not satisfy the requirement.
Recommended Posts