I want an automation that I think should be simple, but I can’t figure it out.
There’s a door from the house to the garage with a door sensor. I set the door sensor to turn the garage lights for ten minutes, then turn them off. It’s great for taking trash out to the trash can in the garage or getting the car out of the garage.
But if I’m going out to work on something in the garage, I don’t want the lights going off.
So I figured I could install a motion sensor that would keep the lights on - I could program it to keep the lights on for an hour if motion is sensed in the garage. But the motion sensor doesn’t defeat the “lights off” timer initiated by the door sensor. Even though the motion sensor has seen me and commanded the lights to stay on for an hour, the door sensor countdown timer still turns the off.
Is there a simple way to defeat an in-progress countdown timer in a device?
The desired logic is:
- Open door to garage and turn lights on for ten minutes.
- If motion is detected in garage, cancel the ten minute countdown timer and keep lights on for an hour from when motion is detected.
Timers cannot be stopped once started.
The easiest thing is to add a precondition to the routine so that the light only turns on if it is off.
This way if you turn on the light before opening the door, the routine will no longer run and the timer will not start.
I’m a bit confused by the logic. If you’re in the house and going to the garage, the garage door sensor will turn on the lights for 10 minutes. Once you’re through the door and into the garage, won’t the sensor always pick up motion? That you are then saying you want to keep the lights on for an hour.
Why not just have the door sensor turn the lights on with no timeout? And then set a routine that turns off the lights when no motion is detected within the garage for 10 minutes? Similar to what Mariano suggests above, I normally use the light being on as a pre-condition for my time-out routines.
@Mariano_Colmenarejo Thanks, Rebel & Mariano. I was going to write the same thing as Rebel just did.
Rebel wrote “Why not just have the door sensor turn the lights on with no timeout? And then set a routine that turns off the lights when no motion is detected within the garage for 10 minutes?”
That’s a good idea, but I mounted the motion sensor on the ceiling over my workshop area. We have a two-car garage and in that location the motion sensor doesn’t cover the entire garage area. So it’s likely I would walk into the garage through the door to drop garbage in the garbage can and the motion sensor would not be activated.
I ordered a second motion sensor today to cover the other half of the garage by the door and garbage can so I can implement what you suggested.
It literally just dawned on me that I will have the new problem of how to set up TWO motion sensors so that the lights will be turned off if BOTH of them have not sensed motion in (say) one hour. If ONE of them sensed motion, then do not turn off the lights. So maybe I’m just back to the very same logic problem of one motion sensor (the one that sensed motion) cancelling the shutdown timer in the other motion sensor (the one that did not sense motion). Ugh.
Right now, I turned off the timer on the door sensor and I just turn the lights off manually when walking back into the house. I have a master “Off” routine that shuts the garage lights off at 11 PM. That covers the case where I forgot to turn off the garage lights. I am no longer working in the garage past 11 PM, so I don’t expect to have the lights go out inadvertently at 11 PM.
Maybe the best solution is NO motion sensors, turn the lights off manually when going back in the house, and having the 11 PM automation turn the lights off no matter what.
Hi @OldPro I don’t think you’ll have the same problem with 2 motion sensors. It’s not like they start a timer to turn off in an hour as soon as motion is no longer detected. If no motion is detected for the time specified, then the “off” command will be issued.
In your case, you could write a routine that required both conditions to be true (sensor 1 no motion for 1 hour AND sensor 2 no motion for 1 hour) then turn off the light.
With all that, your suggestion of 1 hour seems like a long time to wait to turn off the lights
That’s a really good point. It isn’t a timer in the motion sensors counting down. Rather it is a command being issued after the one hour timer in the motion sensor expires. There’s a big difference between the two.
The duration is easy to set and I’ll experiment with it. I forgot to mention that I’m thinking one hour is good because I’m often in and out of the garage when I’m working on projects. I might have the garage door open and be working on a yard project for a while and come back into the garage for tools, equipment or supples. Same with projects in the house. I changed out three crappy incandescent bulb sockets for six big LED light panels in the garage. What a difference that made in lighting! I want to optimize saving energy but also minimize light on/off cycles.
Most of all, I want to avoid the lights going off when I’m working something at my workbench.
I have two motion sensors to turn the lights on in the hall.
At night either of them turn on the lights, you could add garage door opens as well.
Either motion sensor no motion for three minutes turns them off.
Thanks. In your second routine, why do you use (No motion sensor 1) OR (No motion sensor 2)? Wouldn’t you want BOTH sensors to have no motion?
I have the following routine and I’m 99% positive, it will reset the timer if motion is detected before the timer goes out. But maybe since I have 3 timers, I haven’t noticed it isn’t. Now I need to experiment.
Sorry,I should have specified that Timers cannot be stopped once started, but timers can be initialize if the routine is fired again before timer ends
You can if you want, I want the lights to turn off as soon as possible. The sensors overlap so it doesn’t make much difference. If there was motion on the other sensor the lights come back on anyway.
I duplicated your routines, Andrew, and they are working like a champ. I mounted the two motion sensors on the ceiling of the garage. Either motion sensor turns on the garage lights (as does the wall switch and the garage door position sensor). Then, when both sensors have stopped sensing motion, the lights turn off.
- Settings: Motion Retrigger - 300 seconds (5 minutes)
- Settings: Motion Timeout - 600 seconds (10 minutes)
- Routine: No motion for 60 seconds (1 minute)
When I’m working in the garage, I keep retriggering the sensors before they time out so the lights stay on
After I’ve left the garage, it takes 600 seconds (10 minutes) for the Motion Timeout to occur. Then the Routine starts its 1 minute timer. So the lights go out after 11 minutes.
When I walk back into the garage, the lights go on again instantly.
I don’t know why I waited so long to put motion sensors in the garage.
Thanks again for your help.