[Depricated] Lock Code Manager

There’s a new app!

Please go to this thread for the new Lock Manager App, which is in active development.

##Legacy App:
This app is no longer being maintained. Support and bug fixes are no longer being provided.

Welcome to Lock Manager!

Now with custom device type!

  • Use the attached device type zwave-lock.groovy for added functionality.
  • Minimal changes to SmartThings code.
  • More reliable code set/delete.
  • Codes will be reconciled on each poll() event.
  • App will function without custom device type, but not as well.

Features:

  • Assign Codes to Multiple Users.
  • Manage Multiple Locks.
  • See what codes are active.
  • See how many times a code is used (reset usage manually)
  • Be notified when a user uses their code.
  • Delete codes after they are used*.
  • Optionally Schedule Users so that they only have access during certain times, modes, days of the week, or a calendar range.
  • Decide which notifications to receive in the event that the locks are too chatty.
  • When a code is entered, perform Hello Home Actions.

* Code is burned when a user enters it at any selected lock. Code will not become active again until code usage for that user is reset.

How to use:

How to…Install App

  1. Go to Apps in IDE
  2. Click “New App +”
  3. Click “From Code”
  4. Copy from github
  5. Paste into textarea on SmartThings
  6. Click Publish > For Me

How to…Add Device Handler:

  1. Navigate to: https://graph.api.smartthings.com/ide/devices
  2. Click ‘New SmartDevice’ in the upper right.
  3. Click ‘From Code’
  4. Paste the code from the link (github) above into the text area:
  • if you have a schlage lock, use @garyd9’s handler: here
  • all other locks: here
  1. Click ‘Create’
  2. Click ‘Save’
  3. Click ‘Publish’ > ‘For Me’

Change lock device handler to new code:

  1. Navigate to ‘My Devices’: https://graph.api.smartthings.com/device/list
  2. Locate your lock and click on the name in the first column
  3. Click ‘Edit’ on the bottom of the page view
  4. In the ‘Type’ drop-down scroll to the bottom and select ‘Z-Wave Lock Reporting’ or ’Z-Wave Schlage Touchscreen Lock’
  5. Click ‘Update’ to save changes

Then continued on your smart device…

  1. Tap Marketplace
  2. Tap SmartApps
  3. Scroll down to ‘My Apps’ / Tap
  4. Tap User Lock Manager
  5. Fill out app options.

NOTE:

Please use only the included device type or the default device type provided by SmartThings, or the schelage device type created by @garyd9 here:

Confirmed Locks:

  • Kwikset 910, 914
  • Yale Security YRL-220-ZW-619
  • Others?

USE AT YOUR OWN RISK

It is possible that a user code deletion could fail. Do not give door codes to people that you don’t want access to your home or office, and watch notifications carefully.

Donations

If this made your life easier, please consider donating. Donation links are in the readme on github.

55 Likes

Really cool! I just tested it on my Kwikset 914 and it worked perfect with the built in device type. Previously there was a custom device type that didn’t report battery properly. Now everything just works :smile:

One suggestion would be to allow multiple User’s in the same app (in case people don’t need to break out schedules). It would be nice to see in one place all of your users too. One thing to note on the Kwiksets, there are 2 codes that can be used which are local codes only and cannot be programmed via zWave. The 1-30 codes are on top of the 2 local codes. This was very confusing to me when I first got the locks. So in reality, codes 1-2 are local, and 3-32 are zwave. Not sure about other locks.

2 Likes

Nice - please consider adding Hello Home actions (both unlock and lock) based on code entered.

@ethayer - does this support multiple locks at the same time?

Yes, I can answer that. Really cool app.

You can use multiple locks, yes.

This adds a bit of complexity, but I think it can be done. Users would then just need to use multiple installs for different sets of rules such as scheduling.

For sure, I think this feature falls under my plan to do user actions after a code is entered. We should be seeing that integrated into this app soon.

I’m not sure how the LOCK part of that would come into play since I wouldn’t be able to retrieved who locked the door in most cases, so it would be difficult to wrap that into this app. That might work well as a stand-alone app where it just deals with actions when the door is manually locked.

I saw you mention actions, but it didn’t specifically say Hello, Home…so I thought I would put my two cents in. :smile: Many times, I see apps that add “actions” but not hello, home actions.

Going to load this up and take a look!

For the LOCK, it would just be a single mode when someone locks it.

Also, can you capture when someone uses a key (manual unlock)?

I wasn’t really thinking of that as a feature since I was only really thinking about actions of adding access and revoking access. Obviously the key will always be able to open the door.

Responding to non-code actions on the lock wasn’t in my original thoughts, but it might be a good idea to incorporate that once actions are added.

Thanks for the suggestions!

No problem. I figured once you have all the actions in place, why not just “flip the switch” to support the manual action. That would then make everything related to the lock in one complete SmartApp.

My wife says that all of programming is a bunch of if/then statements. When I’m having an issue with a project, sometimes I have trouble sleeping because it’s running through my head on repeat.

So she says… Honey, just use an if/then statement.

It’s funny [almost] every time.

2 Likes

This looks awesome. Does this work with any of the Schlage Digital Touchscreen locks?

I have added the ability to enter multiple users per install. This should make it easier for people to keep track of their codes easier.

I also added the ability to run Hello Home actions on user unlock code, with the ability to also apply this setting to manual unlocks as well.

Enjoy, and let me know what you think! Did this help you out? Is it broken?

I added a list of locks that people said have worked with this app. If you have a lock not on this list and it seems like everything working, let us know so we can add it to the list.

Thanks!

Thanks @ethayer! Might I make one suggestion - put a version number or minor bit of version history in the app code itself so when you update it, we know what version we are currently on.

Good suggestion. I’ll start tagging the releases.

Complete newbie here…when I add my codes it does not show the 0’s in the smartapp. Are the 0’s still programmed into the lock, but just don’t show in the app?

This is a great app. Thank you!

I just tried out zeros and here’s what I found:

###Usable codes with zeros:###
1-2-3-0
1-2-0-3

###Zeros are removed if they’re the first digit of the number:###

0-1-2-3

Is this what you mean? I can see how that could be a problem. I’m not sure how to fix it for an integer variable type. I may have to change it to a string input type, but I’m not 100% sure that will even solve the problem. I’ll do more experiments with zeros when I have the time.

If you have a lock with shared numbers, just use the other number for now. For instance on my Kwikset 910, Zero is equal to 9… so…
0-1-2-3
is the same as
9-1-2-3

Sorry, that’s not very helpful but that’s what i’ve had to do in the past with other Lock Apps. I’ll look into solving this in a more thoughtful manner.

EDIT: This problem has been solved.

2 Likes

Very nice update, but I have a problem in my Yale lock.
I entered 5 codes for the first 5 users, only 3 users were updated, and it seems it executed twice, here is the log:

09118c68-c292-41ad-9a60-f235e3e8eb4f 8:23:39 PM: debug "zw device: 02, command: 9881, payload: 00 63 03 03 01 39 39 38 38 " parsed to [[‘name’:‘codeReport’, ‘value’:3, ‘data’:[‘code’:‘9988’], ‘descriptionText’:Floor 1 Lock code 3 is set, ‘displayed’:true, ‘isStateChange’:false, ‘linkText’:‘Floor 1 Lock’]]
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:23:39 PM: debug code report parsed to [[‘name’:‘codeReport’, ‘value’:3, ‘data’:[‘code’:‘9988’], ‘descriptionText’:Floor 1 Lock code 3 is set, ‘displayed’:true, ‘isStateChange’:false, ‘linkText’:‘Floor 1 Lock’]]
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:23:31 PM: debug "zw device: 02, command: 9881, payload: 00 63 03 02 01 31 39 35 36 " parsed to [[‘name’:‘codeReport’, ‘value’:2, ‘data’:[‘code’:‘1956’], ‘descriptionText’:Floor 1 Lock code 2 is set, ‘displayed’:true, ‘isStateChange’:false, ‘linkText’:‘Floor 1 Lock’]]
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:23:31 PM: debug code report parsed to [[‘name’:‘codeReport’, ‘value’:2, ‘data’:[‘code’:‘1956’], ‘descriptionText’:Floor 1 Lock code 2 is set, ‘displayed’:true, ‘isStateChange’:false, ‘linkText’:‘Floor 1 Lock’]]
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:23:21 PM: debug "zw device: 02, command: 9881, payload: 00 63 03 03 01 39 39 38 38 " parsed to [[‘name’:‘codeReport’, ‘value’:3, ‘data’:[‘code’:‘9988’], ‘descriptionText’:Floor 1 Lock code 3 is set, ‘displayed’:true, ‘isStateChange’:false, ‘linkText’:‘Floor 1 Lock’]]
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:23:21 PM: debug code report parsed to [[‘name’:‘codeReport’, ‘value’:3, ‘data’:[‘code’:‘9988’], ‘descriptionText’:Floor 1 Lock code 3 is set, ‘displayed’:true, ‘isStateChange’:false, ‘linkText’:‘Floor 1 Lock’]]

09118c68-c292-41ad-9a60-f235e3e8eb4f 8:22:33 PM: debug "zw device: 02, command: 9881, payload: 00 71 05 70 03 " parsed to [[‘name’:‘codeChanged’, ‘value’:3, ‘descriptionText’:Floor 1 Lock code 3 changed, ‘displayed’:true, ‘isStateChange’:true, ‘linkText’:‘Floor 1 Lock’], 988100630203]
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:22:23 PM: debug "zw device: 02, command: 9881, payload: 00 71 05 70 01 " parsed to [[‘name’:‘codeChanged’, ‘value’:1, ‘descriptionText’:Floor 1 Lock code 1 changed, ‘displayed’:true, ‘isStateChange’:true, ‘linkText’:‘Floor 1 Lock’], 988100630201]
29517029-6785-4ab0-9b3c-a427ce4c50d2 8:22:19 PM: trace getPhrases(), state.welcomeIssue = null
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:22:14 PM: debug "zw device: 02, command: 9881, payload: 00 71 05 70 02 " parsed to [[‘name’:‘codeChanged’, ‘value’:2, ‘descriptionText’:Floor 1 Lock code 2 changed, ‘displayed’:true, ‘isStateChange’:true, ‘linkText’:‘Floor 1 Lock’], 988100630202]
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:22:04 PM: debug "zw device: 02, command: 9881, payload: 00 71 05 70 03 " parsed to [[‘name’:‘codeChanged’, ‘value’:3, ‘descriptionText’:Floor 1 Lock code 3 changed, ‘displayed’:true, ‘isStateChange’:true, ‘linkText’:‘Floor 1 Lock’], 988100630203]
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:21:55 PM: debug "zw device: 02, command: 9881, payload: 00 71 05 70 01 " parsed to [[‘name’:‘codeChanged’, ‘value’:1, ‘descriptionText’:Floor 1 Lock code 1 changed, ‘displayed’:true, ‘isStateChange’:true, ‘linkText’:‘Floor 1 Lock’], 988100630201]
6fa5f69e-1a12-4489-8cc2-4d75e1b4d3bd 8:21:51 PM: error groovy.lang.MissingMethodException: No signature of method: static java.lang.Integer.toString() is applicable for argument types: (java.lang.String) values: [3570]
Possible solutions: toString(), toString(), toString(), toString(int), toString(int, int), toHexString(int) @ line 359
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:21:51 PM: debug setting code 3 to 9988
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:21:51 PM: debug setting code 2 to 1956
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:21:51 PM: debug setting code 1 to 71956
6fa5f69e-1a12-4489-8cc2-4d75e1b4d3bd 8:21:51 PM: error groovy.lang.MissingMethodException: No signature of method: static java.lang.Integer.toString() is applicable for argument types: (java.lang.String) values: [3570]
Possible solutions: toString(), toString(), toString(), toString(int), toString(int, int), toHexString(int) @ line 359
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:21:51 PM: debug setting code 3 to 9988
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:21:50 PM: debug setting code 1 to 71956
6fa5f69e-1a12-4489-8cc2-4d75e1b4d3bd 8:21:50 PM: error groovy.lang.MissingMethodException: No signature of method: static java.lang.Integer.toString() is applicable for argument types: (java.lang.String) values: [3570]
Possible solutions: toString(), toString(), toString(), toString(int), toString(int, int), toHexString(int) @ line 359
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:21:50 PM: debug setting code 3 to 9988
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:21:50 PM: debug setting code 2 to 1956
09118c68-c292-41ad-9a60-f235e3e8eb4f 8:21:50 PM: debug setting code 1 to 71956

I always get this error:
9:42:34 PM:error groovy.lang.MissingMethodException: No signature of
method: static java.lang.Integer.toString() is applicable for argument
types: (java.lang.String) values: [3570]
Possible solutions: toString(), toString(), toString(), toString(int), toString(int, int), toHexString(int) @ line 359

Unfortunately it doesn’t appear to work with Schlage FE zwave locks. I didn’t try it on my Schlage deadbolt, BE series, because I am using a modified device type.

Michael