Detect one-way access through a door?

I have a garage side door that has a magnetic contact sensor on the door, and an outside PIR motion sensor. I want to detect passages through the door from outside to inside and turn on a garage light (if not already ON) after sunset.

However, I don't want the garage light to turn ON if the door is opened from the inside (triggering the contact sensor) and a person passes outside (triggering the PIR motion sensor).

I think I can work out the logic in Rule Machine of "motion sensor ACTIVE" then "door contact OPEN" to detect an out-to-in passage, BUT has anyone solved this already? My main concern is that the door contact sensor might be faster responding than the PIR motion sensor, and thus "confuse" my logic by being "out of order" in some cases.

I'd like that app if you build it! I go outside every 30-60 mins to smoke a cig. I've a motion sensor inside the door and a contact sensor on the door. same thing, just reversed. An Entryway light inside the door never quite works right since it doesnt really understand if I'm coming or going :slight_smile: so - yea. +1 if you find or build this!

An appropriate fine turned delays could be a solution. For insdtance, you can artificially delay a response from a contact sensor.

I would use a conditional trigger
Door contact open - ONLY IF (Motion active)
And turn on logging for your devices and see if timing is an issue. If it is, you could consider placing a motion sensor in the garage and use inactive motion instead.

1 Like

The built-in Motion Lighting app can be configured to require that a motion sensor triggers first within a defined time window; when the contact sensor opens during that timeframe, an action can be triggered.

2 Likes

This Rule worked for me (at least in brief testing):

I think one problem that you may run into is that the motion sensor can be triggered (by some other activity) while you are in there - giving you unintended results.

I just use motion sensors in my garage to activate lighting while I'm in there.

I donā€™t think that will be a problem, because the door must be opened as well. Mere presence of someone in the garage while someone else walks by the sensor outside the closed door wonā€™t turn on the lights. Further, since the condition is that this be between sunset and sunrise, if Iā€™m in the garage I likely have the lights on anyway.

And youā€™re right, I probably could add a motion sensor in the garage as you have done, but I was trying to use existing hardware.

I get that, but I was thinking more of a scenario where someone walks by triggering motion and you open the door to leave. Seems to create the same conditions as entering. Or maybe I'm not paying close enough attention to what you are doing.

Just to think outside the box from the earlier discussion, how about a pressure-sensitive mat that detects someone walking over it?

I had already bookmarked a couple of the pressure sensitive mats in Amazon, but if my Rule (above) and existing motion sensor and contact sensor do the trick, I save some money AND don't have to kluge up a mat and Zigbee module (contact sensor, water leak sensor, etc.)

It's a garage side door, so the likelihood of Alice walking by outside just as Bob is opening the door from the inside, all at night, is pretty low. It's a convenience issue, not a safety matter, so some odd results are acceptable in any event.

1 Like

Heck, my garage is dark enough with the doors closed that I turn on the lights whenever I'm in there, via motion.