wdhille Posted January 18, 2018 Posted January 18, 2018 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
cam Posted January 18, 2018 Posted January 18, 2018 Hello Wayne I have over 75 motion sensors doing the same thing... I’ll be home in a couple of hours and I’ll send you the program format I use. Sent from my iPhone using Tapatalk
paulbates Posted January 18, 2018 Posted January 18, 2018 (edited) 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 Edited January 18, 2018 by paulbates
oberkc Posted January 18, 2018 Posted January 18, 2018 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)
ScottAvery Posted January 18, 2018 Posted January 18, 2018 (edited) 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. Edited January 18, 2018 by ScottAvery
lilyoyo1 Posted January 18, 2018 Posted January 18, 2018 Is the motion sensor turning the lights on or are you turning the lights on manually?
oberkc Posted January 18, 2018 Posted January 18, 2018 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. Exactly!
wdhille Posted January 18, 2018 Author Posted January 18, 2018 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:
lilyoyo1 Posted January 18, 2018 Posted January 18, 2018 I would create a scene and drop all devices into the scene as responders. That way it simply shuts down the bathroom. If control motion is switched off And control motion is not switched on Wait 10 min. Set scene bathroom off
oberkc Posted January 18, 2018 Posted January 18, 2018 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.
jrainey Posted January 19, 2018 Posted January 19, 2018 (edited) 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 Edited January 19, 2018 by jrainey
oberkc Posted January 19, 2018 Posted January 19, 2018 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. 1
larryllix Posted January 19, 2018 Posted January 19, 2018 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!
jrainey Posted January 19, 2018 Posted January 19, 2018 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
wdhille Posted January 25, 2018 Author Posted January 25, 2018 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 1
oberkc Posted January 25, 2018 Posted January 25, 2018 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.
Recommended Posts