Want to keep a switch turned on as long as motion

The objective is to keep a switch on in my garage as long as there is motion, and have it go off after motion ceases, I'm using battery powered motion sensors which only sample for motion every 4 minutes or so. Thus, it the motion sensor turns the light off in between its sampling events, motion will not turn it back on until the next sample time.

I hope this is clear - still a newbie. AND - I hope it can be done!

Try the native Motion Lighting Apps. I'm not sure a delay of 0 for inactive motion can be set in MLA, but it's worth a try.

If it cannot be done in MLA, I know it can be done using Rule Manager.

1 Like

If I understand the issue right, and assuming you're using the simple lighting app, I would think just adding a delay of 4 or 5 minutes for turning the light off should take care of it. That should keep the light for turning off for the duration of the cool off period, or whatever you want to call it. If the sensor goes active again prior to the end of the delay period it will start the process all over. Only downside is the light will stay on for 4 or 5 minutes beyond period the motion sensor goes inactive.

1 Like

I have been playing with the delay time for several days. The problem seems to be that if there happens to be no motion when the motion sensor becomes active, it will need its built-in non-configurable 4 minute delay before it looks for motion again. The manufacturer says this delay is provided to preserved battery life.

I just don't see a way to cause the motion sensor to become active or inactive at will. I can keep the switch on for as long as I wish, but at the end of that time if there is no motion the sensor will become inactive for 4 minutes.

Here you go. This is using the Hubitat Simple Lighting App. Note that the motion has to be INACTIVE for at least 5 minutes before the lights will turn off. Since your motion sensor can update its status every 4 minutes, this should prevent the lights turning off while you're in the room. You can also increase this timeout if desired. Each time the sensor sends a 'motion active' status update to Hubitat, this timer will be reset to 5 minutes, and will only start counting down once the sensor sends a 'motion inactive' status update to Hubitat.

1 Like

Yep. That does it! My mistake was that (using Rule Machine) when motion became active I initiated two actions: (1) turned the switch On, AND (2) turned it Off after a delay. As you showed me - the second action was not only unnecessary, it was foolish!

Thanks to all who helped! Although 84 now, I'm really enjoying getting the Hubitat in charge of the house. Formerly I was using both Wink and SmartThings. They have not just been replaced by Hubitat, but I've added several more useful goodies. For example, if I unlock the front door (Schlage) between sunset and sunrise, the lamp nearest the door turns on. No more tripping over a rug if the house is dark.