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.

Better to enable/disable program or have it check flag?

Featured Replies

Posted

I have a program which alerts me of a condition. I only want 1 message per day, so the program tests the value of a flag variable (reset @ midnight by another program).

 

Would enabling/disabling the main program be significantly more efficient than using the flag?

 

Thanks,

Peter

 

EDIT: I should mention that the condition I'm checking (back-pressure indicating that a filter needs changing) should only occur once every 12 - 18 months. When it does there may be a period of several days (to several weeks if I were out-of-town) before the filter is changed, During this time, the pressure switch would close & re-open every 5 - 10 minutes when the pump cycles. All the rest of the time the main conditional test (Insteon status = ON) in the program would be false.

 

Do I understand correctly that until the ON event occurs, the program never actually runs?

  • Author
[...] Both approaches have the same efficiency.
Thanks, Michel -

I find that the program as I've written it

If
        Status  'Filter Pressure Switch' is On
   And $Filter_Clogged_Msg_Sent_Today is $FALSE

centralizes both conditions in one place and is completely self documenting, so thank you again for variables! :)

 

Peter

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.