[RELEASE] Lock Manager

After updating the device handler it took about a day before I started getting notifications.

Works like it used to again!

This sucks, I just can’t get it to work.

How many device handlers do you have listed?

Not sure I get what you mean. There are several lock device handlers in the list and I have a Yale lock so I published and assigned ethayer’s Yale lock device handler to the lock - I was using the ‘with codes’ version before. Went into the device handler code and made the change described earlier in the thread and after about 12 - 24 hours I started getting notifications about lock activity.

I should mention that the lock manager smartapp was dead for me - just took errors when I tried to change anything - so I removed and reinstalled it from scratch. I let it do the full sweep to clear all codes and added them back. I only have a couple of codes so it wasn’t a big deal.

Patch working great. Thanks!

This is what I have

I first updated the code to ethayers and was not getting any notifications. Last night I updated the code with the patch to the smartthings device and started to get notifications today. Interestingly enough it was gradual, first started to get manual lock/unlock, and then started getting notifications from my users. Funny thing is I am getting error codes on all of my users.

Here you go, based on this documentation:

private getCommandClassVersions() {
        0x62: 1,  // Door Lock
        0x63: 1,  // User Code
        0x71: 2,  // Notification (v3)
        0x72: 2,  // ManufacturerSpecific
        0x80: 1,  // Battery
        0x85: 2,  // Association
        0x86: 1,  // Version (v2)
        0x98: 1,  // Security

After 3 years on Version 1.4, I recently upgraded to the current 2.0 version successfully with my Yale lock. I did not get notifications until I made the change to the DTH (I am using ethayer’s Z-Wave Lock Yale) mentioned in post 2053 by Kianoosh_Karami.

I made three changes to Lock Manager to make it work the way I wanted. The diff for all the changes I made is at the end of this post, but first I will describe the changes.

  1. If the Master Code is used, the Yale lock indicates that it was opened with code 0. I was not getting a notification in this case because Lock Manager did not recognize this use case even though the DTH recognized it. Lock Manager was telling me in a debug message that “Lock was locked by unknown user!” (see line 1179). (This was incorrect in itself since this message was generated after it was determined that the state of the lock was unlocked.) I added code to check if code 0 was used, and, if so, to send a notification that the Master Code was used. If it was not code 0, then the original debug message, corrected to be “unlocked”, would be issued.

  2. No notification was given if the lock was unlocked manually because there was no code in that section to do so, even though there was code if the lock was locked manually (see line 1272). I added the statements to provide notification.

  3. No notifications were given if the lock was locked or unlocked via a SmartThings command. The routine for handling these cases was left empty as shown by the comments (see line 1277). I added code to provide appropriate notifications for this.

Here is the diff from the current Lock Manager code to my version:

< debugger(‘Lock was locked by unknown user!’)

  if (data.usedCode == 0) {
    // Yale locks have code 0 for the Master Code
    message = "${lock.label} was unlocked by Master Code"
    if (codeUnlockRoutine) {
    if (parent.notifyAccess) {
    if (parent.alexaAccess) {
  } else {
  debugger('Lock was unlocked by unknown user!')




if (notifyManualUnlock) {
if (alexaManualUnlock) {

< // no options for this scenario yet

def message
if (evt.value == ‘locked’) {
// locked by command
message = “${lock.label} was locked by command”

if (notifyManualLock) {
if (alexaManualLock) {

} else if (evt.value == ‘unlocked’) {
message = “${lock.label} was unlocked by command”

if (notifyManualUnlock) {
if (alexaManualUnlock) {


Hi All,
I have a problem with my LockManger. Started a week back or so where it quit writing codes or being able to update/save codes. I uninstalled everything reinstalled what I could (couldn’t find the child apps based on the instructions or in github) On the main app it show the user setup, shows the schedule, but wrote the code to the lock 9 hours later. Orig set the code to be written at 3:30pm and it was written at 12:26am.![Screenshot_20190524-091923_SmartThings|281x500]

Any help is GREATLY appreciated!!!

Could it possibly be a time zone issue? Not sure where to check that, but your phone and the hub and perhaps the SmartThings server have to agree on the time zone.

Lock Manager has stopped working for me. Yesterday we came home and all the slots on our yale lock were blanked, only my master code would work. I got into the smart things IDE which has to be the first time ive had to in like a year, and noticed i was behind on updates from the repo, so I updated. Afterwards I removed the lock from the app and re-added it. Waited overnight the lock was still 0% progress on sweeping. Today I excluded my yale lock from smart things (dumb me didnt delete it from lock manager first). And then I included it back in my zwave network. But now when I open lock manager I get the something went wrong error and it wont open.

The log in the IDE shows this error:

groovy.lang.MissingPropertyException: No such property: id for class: java.lang.String @line 204 (doCall)

Did my actions screw up a device handler or something? I did set the DHT back to the zwave yale.

Can’t figure out why some codes “fail to set” but others do?

Does anyone know why I install the smartapp follow post 1997 and published it successfully but the app is not showning under “MyApp” in the smartthing classic app?

Hi Erik, love your app and the hard work you put into it. I also love the Github integration. I’m unfortunately not seeing any of the child apps. Does that have to do with the hierarchy in the branch?


The 2.0 version of Lock Manager (the current version) does not have separate child apps. All the code that used tone in the separate child apps is now included in the Lock Manager app.

Sorry, my spell checker was too hasty. the word “tone” should have been “to be”.

I’m using 2.0 with the standard z-wave lock device handler and a Schlage lock.

On the app, the “Recently” log is clogged with messages that the lock is locked. Screen shot below. Is there any way to stop this?

I installed 2 locks, one works perfecting. The other doesn’t update to new codes set via the app. This one that doesn’t work seems like am updated model as it has a button to connect to hub under the lid.

I made the same change (change the DTH patch to 1.4), published but still getting errors when trying to save the old app in the mobile app. I still do not see the codes either (the app is still the 3 app set version 1.4).

Any help with making the change with the patch in a way it will work will be appreciated.



Hi, I’ve been using this app for over a year now, and recently have a problem with my Schlage locks. It appears the user codes are being overwritten, and not working. I’ve got 2 schlage locks, and 1 Yale. The Yale seems unimpacted, but the Schlage have had the same problem for about a week.

At first I’ve just tried to reload the lock within the app. That worked for about a day. Next I’ve tried to uninstall and reinstall the app. That also worked for 1 day.

Any advice on where to go from here?

Thanks in Advance.

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.