intellihome Posted November 27, 2009 Posted November 27, 2009 I'm trying to write a program to send an X10 command if it is after 9PM and KeypadLinc button A is already on or is turned on. I'm not sure how to do it. I saw where to select time but not sure how to say "after 9PM". If Control 'Mud Room KP A' is switched On Then Wait 1 minute Send X10 'H2/Off (11)' Else - No Actions - (To add one, press 'Action') Any help would be appreciated -Kevin Quote
Illusion Posted November 27, 2009 Posted November 27, 2009 First change Control to Status If Control 'Mud Room KP A' is switched On Should be: If Status 'Mud Room KP A' is On Second click on schedule, select 9pm, select from, pick your to time like 7am, click add to if. Quote
intellihome Posted November 27, 2009 Author Posted November 27, 2009 Does this look OK? So this will execute at 9PM if the KP A button is already on? Or it will execute if it is between 9PM and 7AM next day whenthe KP A button is turned on? If Status 'Mud Room KP A' is On And From 9:00:00PM To 7:00:00AM (next day) Then Wait 1 minute Send X10 'H2/Off (11)' Else - No Actions - (To add one, press 'Action') Quote
Michel Kohanim Posted November 27, 2009 Posted November 27, 2009 Hi, This will execute between 9:00 PM and 7:00 AM next day if and only if the status of the KPL A is "changed" to On. So, if the status if KPL A is already on, and then you press KPL A, this will not execute. If you want that to happen then you must use Control instead of Status. With kind regards, Michel Does this look OK? So this will execute at 9PM if the KP A button is already on? Or it will execute if it is between 9PM and 7AM next day whenthe KP A button is turned on? If Status 'Mud Room KP A' is On And From 9:00:00PM To 7:00:00AM (next day) Then Wait 1 minute Send X10 'H2/Off (11)' Else - No Actions - (To add one, press 'Action') Quote
Illusion Posted November 27, 2009 Posted November 27, 2009 Does this look OK? So this will execute at 9PM if the KP A button is already on? Or it will execute if it is between 9PM and 7AM next day whenthe KP A button is turned on? Both The ISY is event based. The evaluations of programs are event based. When 9pm comes the "If" will get evaluated, if KP A is already on then the "If" is true and the "Then" will execute. Alternately, if you press the KP A then you have changed the status of the KP A switch and so the ISY will again evaluate the "If" in this program. If it is between 9p and 7a then the "Then" will execute. If it is not between 9p and 7a then the "If" statement is still false and the system will have to wait till 9p for it to become true for execution to take place. Not the use of "And" between the conditions. When building programs you can change that to "Or" and dramatically alter the function of the program because either condition being met then would result in the "If" becoming true. Program looks great to me. Looks like it should do exactly what you requested in your first post. Quote
Illusion Posted November 27, 2009 Posted November 27, 2009 Whoa Michel! If KP A is status On because it had been turned on prior to 9pm, at 9pm the program becomes true and so should execute. If KP A is status off and time is between 9p and 7a and KP A is pressed, then status is changed to On and program should execute. I think this is written correctly for what intellihome wanted to achieve. Quote
Michel Kohanim Posted November 27, 2009 Posted November 27, 2009 Hi Illusion, You are very correct. The main question is whether or not you want the On action on the KPL to always cause an X10 to be sent between 9:00 PM and 7:00 AM regardless of the status of KPL A. If yes, then one should use Control. If no, then the program should work fine. Thanks and with kind regards, Michel Quote
intellihome Posted November 28, 2009 Author Posted November 28, 2009 Thank you Illusion and Michel. KPL A is a "Home" indicator. When it's on I am home and when it is off I am not home. The X10 signal is to shut off a porch light. If I am home (KPL A is On) and 9PM rolls around I want the program to execute (turn the porch light off). If I am not home (KPL A is Off) and 9PM rolls around, I want the porch light to stay On. When I finally arrive home (between 9PM and 7AM next day) I will press KPL A On and I would like the program to execute (shut the light off). Will the program do this? Thanks again! Quote
Illusion Posted November 28, 2009 Posted November 28, 2009 That is how I had assumed you wanted it. Yes, as the program is now written I believe it will do exactly what you want. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.