Best way to automate door locks

I use presence to unlock, but automatically re-lock it after 5 minutes. That way, if something goes wrong and it unlocks when I'm not home, it will only stay unlocked for a few minutes.

2 Likes

That can't happen as Alexa requires a 4 digit pin to unlock any lock by voice. Now, if someone has your pin, that's another story that should be addressed first.

3 Likes

I use both automated unlocking and locking. Unlocking is done by presence with both the Alexa app and Life360 for both me and my wife (both have been rock solid) with an automatic re-lock after 3 minutes if the door hasn't been opened. I can also unlock via dashboard and the Alexa app.

As for automatic locking, I have contact sensors on each door and when it closes, the door locks. I also have each door lock to lock/lock out after 2 wrong pins.

1 Like

Could you by chance share your auto lock rule? I have one that's working but like the way you described yours. Thanks in advance!

I use a combination of wifi and iBeacon ( Bluetooth ) to auto unlock my door. It is also used to figure out if the house is occupied or not. I have iBeacons placed both inside and outside. As soon as I approach the front door, it unlocks- and all the other desired things happen. When talking about auto lock, I use a combination of motion, time and a door sensor.

1 Like

This is my auto-lock in case the lock unlocks and the door doesn't open:

This is my auto lock anytime the door closes:

3 Likes

Hello, would you be willing to share a step-by-step guide to replicate this Rule ? i am trying to do the same with this rule but i am trying my best to learn hubitat rule machine.
Thank you in advance.

I use this for automatically locking the doors. Help. Automatically locking back door

Doors locked is the default mode for my house and unlock with presence when I get home. Alarm disarms when we get out of bed with a pressure sensor and arms at night when we go to bed with the same pressure sensor. Also arms when everyone is away.

2 Likes

I use this app also, works great. Just a heads up, The mode settings are not currently working with the latest hubitat update (2.2.3.118)

1 Like

Thank you @lewis.heidrick . That trick with pressure sensor is really neat.
Although, i do not have any pressure sensors at the moment but i will look into it soon.
In my current setup i have a door sensor and a zwave lock and i want it to remain unlocked if the door contact sensor is open. But if the door sensor is closed, i want HE to lock the door after a minute or two.

The auto lock app wont lock the lock if the door is open. It checks for closed state first.

def lockDoor()
{
log.debug "Locking Door if Closed"
if((openSensor.latestValue("contact") == "closed")){
log.debug "Door Closed"
lock1.lock()
} else {
if ((openSensor.latestValue("contact") == "open")) {
def delay = minutesLater * 60
log.debug "Door open will try again in $minutesLater minutes"
runIn( delay, lockDoor )
}
}
}

Yea, saw that too but I just use rules for modes anyways. Helps me keep my rules simple.

image
image

ohhh i just cut and paste the code under apps code. i did not know this was an app.

Copy paste the code in this link.
https://community.hubitat.com/t/help-automatically-locking-back-door/34998/6

It goes in apps code and then hit save. Add user app on the apps tab and then set your setting for lock time.

3 Likes

Thank you @lewis.heidrick that apps works exactly how i wanted.

1 Like

Hello everyone... I am migrating over from Smarthings. And the first things I am doing is getting my contacts and locks set up. I have them all ready to go, and for the last few days I have been trying to get the autolocking going. I have tried many different methods. Webcore, RM, and now I stumbled accross this app, which seems simple.

On Smarthings I used Webcore, and doors locked pretty much 99% of the time, after the door being closed.

Thus far on Hubitat, I have found RM not reliable, as I keep finding the doors unlocked. This morning I am trying this app, and still over the past few hours am finding some doors unlocked. Is everyone here getting pretty solid results?
Do you guys have a backup rule going by any chance? I have my doors locking after being closed for 1 minute. But if it somehow doesnt lock, perhaps I put a second code in to check again in two minutes?

Have you used the app mentioned above by @lewis.heidrick?

Yes that is the one I am using now, figured it would be the simplest. Yet, this morning I went to a lock, and it was unlocked. So it must not of fired?

Just tested it again, went out the door, waited till it locked. It did. Then I came back in the house, and then it never relocked. It is like it doesnt want to do it after one time, unless there is a lot of time in between

@lewis.heidrick - agreed, Auto Lock is a reliable and simple app, works great for me w/my Schlage lock. In fact, you probably pointed it out to me as well. :slight_smile:

It seems to be working correctly for a lot of us. Are you using correct lock driver ? Have you checked your automation rules to see if the lock is in any other rule ?