Distinguish between Open door for come in or go out?


(Dias Extraños) #1

Some way to known if, after door open sensor activation, someone is coming in or he/she gets out?

I’m thinking by example about a solution that combines a door sensor with a motion sensor (monitoring space in the drawing room, in front of the main door). If the sequence is door->motion, someone gets in; if the sequence is motion->door, someone gets out.

Any hint about this or other possibilities ?


(Barry) #2

The approach you describe won’t be very reliable:

  • A person inside could open the door to get some air, receive a package, hand out Halloween candy, etc. - and then close the door, remaining inside.
  • A person could be inside the range of the motion sensor while someone is entering from outside.
  • Motion sensors generally report “Motion Detected” for several minutes after seeing motion.

Perhaps a bit more reliable might be to use pressure sensors under doormats both inside and outside. I don’t know of any SmartThings-enabled doormats, but such would be a bit more reliable.

Another approach might be to use a automated door lock, like the Schlage. With supporting smartapps, you can be notified when the lock is unlocked using a code (with different codes for different people if you want); it will also tell you when the door is manually unlocked or unlocked (generally from the inside, unless someone has the physical key). So: code unlock, someone is entering; manual unlock, someone is leaving, manual lock, someone is staying inside, coded lock, someone just left.


#3

Pressure mats that work with SmartThings. These are also popular for Halloween, by the way. :jack_o_lantern:

Using the user code on a smart door lock is a very good idea and should be one of the most reliable methods if it’s a door that has a smart lock on it. :sunglasses:

Some people have tried this with two sensors, but the timing gets really tricky. See the following recent discussion for more details:


(Arn B) #4

My SHM Delay app does all of that and more.
For Exit Delay:

  1. When using a Keypad in conjunction with the SHM Delay and Lock Manager, there is a timed exit in Keypad when the Smarthome system is not armed.
  2. When not using a keypad use SHM Delay TrueExit in conjunction with SHM Delay for a timed exit when the SmartHome system is not armed

For Entry Delay:

  • When Contact sensor is opened, a motion sensor may be set to “Follow”, meaning it won’t trigger the alarm. However, at other times in away mode it triggers an instant alarm.

SHM Delay also has Open Door messages issued after the system is armed and at user defined intervals after the initial warning.


#5

I’m confused: a delay is not the same as a direction.

The OP trying to determine the direction from which the door was opened.

For example, if I’m outside of the house and I open the door to come in, turn the Livingroom lights on. But if I’m inside of the house and I open the door to go out, turn the Living room lights off.

Does your SHM Delay do that?


(Arn B) #6

I misunderstood the intent of the OP. @JDRoberts is correct SHM Delay does not do direction.


(Dtm) #7

I’m also looking to do this OP…will setup something with door sensors and motion soon and see what I can do.


(Dias Extraños) #8

What about a capacitive sensor placed in the interior door handler ? In this way, it could be know if the door is open from inside.


#9

That would be clever. :sunglasses: You still have the issue that you don’t know if the person just opened the door to receive a package, but they weren’t actually going out.

Many times the solutions available will depend on the habits of the household and the building architecture.

And the package delivery use case is almost always the trickiest, because in that case there is someone coming to the house from outside. So you can’t usually capture enough data just from local sensors, you have to start throwing either mode or Geopresence into the mix, or a package delivery will be identified as an “arrival” event when you don’t want it to be.


#10

This is very easy with WebCoRE…although it might look daunting at first, it is, simply put, amazing…I stumbled on this system and never looked back…There are many people that can help you with this if you need help…but once you have it set up, you just make a quick “piston” that says if motion is first, then the door…then do this…if the door first, and then motion (or no motion, etc.) then do this…And you can make this way more complicated, if needed, by adding time restrictions, day restrictions, and many, many others…

Please check it out:


#11

Again, though, if you just do the “if door first then motion” versus “if motion first then door” then your rules for “someone goes out” will be triggered if you open the door to accept a package or a pizza delivery. That’s why this is all a little more complicated than it seems at first.

@storageanarchy 's suggestion of thread of basing part of the logic on a smart lock solves this if the smart lock can distinguish between the lock being opened with the manual lever on the inside versus being opened from the outside with a code.

In some households, you can also do this with mode but only if you have an “I’m leaving” mode which is different from your “home” mode and is triggered by something else yet again. (I do this at my own house as discussed in the thread on that method. )

There are some other ways to approach it as well. And webcore can definitely be useful once you have laid out your desired set of events to distinguish “coming home” from “leaving home.”

But first, you have to figure out what to do about the door opening when you are not leaving the house! :sunglasses:


#12

You can avoid a false positive on this by setting a time limit as well on either and/or the motion and the door. Typically, if you accept a package, the door will be open slightly longer than if you just entered and/or exited. This can be set in the parameters. It would likely take some tinkering, but the rule can be adjusted and narrowed and he/she experiences how the rule is working…


(Tyler Durden) #13

“So say we all!”

I was about to reply with the same sentiment. Also, if you use a solution involving motion sensors, you have to make sure you set them up so that they don’t detect external actors not involved in the transactions.

I was thinking to use my Ring Doorbell as a motion sensor, the door’s contact sensor, and the various unlock triggers on my door lock (manual vs. code entry). But the non entering visitor really complicates things. Even your suggestion of pressure pads doesn’t eliminate that challenge. Perhaps you could use the time between sensor events to help determine what’s ‘really’ happening at the doorway, but I still think there’s going to be scenarios that gum up the logic. I think to achieve this with reliability, you need sensors that can dependably distinguish people from one another. (I assume the pressure mats could detect weight, but I bet that’s still not an air tight approach when there are multiple people entering/exiting, or people of similar weight on both sides of the door.)

I think ultimately we need more intelligent sensors or some extremely sophisticated logic with the dumb sensors currently available. But I would love someone to prove me wrong. :slight_smile:


(Chris ) #14

Why not just add presence to it, if presence changes x number of minutes before or after…


(Tyler Durden) #15

I think the major problem with assuming a time window for a particular event is that there will always be outlying scenarios. The pizza delivery guy forgets his pen for you to sign the receipt, the dog running out the door, the significant other just deciding to leave the door slightly open while she lets the cat sit on the front porch bench, popping in and out because you left something right inside the doorway, etc. My hat’s off to anyone who can boil it down to some webcore pistons that don’t turn my smart house into a human training device forcing me to follow specific doorway handling procedures. :slight_smile:


(Chris ) #16

Just a condition in piston that uses presence should work.


(Tyler Durden) #17

I guess it depends on why the OP is asking for the monitoring. Is it for an immediate reaction?

My experience with presence is limited. I stopped using it because it required everyone to have their cell phone on them and even then it would act up. I tried adding life360 to improve the behavior, but that caused some phones to have shorter battery life and performance issues. But assuming that’s not a problem, is the range on the presence sensor tight enough to know you are not home but at the neighbor’s house, or in the back yard and not inside?


(Ron Talley) #18

I use webCoRE and “Was” and “At Least” for this. Many scenarios where I have this type of monitoring setup. Their not perfect but works pretty good.

If contact was not opened in the last 1 minute
And
Motion changes to Active
Then Send Notification

That one only sends notifications if someone is coming towards the house

Here’s one for simple direction
If motion 1 changes to active
And
Time is betweem x and y
And
And motion 2 is inactive
Then turn on light
If light was not on for at least 1 minute
And
motion 2 changes to active
Then turn off light

That one turns off the light if traveling in a certain direction

You can cook these up with webCoRE pretty easily. The more Sensors you have, the more accurate a response you will get.


(Chris ) #19

I’ve only had problems with key fob presence sensor, on s8+ note 8, s7 edge, and v20 presence works pretty darn well.

Only problem with that is if like you said, just at neighbors, depending on how close they are could be a problem. Even at it’s best a phones GPS is only accurate to about 3m. Can adjust radius in app but 15 feet could be difference between your living room and your neighbors.

I set it up at my sister’s so that it uses WiFi to determine whether or not home, if connected then home if disconnected for x number of minutes then not. Each way has flaws.

I can’t go ANYWHERE without my phone, my kids can’t either, so that’s not really a concern for me…unfortunately.


#20

Actually, since I’m in a wheelchair, the door is often open for A shorter period of time if I’m just accepting a package. :wink:

But even for able-bodied people, I think all bets are off if it’s a pizza delivery and you have to pay for it. :pizza:

As you say, it’s just one of those things where there may be a lot of tinkering involved to get it just right for each individual household. But that’s why I like the suggestion of using the smart locks so much. There you actually get different information sent to the network depending on whether the door was opened from the exterior or the interior side. :sunglasses: