Automatically Lock after X Minutes in Away Mode

Can someone explain to me what is the purpose of unlocking the door after x seconds. Sadly the non-enhanced versoin of locking the doors has vanished with the tilt sensor for the garage door.

No longer a feature in v2, but you can go to marketplace and install the enhanced version also mentioned above in this thread.

Took me some time to figure that out as well. The idea seems to be that if you have a level handle, and you open it from the inside - this feature auto unlocks the outside so that you don’t ‘Lock’ yourself out.

There is no way to disable this though, currently in the Auto Locker program.

I did figure out a way to make a door using the IDE. You can then add the lock and the sensor in one. However I did not gain advantage of doing so, I wasn’t able to use this to make it autolock. Plus, i was left with duplicate things - the lock, the contact sensor and the door combining them. So I removed the doors I built and then used the auto locker smart app.

Ah…that makes sense. I set mine up to 1 second, but I am concerned that sending extra commands to a deadbolt lock reduces the battery life.

I have a z-wave dead bolt and this option makes no sense to me. The door sensor should not ever open when the door is locked. It shouldn’t be possible.

When someone unlocks the door and opens it I sometimes get this message:

“Front Door Lock unlocked after Front Door Sensor was opened or closed when Front Door Lock was locked!”

Huh? Maybe the door sensor sent its open status before the lock sent its unlock status? Any way, I really wish I could just disable that option.

These are asynchronous events – no way to predict the order they get to ST.

Of course, that is the only way that message makes sense.

Still, I am hoping that the option to unlock a door after its contact sensor opens can be disabled. It does not make sense at all for people with a deadbolt. The only way the door can be opened when the deadbolt is engaged is if someone kicks down the door. If someone kicks down the door and the door sensor is tripped THEN the deadbolt unlocks? :smile:

People have gotten into the source code and removed the unlocking part. It works fine for me, even with its quirky unlocking feature, so I don’t want to spend time chasing the code around and remove the piece that doesn’t make sense. Of course, there is the option to write own code, but the unlocking part hasn’t been giving me any grief, so why bother?

Now, that’s a great point! That is actually the enhanced ‘turn on knocking’ app…

1 Like

The only way to find out is to give it a shot, buddy! :wink:

1 Like

The feature is ONLY valid for lever handle door locks where you can open it from the inside while the outside handle remains locked. This unlocks it when the door opens to prevent you from locking yourself out.

Clearly the code has no way of distinguishing between a bolt lock and a lever handle.

A requested enhancement is a way to easily disable this feature.

I simply disabled the notifications in that regard.

1 Like

Have this app installed to lock my main door after its closed and unlocked for 5 mins…Since there was no way to not set the Automatically unlock the door when open and since there was no use to me with this feature I had it set to 305 secs…

So this evening while testing the lock and this app out during several open and manual closes I got the same message as @erocm1231 which didn’t make sense to me and I ignored them. Walked back into the house after this and manually closed and locked the door, then the door auto-unlocked about 5mins(305 secs) later and a message was delivered about what it did…I am glad it was set only to 5 mins and not some astronomical digit that would have made it auto-unlock in the middle of the night!

Now I have to figure out where that code is some of you guys are talking about that disables this feature before I can safely use this!!

Set it up to unlock after a second. Actually it worked well for me today. As I put my home in away mode, my wife happened to open the door. It locked the door while it was open and unlocked it after a second. You can find the code on Github under ST repository, but I don’t think you need to, honestly.

Yes just changed it and it seems to be working so far, thanks, but the push notifications keep rolling and its getting a bit confusing so far…Will turn them off for now but have to keep a watch on the lock state…

For me the not even the lever lock (I have the Schlage) has much use for the unlock command.

-If I use the keypad to get in, the unlock state is sent and reflected in ST…on a side note, the device re-locks itself 5 seconds after keypad unlock but ST doesn’t reflect that, I forget if the message doesn’t make it to ST or if ST doesn’t process it, but the auto-lock after closing for me was primarily to re-sync the state of the lock.
-If I open the door from the inside, the door isn’t unlocked, it’s just open. If I want to unlock it before opening, I’ll press the unlock button. If I forget to do that, I’ll enter the code to get back in.

Given the sync issue that already exists when using the keypad, another unlock command probably doesn’t help, especially since my lock in particular can sometimes get a frozen state in ST and I need to go cycle the state physically to get it back, though this hasn’t happened yet in V2.

I imagine this is as simple as making the input optional and not doing the action unless it’s filled out, anybody do that yet before I go at it?

I’ve proposed a change to the SmartApp that lets you optionally disable the “Automatically unlock the door when open…” feature. I’ve also brought it in line with the new “contacts” feature of SmartThings 2.0.

Here is the link if anyone is interested. Thanks to the original author that made it so I just had to apply a few “tweaks”. :smile:

Thanks for the modifications Eric.

I came across some code from @milktea that performs a check on the door to ensure it locked properly. If it didn’t then it sends a push notification. I like this a lot because sometimes if I don’t close the door all the way the deadbolt will hit the edge of the opening and not lock. I updated some variables and added it to your code to see if it would work but I haven’t got it working yet. Any ideas?

Here is the code from @milktea: Schlage Z-wave Lock Command Works Occasionally

It is added after line 84 in @erocm1231 code above.

def checkDoorIsLocked() {
log.debug (“checkDoorIsLocked fired”)
if ((contact.latestValue(“contact”) == “closed”) && (lock1.latestValue(“lock”) != “locked”)) {
sendPush(“Door auto-locking failed”);
runIn(30, checkDoorIsLocked);

Here is the code that tells ST to run the checkDoorIsLocked method.

def lockDoor(){
log.debug “Locking the door.“
send(”${lock1} locked after ${contact} was closed for ${minutesLater} minutes!”)
//Added next line to check door lock.
runIn(10, checkDoorIsLocked)

The one idea I had was that the 10 seconds is not long enough after the door tries to lock. Maybe it needs longer to update? Does anyone have any ideas ?

Did you get one pushed notification or many interval @ 30 seconds? If only one notification, then 10 seconds is not enough. If you can continues notifications, then the “if” condition failed every time the method runs. I had it set to 10 seconds because that is what the minimal value that works for me every time. It might be a different value with your lock. Good luck.

I was getting a ton of notifications. I changed it to 30secs and it works now. I am pretty sure it was due to the fact that 10 sec was not long enough for the lock to register as locked.

1 Like