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.

Schedule as trigger for program?

Featured Replies

I have this program... my intent is to increment a variable no more than 1 time per hour if a sMotionOff = 1 . (sMotionOff is set to 1 if all motion detectors are off and 0 if any motion detectors detect motion.

My notify in the then section appears to run even if the time is not on the hour.

What am I missing?

Originally I put the sVariable first with the schedule times after  like if sVariable <> 0 and time = 1 or time = 2 etc...   but I felt like the

program would be running a lot and if I put the times first it would only run once every hour...

AllMotionSetCalcTime - [ID 0039][Parent 0032]

If
        Time is  1:00:00AM
     Or Time is  2:00:00AM
     Or Time is  3:00:00AM
     Or Time is  4:00:00AM
     Or Time is  5:00:00AM
     Or Time is  6:00:00AM
     Or Time is  7:00:00AM
     Or Time is  8:00:00AM
     Or Time is  9:00:00AM
     Or Time is 10:00:00AM
     Or Time is 11:00:00AM
     Or Time is 12:00:00AM
     Or Time is  1:00:00PM
     Or Time is  2:00:00PM
     Or Time is  3:00:00PM
     Or Time is  4:00:00PM
     Or Time is  5:00:00PM
     Or Time is  6:00:00PM
     Or Time is  7:00:00PM
     Or Time is  8:00:00PM
     Or Time is  9:00:00PM
     Or Time is 10:00:00PM
     Or Time is 11:00:00PM
     Or Time is 12:00:00PM
    And $sMotionOff is 1
 
Then
        $sNomotion += 1
        Run Program 'AutoVacationSet' (If)
        $iHourCount  = $sNomotion
        Resource 'QuickGeneric'
 
Else
   - No Actions - (To add one, press 'Action')
 
iAllMotionOffCalcTime increments sNoMotion to number of hours that no motion has been detected.
Used to determine how long since motion detectors have been All Off

 

Edited by Jim P
Clarify program by correcting variable name.

13 minutes ago, Jim P said:

I have this program... my intent is to increment a variable no more than 1 time per hour if a sMotionOff = 1 . (sMotionOff is set to 1 if all motion detectors are off and 0 if any motion detectors detect motion.

My notify in the then section appears to run even if the time is not on the hour.

What am I missing?

Originally I put the sVariable first with the schedule times after  like if sVariable <> 0 and time = 1 or time = 2 etc...   but I felt like the

program would be running a lot and if I put the times first it would only run once every hour...

AllMotionSetCalcTime - [ID 0039][Parent 0032]

If
        Time is  1:00:00AM
     Or Time is  2:00:00AM
     Or Time is  3:00:00AM
     Or Time is  4:00:00AM
     Or Time is  5:00:00AM
     Or Time is  6:00:00AM
     Or Time is  7:00:00AM
     Or Time is  8:00:00AM
     Or Time is  9:00:00AM
     Or Time is 10:00:00AM
     Or Time is 11:00:00AM
     Or Time is 12:00:00AM
     Or Time is  1:00:00PM
     Or Time is  2:00:00PM
     Or Time is  3:00:00PM
     Or Time is  4:00:00PM
     Or Time is  5:00:00PM
     Or Time is  6:00:00PM
     Or Time is  7:00:00PM
     Or Time is  8:00:00PM
     Or Time is  9:00:00PM
     Or Time is 10:00:00PM
     Or Time is 11:00:00PM
     Or Time is 12:00:00PM
    And $sMotionOff is 1
 
Then
        $sNomotion += 1
        Run Program 'AutoVacationSet' (If)
        $iHourCount  = $sNomotion
        Resource 'QuickGeneric'
 
Else
   - No Actions - (To add one, press 'Action')
 
iAllMotionOffCalcTime increments sNoMotion to number of hours that no motion has been detected.
Used to determine how long since motion detectors have been All Off

 

Put an AND pair of parentheses arround all your OR logic lines.  It is in the upper edit box.

If

    [
        Time is  1:00:00AM
     Or Time is  2:00:00AM
     Or Time is  3:00:00AM
     Or Time is  4:00:00AM
     Or Time is  5:00:00AM
     Or Time is  6:00:00AM
     Or Time is  7:00:00AM
     Or Time is  8:00:00AM
     Or Time is  9:00:00AM
     Or Time is 10:00:00AM
     Or Time is 11:00:00AM
     Or Time is 12:00:00AM
     Or Time is  1:00:00PM
     Or Time is  2:00:00PM
     Or Time is  3:00:00PM
     Or Time is  4:00:00PM
     Or Time is  5:00:00PM
     Or Time is  6:00:00PM
     Or Time is  7:00:00PM
     Or Time is  8:00:00PM
     Or Time is  9:00:00PM
     Or Time is 10:00:00PM
     Or Time is 11:00:00PM
     Or Time is 12:00:00PM

    ]    And $sMotionOff is 1
 
Then

Edited by larryllix

  • Author

Thanks larryllix  I seldom have a need to use parenthesis .. and frankly forgot they were available ....

The great thing about getting old is that you get the learn so much every day .... even if you learned it yesterday !!!!

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.