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.

Program Logic Assist Pls

Featured Replies

Posted

Am I writing this correctly? My intention is to trigger THEN if either of the /Main House/Sensors are tripped AND the $Gates_ProgON is 0. I wasn't sure if I needed the parenthesis around the separate pairs of conditions with an OR in between or not.

North Gate OPEN - [ID 0019][Parent 0031]

If
     'Main House / Sensors / North Gate' is switched On
    And $Gates_ProgON is 0
     Or 'Main House / Sensors / ZY 033 North_Gate' Access Control is Window/door is open
    And $Gates_ProgON is 0
 
Then
        $North_Gate_Open  = 1
        Run Program '_North Gate' (If)
 
Else
   - No Actions - (To add one, press 'Action')
 

I would likely write it like this just for clarity

 

North Gate OPEN - [ID 0019][Parent 0031]

If
     (
    'Main House / Sensors / North Gate' is switched On
         Or 'Main House / Sensors / ZY 033 North_Gate' Access Control is Window/door is open

      )
    And $Gates_ProgON is 0
 
Then
        $North_Gate_Open  = 1
        Run Program '_North Gate' (If)
 
Else
   - No Actions - (To add one, press 'Action')

7 minutes ago, lgilsenberg said:

 

I would likely write it like this just for clarity

 

North Gate OPEN - [ID 0019][Parent 0031]

If
     (
    'Main House / Sensors / North Gate' is switched On
         Or 'Main House / Sensors / ZY 033 North_Gate' Access Control is Window/door is open

      )
    And $Gates_ProgON is 0
 
Then
        $North_Gate_Open  = 1
        Run Program '_North Gate' (If)
 
Else
   - No Actions - (To add one, press 'Action')

That's the better, more predictable way of doing it.

Not that it matters here since you have no Else statements, but be aware that this program will also run every time the Gates_ProgON variable is changed.

  • Author

Thanks for the insight.

Right now, Gates_ProgON can be fired with a second gate. That program has a different Then action.

Should I create individual variables for each program, or is there a way to write the statements in each program so they do not fire each other off. (The second gate program is identical, using different sensors.)

Also, can I import the updated text into EISY, or do I have to recreate it using the UI?

 

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.