Jump to content

Motion timer


stre1026

Recommended Posts

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!

Link to comment
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.

Link to comment

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

 

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...