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.

Entry light - Door lock program

Featured Replies

Have a program that won't evaluate true when I think it should. Light is off and I am unlocking the door.

If
        Status  'Front Door Entry Light' is Off
    And (
             Control 'Front Door Lock' is switched Key/Manually Unlocked
          Or Control 'Front Door Lock' is switched Unlocked by Keypad
          Or Control 'Front Door Lock' is switched Remotely Unlocked
        )
 
Then
        Set 'Front Door Entry Light' On
        Wait  30 seconds
        Set 'Front Door Entry Light' Off
 
Else
   - No Actions - (To add one, press 'Action')
 


Can someone help me out with the above program? I just want to have the front entry light turn on temporarly when the door is unlocked, EXCEPT if it's already on. I am guessing I am messing up with the parenthesis but I am new and still getting the syntax down.

 

Thanks,

Steve

Not sure about the IF, but when it does trigger and the light turns on, the Then will immediately stop and the light will not turn off. You will need to separate to two programs.

  • Author

And that would be my problem! Seperated it and it worked like a charm. Just as a reference if anyone else stumbles upon this thread looking for an answer:

 

 

Program 1: DoorUnlock

If
        Control 'Front Door Lock' is switched Key/Manually Unlocked
     Or Control 'Front Door Lock' is switched Unlocked by Keypad
     Or Control 'Front Door Lock' is switched Remotely Unlocked
 
Then
        Run Program 'LightOn' (If)
 
Else
   - No Actions - (To add one, press 'Action')
 


Program2 (Disabled so it only runs by the first programs call): LightOn

If
        Status  'Front Door Entry Light' is Off
 
Then
        Set 'Front Door Entry Light' On
        Wait  30 seconds
        Set 'Front Door Entry Light' Off
 
Else
   - No Actions - (To add one, press 'Action')
 


Thanks again MWareman!

 

~Steve

No problem! Glad it helped. You actually don't need anything in the 'if' of your disabled program. Not hurting, just not required.

In the first, change the 'Run If' to 'Run Then' to make this work though. I find it cleaner.

Edited by MWareman

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.