[Depricated] Lock Code Manager

I too have not been able to get the battery reporting as of yet.

But the order that I did the reinstall is as follows:

  1. Uninstalled User Lock Manager.
  2. Created a simulated lock in IDE.
  3. Moved remaining smartapps from except to the newly created simulated lock.
  4. Excluded the current 916 Kwikset from the ST app.
  5. Rebooted the hub just for good measure.
  6. Factory reset the lock using Kwikset instructions.
  7. After factory reset, completed the door handling instructions from Kwikset instructions.
  8. Paired the lock with ST.
  9. Verified in IDE that it was using the custom device type.
    10.Reinstalled User Lock Manager and applied it the newly create lock. Also at this point I enter the codes that I wanted to use.
    11.Grabbed my keys and head outside.
    12.Tested the lock using user codes entered.
    13.Verified the lock was reporting correct status immediately.
    14.Reinstalled the other smartapps that were now part of the simulated lock.
    15.Deleted the simulated lock.

Not sure if the Kwikset works like my Yale, but with my Yale, the master code is handled outside of the normal codes. You dont assign a user slot for the master code, which leads me to believe that it is stored and handled separately from the rest of the codes/users. I set my master code up at the lock (its required before you can access any of the menu features, including the ones to add the lock to a zwave network), and i set up all of my users via the app, starting with slot 1. My master code still works, as do all the user codes.

No quickset is not like Yale. I accidentally deleted my master code. Make sure code 1 in the app is your master.

Ouch. Glad I went with a Yale lol.

Hey @ethayer, I was wondering if you would be able to add an option to prevent hello-home actions from taking place if it’s either in a specific mode or if you’re already in the mode it’s calling to change to?

Currently I have multiple users without presence detection (renters) and while I’m not home they will trigger the I’m Back routine every time they unlock the door. This becomes an even larger issue when you add a self-locking Schlage lever and they have to enter a code to get back in after going into the garage to grab something.

Also, I’ve been playing around with the Centralite Keypad and found that you can easily add support into the lock code manager so that they can share codes/users and allow for ‘arming’ of the SHM when leaving (again a great feature for homes without presence detection on everyone). I was able to get it working within your SmartApp with less than 15min of work. I think it would make a great addition to this SmartApp :smile:

1 Like

@ethayer, browsing through my log today, I noticed this error several times from Lock Code Manager (v4.0.7):

java.lang.IllegalArgumentException: Must specify a non-null value for the 'to' index in a Range @ line 1172

I haven’t noticed it misbehaving, and I don’t understand the error. The exception seems to imply that maxUsers is null, but I have two instances of app, one with maxUsers at 4 and the other with maxUsers at 1.

Let me know if I can provide any additional info.

Give this a try.

Delete the current smart app you created.

Starting fresh got https://github.com/ethayer/user-lock-manager

open the uesr-lock-manager groovy file

once open click on the raw button.

Copy all the text to the clipboard.

Go to your IDE section click on smart apps.

Click on new smart app.

click on from code.

insert the copied code in the clipboard.

click on creat.

click on publish

click on for me

should be done at this point as far as install.

now install to smartthings via phone.

Thanks Dennis. I was able to figure it out. Appreciate it!

no problem at all

charter 20

Hi All,

When trying to create the SmartApp zwave-lock.groovy, I get the following error. Any idea how to get around this? I successfully created the user-lock-manager.smartapp.groovy SmartApp.

Hi Shaun,

You’ll need to create this as a Device, not a SmartApp. That should solve the issue.

1 Like

@ethayer. Your lock at a certain time smartapp seems to ignore the push notification preference set. It always sends a push notification regardless of setting. Any updates on the way by any chance?

1 Like

I’m having the same “you are not authorized error” as a couple other people when I go to update user codes. I’ve tried the live logging thing but it doesn’t appear to be updating when I make the code happen. Can you help?

Edit: I’ve gotten the log to work now. The error is as follows:

1c297a9f-42d5-422e-802d-3398caf21045 9:53:56 PM: error java.lang.NumberFormatException: For input string: “*” @ line 433

Thanks. That work perfectly.

getting an intermittent error in the logs on user lock manager

ie

a36a-4230-b6a5-022141369d37 ‎1‎:‎44‎:‎15‎ ‎PM: error java.lang.NullPointerException: Cannot get property ‘error_loop’ on null object @ line 1249

516380e0-a36a-4230-b6a5-022141369d37 ‎1‎:‎42‎:‎15‎ ‎PM: debug state: [lockcbc0f9c4-eece-48a8-a970-fd6bcddb247c:[error_loop:false, codes:[slot6:, slot7:, slot8:, slot9:, slot22:, slot23:, slot20:, slot21:, slot1:1492, slot2:8044, slot3:, slot4:, slot5:, slot19:, slot18:, slot17:, slot16:, slot15:, slot14:, slot13:, slot10:, slot11:, slot30:, slot12:, slot25:, slot24:, slot27:, slot26:, slot29:, slot28:]], lastUser:3, userState3:[enabled:true, usage:1], userState2:[enabled:true, usage:0], userState1:[enabled:true, usage:3], lastLock:7b32978e-df53-49e9-8bf9-efe4440f0c74, error_loop_count:0, lock7b32978e-df53-49e9-8bf9-efe4440f0c74:[error_loop:false, codes:[slot6:, slot7:, slot8:, slot9:, slot22:, slot23:, slot20:, slot1:1492, slot21:, slot2:8044, slot3:, slot4:, slot5:, slot19:, slot18:, slot17:, slot16:, slot15:, slot14:, slot13:, slot10:, slot11:, slot30:, slot12:, slot25:, slot24:, slot27:, slot26:, slot29:, slot28:]]]

516380e0-a36a-4230-b6a5-022141369d37 ‎1‎:‎42‎:‎15‎ ‎PM: debug Updating ‘Locks’ with settings: [maxUsers:2, manualUnlock:false, notifyAccessStart:true, sendevent:true, userCode1:1492, notifyAccess:true, dontNotify1:false, userCode3:5296, dontNotify3:false, userHomePhrases3:[I’m Back!], dontNotify2:false, userSlot2:2, phone:6034907476, userSlot3:3, userSlot1:1, burnCode2:false, userEnabled2:true, homePhrases:[I’m Back!], userName1:Master, userEnabled1:true, notifyAccessEnd:false, notification:true, userCode2:8044, userName2:Emergency, userEnabled3:true, burnCode1:false, userHomePhrases1:[I’m Back!], userHomePhrases2:[I’m Back!], userName3:Halonen Landscaping, burnCode3:true, theLocks:[Front Door Lock, Garage Side Door Lock]]

given that what you were trying to do was correct… looking up the lock by number was wrong you needed id I assume when looking at other places you were doing it…
Assuming this to be true here is the fix to the routine…

def allCodesDone() {
def i = 0
def codeComplete = true

/* log old code
theLocks.each { lock->
i++
log.debug "in loop looking at lock:i = $i "
if (state.“lock${i}”.error_loop == true) {
codeComplete = false
}
}
*/

// lgk new code
theLocks.each { lock->
if (state.“lock${lock.id}” != null) {
if (state.“lock${lock.id}”.error_loop == true)
{
codeComplete = false
}
}
}
return codeComplete
}

1 Like

Is it possible to have the lock perform a routine when the “lock” button is pushed? I know for My Scalage Touchscreen I just tap the Schlage button and the lock will close not needing a code.

I tried to read through here or find a way to make this work and I can’t seem to find a way.

What I am trying to do is use a second instance of the lock code manager to control a guest access while we are on vacation. I already have it setup to turn lights on when this person enters the house. But if they leave the house it would be nice for them to just lock the front door and have the home do something then as well. Would this be possible?

Thanks!

Under user settings hello home phrase or global hello home phrase.

For unlock I see what you mean. But this global action only occurs when you type in the associated pin code.

I am trying to see if I can tie an action to just the locking part. And I assume it would have to be global as well unless it was tied to whoever last unlocked it.

I’m trying to get this working with two Kwikset 916 zwave locks unsuccessfully. I’m using the lock reporting device (and tried with the standard one as well). Can’t set codes or read them, the app will either display null or blank. I’ve tried unpairing/repairing, rebooting hub, factory reset of locks. I also noticed smartthings is not reading the battery status on the locks, app displays ‘–’ where the battery life should be. Anyone have any suggestions?

Thanks!

if the lock is in the unlocked state for some period of time ( I haven’t experimented enough to time it) One DOES have to use the code to lock the door again. - only if you unlock, open and then close the door and push the button does just pressing the Schlage button lock the lock. It might be 30 seconds.