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.

Motion timer

Featured Replies

Posted

So I have a situation that I'm sure many of you have... I have kids that like to leave lights on all around the house. What I would like to do is start a timer based on the motion sensor tied to my ELK security system in the kids playroom. So when the turn the lights on, it will start a timer for say 5 minutes and if there is motion detected, it will extend that another 5 minutes. I'm trying to wrap my head around the best way to do this. I have state variables setup and a program that updates the motion state variable to 1 if it detects motion and 0 when the motion stops. However, I'm not sure of the best way to implement the timer. I'm stuck on how to best implement the rest.

Any thoughts would be greatly appreciated!

6 minutes ago, stre1026 said:

So I have a situation that I'm sure many of you have... I have kids that like to leave lights on all around the house. What I would like to do is start a timer based on the motion sensor tied to my ELK security system in the kids playroom. So when the turn the lights on, it will start a timer for say 5 minutes and if there is motion detected, it will extend that another 5 minutes. I'm trying to wrap my head around the best way to do this. I have state variables setup and a program that updates the motion state variable to 1 if it detects motion and 0 when the motion stops. However, I'm not sure of the best way to implement the timer. I'm stuck on how to best implement the rest.

Any thoughts would be greatly appreciated!

That all depends on whether the ELK sends every motion sensed On signal to ISY or just the first change of state.

You would need a much longer timer to avoid the lights going off randomly while they play in the room, unless your MS will detect the floor play in every corner of the room.

Edited by larryllix

  • Author

The ELK sends every motion. I have the variable updating quite quickly.

There may be a simpler solution.  I use the program below to power my under bed lights.  If there is just a single event turning on the motion sensor the lights will extinguish after 5 minutes.  The else statement triggers only after no motion has been detected for five minutes.  The motion sensor is set for "On Only" commands.  Hope this helps.

 

Bedroom Motion Right - [ID 000A][Parent 0001][Run At Startup]

If

        (

             'Bedroom / Bedroom Motion-Sensor' Status is On

         And From    10:30:00PM

             To      Sunrise (next day)

        )

Then

        Set 'Bedroom / Under Bed Lites' Fast On

        Wait  5 minutes

        Set 'Bedroom / Under Bed Lites' Off

Else

        Wait  5 minutes

        Set 'Bedroom / Under Bed Lites' Off

 

I typically separate my off program from my on. This allows me to easily override my off programs or have multiple programs without causing issues with one another.

If motion is switched off

And motion is not switched on

Then wait 5 minutes turn off

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.