Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Programmind Question

Featured Replies

Posted

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?

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 by oberkc

  • Author

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.

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

  • Author

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.

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:

 

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 by Xathros

Small nit ...

 

This should be

 

Set Scene 'ROG_KPL_A' Off

Thanks Lee.  That is what I meant :)

 

-Xathros

  • Author

My profound thanks to all of you. Two new programs in place and working perfectly. More importantly, additional programming knowledge acquired.

Excellent.  Glad we could help.

 

-Xathros

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.