Motion Lighting On with contact - staying on

Maybe I've misunderstood the "contact sensors to turn on lights" feature. I guess I assumed that contacts could be used as another trigger like motion to turn on the lights, but then they would go off after the delay, just like with motion. Instead what seems to be happening is the lights stay on forever when they have been turned on by a contact.

I want to have my outside lights go on if I open the front door (from inside) at night for example, so I added the front door contact to the outside lights ML. It works, but they seem to stay on whether or not there is any motion.

1 Like

Anyone have any experience with using contacts in ML?

Have you tried simple lighting?, it has the options that you are looking for.

I need motion and contact as triggers, simple lighting only seems to allow one trigger.

I'm seeing this as well. The lights don't go off if the motion sensors aren't triggered. Real bummer since I deleted the virtual motion sensors I was activating with 2 contact sensors in RM4 and then aggregating them with the real motion sensors in Zone Motion Controller. Looks like I'll be redoing that unless @bravenel says this should be working.

If you notice, this is an option for a way to turn on lights. The app is still Motion Lighting, not Motion and/or Contact Lighting. Conceivably an option to turn off lights when a contact closes could be added. However, let's not keep pushing Motion Lighting to do more and more things until it is simply another Rule Machine.

1 Like

That makes since to me when you put it like that. Contact sensors act like a switch to turn on lights. Generally I'm not going to open a door, and then just shut it without triggering the motion sensors. Thanks for explaining.

But IF you did, lets say to let the non-motion-triggering cat out, Im sure you wouldn't want the lights staying on forever afterwards.....

I dont see the point of allowing contacts to turn on the light forever in ML. Does anyone use it?

I see your point. Just create a virtual motion sensor, and in the device page you can select it to turn off after a certain time. Then create a RM rule that if the contact sensor becomes open, then change virtual motion sensor to active and add the virtual sensor to your motion sensors in ML. This is how I was doing it before the change.

Yep that's what ive done, thx.

Actually, the user who first requested this feature uses it. His use case is this: He wants the light to come on when he opens the door to a room that has ML controlled lights. He gets faster response from the contact sensor than from walking into the room and tripping the motion sensor. But, he does walk into the room and trip the motion sensor.

I will look into adding an option to turn the lights off on a contact sensor closing, so that it's a matched pair.

1 Like

That's how I use the contact sensor function in ML as well.

I also get faster response with this than with having to use a rule triggering a virtual motion sensor, and adding a simple lighting rule for the contact sensor left me in the dark. Since I am definitely big enough to set off the motion sensors, I never noticed that it didn't shut off until I tried it.

The feature to allow contact sensors to turn off the lights has been added to Motion Lighting in the latest hot fix release.

I will check this out tonight, thanks! Does it turn it off right away with the contact? or can there be a delay like with motion?

It turns off right away with the contact closing.

Ok so, here's my use case. By my testing, it looks like it won't work like this with ML? I have a contact sensor on the door going into the garage. I also have a motion sensor out there, but it's not pointing right at the door. I'd like the contact sensor to turn on the light, but I want it to follow the same 5-minute no-motion timer as the motion sensor has. Like others have said, if I open the door, but do not go out and then close the door, the light stays stuck on.

I did see the setting to turn off the light when the door contact closes, but that overrides everything, so if I go open the door, the light turns on and when I close it behind me, the lights turn off when I'm in the garage. I stood there in the dark and finally after like 30-secs of waving my arms around, the motion sensor kicked in and turned the lights back on, but obviously that doesn't work very well. :slight_smile:

So, what I'd like to happen is have the door contact sensor turn on the lights, but I want the 5-minute no-motion to turn the light off after 5-minutes, even if I don't go out there.

If that doesn't work, does anyone have any theories about why the motion sensor doesn't pick up after going out there so the light doesn't turn off as soon as I close the door behind me?

Use this code from Hubitat to create a virtual contact motion app. Use it to use your contact sensor as a motion sensor in the built in zone motion app with the garage motion sensor. Then replace the sensor used in your garage motion lighting app with the one created by the zone motion app and remove the contact sensor from the motion lighting app.

Interesting! Thanks!

1 Like

With your current setup, the motion sensor is probably getting canceled by the contact closing. I have tried several different ways of incorporating the contact sensors into the garage with the motion sensors and this has been the winning combination. The lights are one before I have the door half way open. My contact and motion sensors work together as one sensor.