#Detect as I’m approaching front door

1 messages · Page 1 of 1 (latest)

keen forge
#

Recently got a smart lock and trying to get it set up in such a way as to unlock automatically as I approach my front door.

Requirements:

  1. Should only unlock for me (I’ll always have my phone on me, so something that can detect the phone maybe)
  2. Should only unlock if I am outside the door, not inside the house
  3. Should do it quickly enough that I don’t need to stop and wait at the door
  4. Nothing visible from / mounted on the outside

I’ve considered checking if my phone is connected to the WiFi, but that seems like a slow and unreliable method. I’ve also been looking at ESPresense and Bermuda, but haven’t looked too far into them.

I’m comfortable in software and hardware, so could probably implement any solution within reason. Any suggestions?

fast girder
#

Following thread 🙂

slim prawn
#

You will need to have something outdoor to ensure accurate measurements

graceful reef
#

If your location is accurate enough you could set up a Zone for your house and unlock it when your state changes from Away to Home. I'm not completely sure how fast it will be, but for my own automations set up that way they always work by the time I get to the door.

keen forge
#

I’m trying to avoid using GPS to make this work

#

I haven’t tried it, but it seems too reliant on the device’s background apps behavior

keen forge
#

What are you thinking would go outside?

slim prawn
#

Because you don't want the thing to unlock based on distance but distance and direction

keen forge
slim prawn
#

Would be difficult to triangulate objects outside of the triangle

#

Personally, why not have this unlock via sensor, like RFID key card or fingerprint or similar

keen forge
#

Also, I’m trying to avoid having a key at all (helps when both hands are full)

slim prawn
#

I see, that is unfortunate

fast girder
#

As of today, technology has its limitations 😅

chilly quiver
# slim prawn Would be difficult to triangulate objects outside of the triangle

You don't need an entire triangle of sensors for triangulation - just two will do the job for the most part - one each side of the door, eg mounted to opposite ends of the wall on the front of your house

Call them A and B. Ax or Bx is the distance to you from A or B. AB is the distance between them

When Ax and Bx are both < AB, you're somewhere within a triangle between those two points and and (0.9AB) in front of the centre of the wall between them. Or rather, two triangles, one each side of the wall

#

You'd need something extra (a third sensor inside the house) to figure out if you're inside or outside

slim prawn
#

well that is what he wanted. for it to trigger when he is outside of the door not inside

chilly quiver
#

Simple enough

If:
Ax < AB AND
Bx < AB AND
Cx > 0.9AB

... user is just outside the front door

#

You'd probably want to tinker with the exact values depending on the real world positioning etc, but you can absolutely do it. C doesn't even need to make the same sized triangle either, you could have C much closer to the door

slim prawn
#

very unlikely this would yield any decent results unless you get very high positional accuracy out of any of those trackers

chilly quiver
#

You don't need it to be super accurate, just enough to place OP within a ~3-5m area outside the front door

A typical tracker is going to be super-good-enough for this to work most of the time. Err on the side of caution with your distances for security reasons, and worst case scenario you occasionally have to use a fingerprint sensor or code

#

If OP's house is say 10-15m wide, it's not gonna be difficult to find sensors that have a ~3m accuracy at ~5-10m range

slim prawn
#

with that kinda accuracy he might aswell be inside the house
tho this would be something to try out

chilly quiver
slim prawn
#

3m is anything but accurate. if you do with your house size of 15m thats an error of 20%. you might aswell loose that on connectivity based on your surroundings with ease

#

really depends on what kind of trackers would be deployed wether or not you can account for that with some fixed calibration

chilly quiver
#

You're missing the point of what I'm saying there

I wasn't saying the sensors are 3m accurate (an esp32 proximity sensor is MUCH more accurate than that, even)

I was saying that even if your sensors aren't super accurate, you only need them to be able to place you in a 3m circle and so you can afford some inaccuracy... which is gonna be well within what you can achieve

slim prawn
#

again this entirely depends on where it thinks those areas it detected you in actually are

#

its no use if your 3m circle ends up being indoors

chilly quiver
#

No sorry you’re still entirely missing what I’m saying

I’m saying that you can definitely place yourself within a 3m circle on your driveway, and know it’s outside your door

slim prawn
#

thats a very empty statement without any regards to what is being asked

chilly quiver
#

You think “you can place yourself within 3m immediately outside your front door” doesn’t answer the question of how OP can unlock their door when they’re stood outside it?

#

And to be clear, I’m being VERY pessimistic with 3m, I just couldn’t be arsed with someone nitpicking over small margins

slim prawn
#

this is a boundary issue created by the lack of tracking accuracy you can achieve
he didnt ask wether or not it could unlock if he pulls up to the driveway but wether it would do so only when he is infront of the door

#

the inaccuracy isnt fixed in this, your detection radius may very well move inside where it shouldnt be

chilly quiver
#

I covered that above. You need a third sensor, but the third sensor does not need to create a triangle around OP… it just needs to be within the “reject” triangle

chilly quiver
#

The “C > 0.9AB” part ensures OP is outside not inside (assuming C is placed on the triangulation point, but it will work anywhere within that triangle as long as it’s not right next to A or B)

And that’s a naive implementation, you can do better if you use the ratio of Ax to Bx as part of your limit for Cx

#

You’d adjust if the door is offset significantly from the centre of the wall, but I was demonstrating the solution not writing a location specific implementation

#

Your premise was that you have to create a full triangle around something to detect something within that triangle. I’m pointing out that you don’t, as long as you can reject them from the “wrong” triangle

You do still need a third sensor, but it doesn’t have to be outside

#

If you really wanted to improve security: Combine it with a camera and you can do even better - you could detect OP in an outer “approaching” zone with a known distance, and then an “unlock the door” zone… and only unlock if the progression matches

slim prawn
#

it still fails on being inaccurate from my experience but whatever ;)
tracking approaches however could fix part of it

chilly quiver
#

I'm confident you could do it without tracking the approach, but it would be a good "belt and braces" addition for something security critical, for sure

slim prawn
#

probably less of a security and more of a convenience to setup and configure issue

#

you dont need to fight calibration by simply switching to an entirely different tracking system

#

its still both being unreliable but not in identical ways

chilly quiver
#

The camera tracking is more of a sanity check - eg you wouldn't unlock the door when there's nobody outside it. And since you'd be doing that, you may as well use it to increase security by checking your two detection methods match up

The camera is accurate, but can't tell who is at the door. The bluetooth detection can tell who it is, but you may have security concerns relying on distance alone. Combine them and you have a pretty robust system

Obviously the camera part is optional in that, but since most people with a smart home will have cameras anyway, it's basically free extra robustness

keen forge
#

Well, unless someone happens to be walking by while you happen to be close enough to the front door for noise to make it seem like you’re on the other side of the door