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.

Help with program using multiple doors and time

Featured Replies

Posted

I have been trying to get this program to work for a bit and it seems to work for one door, but not the other.  Or maybe not both at the same time. I'm not the best with this type of logic.

So I'll post it here and hope someone better at this can see why it isn't working for me.

DwayLightAfter Sunset - [ID 0025][Parent 0001]

If
        From    Sunset  + 15 minutes
        To      Sunrise + 15 minutes (next day)
    And 'Outside / DetachGarageNorthDoor' Status is Open
     Or 'Outside / DetachGarageSouthDoor' Status is Open
 
Then
        Set 'Outside / DetachDrivewayLight' On
 
Else
        Wait  10 minutes and 20 seconds
        Set 'Outside / DetachDrivewayLight' Off
 


any thoughts?

 

Thanks for looking.

Use parentheses for the Or statements.

 

And (

         'Outside / DetachGarageNorthDoor' Status is Open
        Or 'Outside / DetachGarageSouthDoor' Status is Open
        )

Because AND has a higher order of operation than OR it is logically assumed you are doing this
 


If
    (
      From Sunset + 15 minutes
      To Sunrise + 15 minutes (next day)
    And
      'Outside / DetachGarageNorthDoor' Status is Open
    )
    Or
      'Outside / DetachGarageSouthDoor' Status is Open

Follow Stu's fix above

Edited by larryllix

  • Author

Okay I finally had time to try this during daylight hours today and it seems to work ok.

I wasn't aware of the parentheses. It did take me a few tries to get them in the correct order, but it worked.

Thanks much for the help!

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.