Jump to content

Programmind Question


smokegrub

Recommended Posts

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?

Link to comment

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

Link to comment

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

Link to comment

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.

Link to comment

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

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...