Jump to content

question about motion and turning off lights


wdhille

Recommended Posts

I'm scratching my head on this one, but I think I need to start using variables. Here is what I have and what I want to do:

 

- Master bathroom has one motion detector and three light switches. 

 

I'd like the following to happen:

 

- If any of the lights are on, turn them off if the motion detector does not see motion for ten minutes. 

 

 

What I have now starts the ten minute timer when the motion detector sees no motion, but I need to reset the ten minute timer if the motion detector is activated again. So it's like I need a "goto" statement in the logic flow. As you can see I'm new at this, so thank you for helping!

 

Wayne

 

post-10265-0-44800400-1516286976_thumb.jpg

 

Link to comment

Hi Wayne

 

Here is what I do

  • Put all of the switches and the bathroom MS in a scene.
    • If you want the switches to also turn all of the lights off make them controllers
    • Or, if you want them only to respond to the motion/timer program only, leave them as responders
    • You'll have to get the motion sensor, open the battery door and press the set button till it blinks to put it in linking mode first
  • In the admin console, find the master bath MS, click options and check the box for "send on commands only"
    • Do this while you have the MS down and in Set mode from above, it will stay in set mode for 5 minutes or so, its LED will be flashing
  • Change your program so it looks for master bath MS "switched on" instead of "switched off"
    • That way, every motion sense will send an "On", and restart the program and its 10 minute timer
  • Change the program to "Set <scene you created> off", instead of turning each light off individually

I do this for my driveway motion sensor and stair hallway sensors. You can also have the program dim the lights first for a few minutes first as a warning before turning off, in the case their motion is not caught.

 

Paul

Link to comment

It may be enough to change "control" to "status" of your existing program, but there may be some edge cases where the lights are turned on for some reason and mostion is never detected.

 

Don't think variables are needed, but others might like them for some reason.

 

Try something like:

 

if

status light1 is on

or

status light2 is on

or

status light3 is on

then

run next program

else

nothing

 

next program:

 

if

status motion sensor is off

then

wait 10 minutes

turn off all three lights

else

nothing

 

(This approach requires that you have not disabled the OFF commands from the motion sensor)

Link to comment

It may be enough to change "control" to "status" of your existing program, but there may be some edge cases where the lights are turned on for some reason and mostion is never detected.

 

Don't think variables are needed, but others might like them for some reason.

 

Try something like:

 

if

status light1 is on

or

status light2 is on

or

status light3 is on

then

run next program

else

nothing

 

next program:

 

if

status motion sensor is off

then

wait 10 minutes

turn off all three lights

else

nothing

 

(This approach requires that you have not disabled the OFF commands from the motion sensor)

I take it that you do not disable the second program, either, so it runs on every status change?  I don't see what would cause the 10 minutes to extend if there is still motion.  would you  need to add "AND status motion sensor is not on"?  

 

edit:  I think I get it.  status changes to On, would set it to Else (nothing) and then it would restart if it went off again.

Link to comment

OK, so thanks for the advice. I'm still struggling with the concept of "status" and "control". So my ten minute timer will start if it sees motion, I get that, but then if it sees the status change to on it resets the timer. So, I think Oberkc is spot on, just change the motion to status instead of control. I'll know soon enough...  But with this, the timer gets reset if it sees motion and the "status" of motion is on???   Like this:

 

 

post-10265-0-64851400-1516304631_thumb.jpg

Link to comment
the timer gets reset if it sees motion and the "status" of motion is on???

 

no, but hopefully the timer will turn off and see motion well before 10 minutes.  If this is a major concern, perhaps you should minimize the time out of the motion sensor to that it turns off quickly.

Link to comment

Not sure if this would work, but you can give it a try.

 

1)  Go into the motion sensor options and set timeout to 10 minutes. 

  

    (from Universal Devices wiki -> linking a motion sensor)

  • Timeout (minutes) - Defines the period of inactivity before the Motion Sensor will send an Off. Default = 1 minute. Range = 0.5 - 120 minutes in 30 second increments.

 

2) Add a program as follows:

     if 

           status (motion sensor) is OFF

     then 

           set scene MasterBathroomAllLightsOff OFF

     else

 

 

Create the scene  MasterBathroomAllLightsOff  with all of the switches as responders

 

I edited this post after I looked more closely at your original post and belatedly noted that you had three separate lights in the bathroom, not three switches controlling a single bank of lights.

 

If you create the scene with the switches as controllers, then you will turn all of the lights on with any switch, which may not be what you want.

 

 

 

Jack

Link to comment

Jack,

 

Your suggestion is very similar (adding a scene) to his original post.  I suspect it will work most of the time, but I was concerned about one possibility:

 

what happens if someone, somehow, turns on one of those lights, but the motion detector fails to pick up motion?  (The lights would stay on indefinitely.)  While it may not be possible, I think it valuable to also trigger the 10-min countdown upon turning the lights on, just in case.

Link to comment

Jack,

 

Your suggestion is very similar (adding a scene) to his original post.  I suspect it will work most of the time, but I was concerned about one possibility:

 

what happens if someone, somehow, turns on one of those lights, but the motion detector fails to pick up motion?  (The lights would stay on indefinitely.)  While it may not be possible, I think it valuable to also trigger the 10-min countdown upon turning the lights on, just in case.

This is one feature I always like to install. The just-in-case safety lines. Spot on!

Link to comment

Good point oberkc.

 

There were two differences between the original program and my suggestion though.  The first was, as you noted, the use of a scene.  The second was moving the timing from the program into the built in timeout function in the motion sensor.  I am not sure how aware people are of this feature, and wanted to point it out.

 

Jack

Link to comment

First, thank you to everyone who took the time to respond to my original question. The easy fix, as some of you said, was use "status" instead of control for the motion detector. That worked perfectly, and I had been doing that on some other programs, but I failed to understand that status and control were different. 

 

Thanks again!

 

Wayne

Link to comment

First, thank you to everyone who took the time to respond to my original question. The easy fix, as some of you said, was use "status" instead of control for the motion detector. That worked perfectly, and I had been doing that on some other programs, but I failed to understand that status and control were different. 

 

Thanks again!

 

Wayne

 

Understanding the difference is critical in fully employing the power of the ISY.  If there are questions, it never hurts to re-look at user manuals and wiki.

Link to comment

Archived

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


×
×
  • Create New...