Smart locks - How can I prevent a code from working, if someone is home?

Hi, I have a schlage century touchscreen lock, and I am putting my house on the market soon. I have the lock connected to smartthings using the Z-wave schlage touchscreen lock DTH, and “lock manager” for the app.

I’m able to lock and unlock the lock, add codes and users, and run automatons when a code is used to unlock the door. But I want to be able to prohibit a code from working if one of the presence sensors is detected as home. Is this possible? I’m going to give the realtor a code, and I don’t want it to work if either me or my wife are home.

the standard apps can’t do this, but some community ones can.

What are you using to perform this?

If you’ve already invested in Rboy’s apps, his lock manager can do this.


I’m using the one from ethayer.

I haven’t used that particular one. Maybe you can ask in that thread if it’s possible.

If you have access to RBoy Apps, then use the Door Lock User Code Management app, you can define presence based codes:

1 Like

It is easily doable with webcore.

I have a Schlage smartlock, and am using the Thayer Lock Manager. I send specific user codes to the lock based on specific conditions, and retract them based on other conditions. A presence being present/absent could, with no real difficulty, be a condition that sends or deletes a code.

I do use webocre, but am a novice at it. Is there a piston that you can share? I am abit concerned about messing things up, and potentially locking myself out of the house. Or if my internet or power goes out, could I get locked out?

Does your lock support disabling codes? If yes you should be able to use webcore. What is the backup to get in when codes are disabled?

Technically good chance you can lock yourself out either if you dont plan/program on webcore properly or because of smarthings failing. If you always have a backup key then you could test for few days.

It’s generally a good idea to only use one app on a single lock at a time. So if you’re using WebCore then just use webcore. If you’re using a SmartApp then only use that smartapp.

Using more than one app for controlling a single lock is asking for trouble as they will clash.

As for what happens when the connectivity is down, any codes that have been programmed will stay programmed and continue to function, however without connectivity there will no be updates made to the lock. So users cannot be added or deleted, but those already in there will continue to work.

A good measure is to create one permanent code and then the rest can be scheduled, presence based, mode, based etc (i.e. dynamic). That way if the internet is down and the dynamic codes cannot be programmed, atleast the permanent code will continue to work (as long as the battery is alive)

You can always change the “permanent” code if say you had to give it to someone who’s “dynamic” code didn’t work because the internet was down. That’s the big plus of smartlocks, you have lots of options if planned properly.

1 Like

This is exactly why the codes for my family are programmed into the lock itself. First four slots are not touched by Smartthings.

Just wanted to followup here… I did figure out how to do this with the lock manager. Just create a user, go into scheduling for that user, and you can specify a mode where the code is only active in that mode. So I set it to away, and that way no one can use the code to come in while we are home.