[RELEASE] Door lock code/lock user management (create, delete and schedule codes) with automatic lock/unlock, custom user actions and SHM integration


(Aaron S) #895

Never say never... But I don't have a timeline, etc to announce


I'm having a similar issue as @jbrown from 5 days ago, with 'Click here to define actions when the user locks/unlocks the door successfully'. The page loads the red 'Unexpected Error', with nothing else available. This has been going on for a little over a week (since update), and have also tried rebooting the hub, re-installing the app, etc. Everything else in the app seems to work as it should.

I'm running two instances of this app for different doors- the one which I did not uninstall is still firing off events though no way to edit them. Looking at the live logging when trying to open that page, there are no errors but I'm getting this trace: Passed from submitOnChange, atomicState lookup for user, which I haven't seen on other events.

Any suggestions?

(www.rboyapps.com - Make your home your butler!) #897

Check your routines. Do you have Ghost routines? Routines you don't recognize which are empty? Three people have reported this in the last week which is causing apps to break and there is no response from ST on why there are ghost routines.


So there were two ghost smartapps instances called 'Routine Director' by @tslagle13, installed one week ago (not by me).. I got the same 'unexpected error' trying to access those. I manually added the code for the 'Routine Director' SmartApp then deleted everything, but still getting errors on the Lock Code Management app.

I fired up the simulator for the Lock multi user code management with notifications and automatic relock app, when I install it on either door lock (Schlage 469), and try to access the 'Click here to define actions when the user locks/unlocks the door successfully' page, I get this: error java.lang.IllegalArgumentException: Command 'size' is not supported by device [hidden] of type 'Universal Z-Wave Lock With Alarms'. Supported commands: [poll, lock, unlock, refresh, lock, unlock, updateCodes, setCode, deleteCode, requestCode, reloadAllCodes, unlockwtimeout, alarmToggle, setAlarm, sensitiveToggle, setSensitivity, disableKeypad, enableKeypad, enableAutolock, disableAutolock, disableAudio, enableAudio] @ line 246

FYI I removed the device address and replaced with [hidden] in text. Would this error be specific to the simulator?

(www.rboyapps.com - Make your home your butler!) #899

Yes that problem is for the simulator don't use the simulator it behaves differently and is buggy and hence the error, use the real stuff. See my PM I've sent you to get to the bottom of the ghost routines (not Ghost SmartApps).

ST's ghost Routines, returning null labels and groovy not executing spread operator correctly
(www.rboyapps.com - Make your home your butler!) #900

Multi User Lock Code Management with Notifications and Actions - Version 5.2.4

  • Patch for ST's "ghost" routines causing some users to get an error while trying to access the actions page

Recommend use the Universal Enhanced Z-Wave Lock device handler version 3.0.1 or newer for full SmartApp functionality

Thanks to DnCCrew for this step:

Set the hub Location (i.e timezone) for scheduled/expiry codes to work correctly, from smartphone app:

  1. Clicked on the 3 lines (top right corner)
  2. Clicked on gear icon (top right)
  3. Click area that says "Tap to set where home is on the map" and zoom in to correct location on map.

(Simon) #901


I just got my ID Lock today, and installed it.
Really loving it so far :slight_smile:
I'm using your DH for Smart Locks, and this SmartApp.

But right after installing it, I didn't connect it to either SmartThings nor it's own remote.
I set up the basics first, like changing the master code, I put in another code for my wife, added a couple RFIDs, enabled autolock after 3 seconds.

When that all worked, I took out batteries, added z-wave module, added batteries, included in ST, using your DH.
And installed this SmartApp.
I put in 3 users:
- Me (same code as master code)
- My wife (same code as I already programmed)
- A test user/code

The Live log for the device says:
1. code1 was null, set to 1234
2. setting code 1 to 1234
And the same for the 2 other codes.

1. the test user code doesn't work. I need to troubleshoot, but as the Live Log shows it should be set I guess I should have been set or what?
2. The z-wave modue instructions mention different commands in secure and unsecure mode. See this like
So I was wondering if I need to make sure that my device is securely connected, if that is even under my control.

About the feature for running a routine, when unlocked: I like that, BUT should there be an option to say "only if I'm the first to arrive"? Because if I'm at home already, and messing arround with music and lights, and wife gets home, I dont what the "I'm back" rutine to be triggered again.

(www.rboyapps.com - Make your home your butler!) #902

You need to look for Dark Blue INFO messages, those are confirmation back from the lock that the programming is complete (in Live Logging). If you don't see then you lock isn't able to communicate with the hub. Try repairing it and starting over until you can see those blue INFO messages show up (which indicated a response from the lock)

(www.rboyapps.com - Make your home your butler!) #903

Multi User Lock Code Management with Notifications and Actions - Version 5.2.5

  • Fix for bug individual user lock selection does not work if the locks have custom names defined in the system

Recommend use the Universal Enhanced Z-Wave Lock device handler version 3.0.1 or newer for full SmartApp functionality

Thanks to DnCCrew for this step:

Set the hub Location (i.e timezone) for scheduled/expiry codes to work correctly, from smartphone app:

  1. Clicked on the 3 lines (top right corner)
  2. Clicked on gear icon (top right)
  3. Click area that says "Tap to set where home is on the map" and zoom in to correct location on map.

(Simon) #904

I got it to work. Not sure what exactly helped of unplugging the hub and unplugging the lock.

BUT I found out that the lock only takes 2 codes, a master code and a 2nd "service code".
In your app, the 1st user is the master code, so that user1 will overwrite the mastercode.
The 2nd user will be the "service code".
And then there are now more users in the lock, which is at least why I couldn't get my 3rd test user to work.

Works great :slight_smile:

The lock can autolock after 3 seconds, and I cannot change the number of seconds on the lock.
But in your smartapp I see same function, but where I can set the number of seconds.
I wanna try that out.

BUT 2-4 months when considering a smart lock, I believe I read somewhere in this forum that some people recommended using the locks own autolock, and not rely on smartthings to do it.
Do you have any thoughts on that?

(www.rboyapps.com - Make your home your butler!) #905

That's correct IDlock only allows for 2 keypad codes, master and service which correspond to User 1 and User 2 in the SmartApp.
However do note that the RFID codes are also reported by the lock, while they can't be programmed by the SmartApp it can report on it. So if you enter say User 3 information and then use a RFID key which is programmed to RFID user 3 it will show up on the SmartApp notifications. Do note that RFID has user 1 and so does the master code (keypad user 1), Similarly RFID user 2 and service code (keypad user 2). But since the App can only accept 1 one name for user 1 and 2 you will get a notification like Lock unlocked by User Name (as written in smart app) via Keypad or RFID (depending up on the source). So if you're using RFID keys I would start programming at User 3 to avoid this issue OR you can install this separate app to get notification/take actions for the RFID users.

The above SmartApp is identical to this SmartApp except it doesn't program codes. So you can use this SmartApp to program you keypad master/services codes and the above SmartApp to manage your RFID users. That way you have no conflict and can use the full range of the locks' capabilities.
Alternative if you want just one app use this app and start your RFID codes at User 3 (just note that it can't be programmed from the SmartApp and I would set the type to inactive for the RFID uesrs (3 and beyond) otherwise the SmartApp will keep trying to program the lock and the lock won't respond).

This is true to some extent because of ST's less than perfect scheduler and z-wave network issues the lock based auto lock is more reliable. However the downside is that you can't coordinate with door sensors which the SmartApp can do (e..g don't autolock while door is open etc).

(Bruce Robertson) #906

I missed the note stating that multiple devices cannot be configured. I thought if you installed and configured it one place, settings would show on all devices with the smartthings app. The thing has been adding and removing codes from my lock for about 4 hours. Can anyone help? I get a push notification to my phone about once every 30 seconds. Ugh.

(Bruce Robertson) #907

I removed all but 3 lines of code and re-published it. Finally it stopped sending notifications to every member of my household. Literally hundreds (probably over 500) push notifications were sent to each device. I still cannot remove the smart app. I have removed its association with the device in the mobile app, and tried removing it from the mobile app under marketplace->my apps, but it is still there. I have tried in the IDE about 30 times, and it says it cannot be removed because one or more users has it installed. I removed the SmartThings app from my mobile device completely, still same stuff.

Any advice on cleanup? I changed the device handler back to what I believe is the default one, but that also did not help. Thanks in advance.

(Bruce Robertson) #908

Okay, once I went to the mobile app, and then Automations->SmartApps tab, clicked the app, and remove, it removed it from the mobile app completely. Why this does not work from the other 3 or 4 places in the app, I don't understand, but apparently, this is the procedure.

(www.rboyapps.com - Make your home your butler!) #909

Sound like you're having trouble with your account. These are all questions for ST support as to why you're having trouble configuring or deleting the SmartApp from the phone on your ST hub account. It isn't normal, it works fine here.

As for the constant retrying that indicates that your lock isn't responding properly to your hub/commands. I would start by rebooting the hub and repairing the z-wave network (see the first post FAQ's). And if you don't want it to retry a failed command (ie. lock not acknowledge as successful command) then turn off the rety option on the first page.

As for the notifications just turn off the notifications (or "detailed notifications" on the first page as I suspect in your case you've enabled which is why you're getting for programming success and failure) and you won't get any notifications or extra programming notifications (see the description for each option in the SmartApp, there is a paragraph for each option). The detailed notifications is under "Advanced Code Programming Options" and has a paragraph explaining it's use and is disabled by default so I'm assuming you had a reason to enable it. It is typically enabled by folks using rental homes to be notified when the reprogramming of the lock codes are complete.

(jenny) #910

Having a hard time with this. This code used to work great, and then a while ago it started giving me errors. I updated to the latest version today. No codes are being pushed to the device anymore which has been going on for a while now. This is what is happening:

java.lang.IllegalArgumentException: Command 'updateCodes' is not supported by device c948491c-75b9-47a2-87c5-800c3213f050 of type 'Lock Capability'. Supported commands: [lock, unlock] @ line 1350

Line 1350 is: lock.updateCodes(userCodes)

Any idea what the issue is? All I've done is copy/pasted the code and gone through the simulator to set it up.

(www.rboyapps.com - Make your home your butler!) #911

You're using an unsupported lock/DH. This isn't a Smartapp issue it's a Lock/Device Handler issue. If it was working earlier and stopped now then this indicates that you/someone changed the device handler for your lock. The DH is the one reporting that that updateCodes isn't supported, not the SmartApp. Did you change your DH or put a new lock (Zigbee?). Make sure you're using the recommended Enhanced Universal Z-Wave Lock DH for full compatibility.

(jenny) #912

I have two Kwikset 910 Z-Wave SmartCode Electronic Deadbolt featuring SmartKey in Lifetime Polished Brass locks.

They were working fine without a device handler. I did add the DH Universal Z-Wave Lock with Yale/Schlage/Kwikset/IDLock Alarm, Notification and Advanced Features
today. But it didn't change anything with with error.

Any help is appreciated!

(jenny) #913

I just got it working. I think. 250 miles from the location gives some unknown. Before it would work fine just through the smart things website using the simulator but using the phone app would error. Now the phone app doesn't error but the website does. I'll just try the other if this happens again.

(Bruce Robertson) #914

I had removed the app last night. I was finally successful in removing it. There are a lot of "Remove" hyperlinks in the mobile app which do not seem to remove the app, such as in the smart apps associated with the lock, and in Marketplace->SmartApps->MyApps.

Since I am managing a small number of users, and only 1 lock currently, I am going to try the simpler app you have with my lock. This will save me from standing in front of my door programming it manually, but will do what I need. I'll use your handler with alerting.