smokegrub Posted December 1, 2014 Posted December 1, 2014 If Status 'ROG Other KPL / ROG Other KPL A (Bedtime)' is On Then Set 'Chandelier (Upstairs)' On Set 'Mom's Bedroom KPL / Mom's Bedroom KPL 1 (Light)' On Wait 5 minutes Set 'Chandelier (Upstairs)' Off Else Set 'Chandelier (Upstairs)' Off The foregoing program allows my wife to press KPL A in the ROG and turn the upstairs chandelier and her bedroom light on. After 5 minutes, the chandelier cuts off. The program works as designed, however, the KPL A button remains lit following execution of the program and must be pressed twice for the program to run next time. What do I need to do to have KPL return to its OFF state, ready to run with a single tap next time?
oberkc Posted December 1, 2014 Posted December 1, 2014 (edited) The brute-force method would simply be to add a statement at the end of your program to turn off the kpl button. If this button is a secondary button, you may need to create a new scene, containing only that button, and turn the scene off by program. An alternative, depending on your needs, is to create a scene with the ROG keypad controller and chandelier as responder, and modify the program: If CONTROL 'ROG Other.... Then Set moms bedroom kpl on Wait 5 minutes Set new scene off Else Nothing Edited December 1, 2014 by oberkc
smokegrub Posted December 1, 2014 Author Posted December 1, 2014 When It try the "brute force" method, the only option I get for KPL A is to chenge its LED level, not turn it OFF.
Xathros Posted December 1, 2014 Posted December 1, 2014 Smokegrub- If this is a 6 button KPL, the KPL-A is a secondary button and would need to be controlled by a scene. Create a new scene and make the KPL-A button a responder. Then in your program, also turn off that new scene. -Xathros
smokegrub Posted December 1, 2014 Author Posted December 1, 2014 Smokegrub- If this is a 6 button KPL, the KPL-A is a secondary button and would need to be controlled by a scene. Create a new scene and make the KPL-A button a responder. Then in your program, also turn off that new scene. -Xathros Xathros: It is a 6-button KPL. I don't understand what you are suggesting. Keep in mind that I want to delay turning off the chandelier for 5 minutes while leaving the bedroom light on. Then, I want to somehow turn off the ROG Other KPL A. Could I impose on you to be abit more specific as to what the scene includes and how I use it with the exiting program? Thanks.
oberkc Posted December 1, 2014 Posted December 1, 2014 I briefly mentioned the need for a scene in my original response. Create a new scene. Include in this scene the keypad button, as responder, nothing else. In the program, include a statement to turn off the new scene.
Xathros Posted December 1, 2014 Posted December 1, 2014 (edited) Xathros: It is a 6-button KPL. I don't understand what you are suggesting. Keep in mind that I want to delay turning off the chandelier for 5 minutes while leaving the bedroom light on. Then, I want to somehow turn off the ROG Other KPL A. Could I impose on you to be abit more specific as to what the scene includes and how I use it with the exiting program? Thanks. You bet. Since the secondary buttons on the KPL (A-D) are not directly addressable like a switchlinc or the main On/Off buttons on the KPL, they need to be controlled by a scene. Create a new scene called ROG_KPL_A and place the KPL-A button in it as a responder. You don't need to put anything else in this scene. Then modify you program as follows: If Status 'ROG Other KPL / ROG Other KPL A (Bedtime)' is On Then Set 'Chandelier (Upstairs)' On Set 'Mom's Bedroom KPL / Mom's Bedroom KPL 1 (Light)' On Wait 5 minutes Set 'Chandelier (Upstairs)' Off Set 'ROG_KPL_A' Off Else Set 'Chandelier (Upstairs)' Off Set 'ROG_KPL_A' Off Notice the last line in both the Then and Else sections. That should do it or you. Hope this helps. -Xathros Edited December 1, 2014 by Xathros
LeeG Posted December 1, 2014 Posted December 1, 2014 Small nit ... This should be Set Scene 'ROG_KPL_A' Off
smokegrub Posted December 1, 2014 Author Posted December 1, 2014 My profound thanks to all of you. Two new programs in place and working perfectly. More importantly, additional programming knowledge acquired.
Recommended Posts