[Depricated] Lock Code Manager


#250

For what it’s worth - just ran the latest update on Windows Phone. When attempting to add just 1 user and then edit their settings. Get a red box dialog on the app “You are not authorized to perform the requested operation.”.

Live logging shows this error simultaneously:
“68e93cc-1307-48e1-a7c0-b8ee355421d4 ‎4‎:‎44‎:‎33‎ ‎PM: error java.lang.NullPointerException: Cannot invoke method isNumber() on null object @ line 268”.

So then I just commented out the testing logic for the float/integer to see if that would get me further. Same red dialog box, different error this time from Live Logging:

868e93cc-1307-48e1-a7c0-b8ee355421d4 ‎4‎:‎53‎:‎21‎ ‎PM: error java.lang.NullPointerException: Cannot get property ‘enabled’ on null object @ line 83

So it looks like maybe the logic for the parameter input is borking on Windows? Not sure why…

Maybe that’ll help a bit. Wish I could do more, but sitting on GoGo Inflight at the moment. :slight_smile:

Maybe that helps? :smile:


(Joel) #251

really cool idea. I’m assuming this only works (based on the overview) with smartthings ootb supported locks. i.e not kwikset zigbee locks using a custom device type.

Hopefully these features will come out soon. i know smartthings are working on kwikset zigbee types but no eta… :frowning:


(Jeff) #252

Just setup this app for use on my schlage camelot and it’s working flawlessly! Thanks so much for your hard work!

The only feature that I can think of that would help with usability would be per user expiry dates. If a guest is staying for 3 day then you don’t need to remember to manually delete the code. Unless this feature is already there. Admittedly I haven’t had a chance to play much but it looked to me that all scheduling was global?

Again great work!!!


(Erik Thayer) #253

This is already possible –

SmartThings limits each app install to 4 schedule calls. Therefore, you may only have one schedule per instance of the app.

If you want a schedule for a particular user, use another instance of the app and schedule that instance accordingly.

I have given some thought to circumventing the limit on schedules, but at this time I have no plans to do so. This limit may change in the future.


(Jeff) #254

I didn’t even think of just adding another instance awesome! Thanks!


#255

I came across your code today, and I absolutely love it. I own two Schlage BE496 Deadbolts, and one Schlage FE599 lever, and adding and removing codes from them can be quite the hassle, so your work has made my life much easier. Thank you!

On another note, the BE496 deadbolts are made with a 90db alarm that can be configured to sound when someone enters/leaves, when it senses tampering, or when it senses a forced entry. I also own a Fortrezz Siren Strobe, and I am looking for a way to tie these three alarms together to work in unison. Some other folks have done some work with these Schlage locks, and having the alarm triggers send off actions to other devices, but I was hoping that there may be a possibliity for you to integrate this functionality into your custom device and app as well. Here are a couple examples for you:


(Erik Thayer) #256

It’s unlikely for me to work on this since I don’t have the device.

It’s probably a better idea to ask the original authors of that device type to integrate my code into their device type, as my code is only about 6 lines… And they would have the ability to test on their devices.


(Joel) #257

thanks mate. The original dev has gone quiet on the device type :frowning:


(Erik Thayer) #258

I took a look at garyd9’s custom device type and submitted a pull request to his repository. I can’t guarantee that it will work, but it should.

I can’t do anything with RBoy’s code. You’ll have to ask him. I suggest staying with open source solutions if you can.


(Jonathan Rivera) #259

@ethayer or anyone else that can help…

I installed this app for a Kwikset 916 and I’m having some issues that I haven’t come across on other installations. This time around I’m not able to get any codes to function although I’m setting them via the app on my iPhone 6.

The first notable difference between previous and the current installation is when I’m changing the device type for the Z-Wave Lock to Z-Wave Lock Reporting, “Z-Wave Lock Reporting” is missing. I’ve added the custom device type from zwave-lock.groovy and now there are two “Z-Wave Lock” device types. That’s the only difference that I see from previous installations for me and I notice that name changed in the git history. I have multiple hubs using the Kwikset 916 that uses your code so i’m baffled why it’s not working now.

Is there anything I’m missing in the installation? I installed the SmartApp via template and copied your code, I also installed the device type via template and copied your code.

Here’s my logs if that helps:

db94ef34-0a24-4c85-b96c-da092644e29e 6:17:03 PM: trace getPhrases(), state.welcomeIssue = null

4c507751-a48b-4903-9ecb-e2d8845a8361 6:16:50 PM: debug "zw device: 03, command: 8612, payload: 06 03 43 03 25 " parsed to ['descriptionText':Demo Lock: firmware version: 3.37, Z-Wave version: 3.67, 'isStateChange':false, 'displayed':false, 'linkText':'Demo Lock']

5af29ccd-f285-4e89-9116-e10f2d8934f9 6:16:48 PM: error java.lang.NullPointerException: Cannot invoke method toInteger() on null object @ line 812

5af29ccd-f285-4e89-9116-e10f2d8934f9 6:16:48 PM: error java.lang.NullPointerException: Cannot invoke method toInteger() on null object @ line 812

5af29ccd-f285-4e89-9116-e10f2d8934f9 6:16:47 PM: error java.lang.NullPointerException: Cannot invoke method toInteger() on null object @ line 812

4c507751-a48b-4903-9ecb-e2d8845a8361 6:16:47 PM: debug poll is sending ['8611']

4c507751-a48b-4903-9ecb-e2d8845a8361 6:06:50 PM: debug "zw device: 03, command: 9881, payload: 00 62 03 FF 00 00 FE FE " parsed to ['name':'lock', 'value':'locked', 'isStateChange':true, 'displayed':true, 'linkText':'Demo Lock', 'descriptionText':Demo Lock lock is locked]

5af29ccd-f285-4e89-9116-e10f2d8934f9 6:06:48 PM: error java.lang.NullPointerException: Cannot invoke method toInteger() on null object @ line 812

5af29ccd-f285-4e89-9116-e10f2d8934f9 6:06:48 PM: error java.lang.NullPointerException: Cannot invoke method toInteger() on null object @ line 812

5af29ccd-f285-4e89-9116-e10f2d8934f9 6:06:47 PM: error java.lang.NullPointerException: Cannot invoke method toInteger() on null object @ line 812

4c507751-a48b-4903-9ecb-e2d8845a8361 6:06:46 PM: debug poll is sending ['9881006202']

5af29ccd-f285-4e89-9116-e10f2d8934f9 6:04:45 PM: debug state: [lastUser:1, userState2:[enabled:true, usage:0], userState1:[enabled:true, usage:0], lock1:[error_loop:false], error_loop_count:0]

5af29ccd-f285-4e89-9116-e10f2d8934f9 6:04:44 PM: debug Updating 'Locks' with settings: [locks:[Demo Lock], maxUsers:2, userEnabled1:true, userCode1:2345, burnCode1:false, userName1:Demo, userSlot1:1]

4c507751-a48b-4903-9ecb-e2d8845a8361 6:04:45 PM: debug code1 was 2345, set to 2345

4c507751-a48b-4903-9ecb-e2d8845a8361 6:04:45 PM: debug "zw device: 03, command: 9881, payload: 00 63 03 01 01 32 33 34 35 " parsed to [['name':'codeReport', 'value':1, 'data':['code':'2345'], 'descriptionText':Demo Lock code 1 is set, 'displayed':true, 'isStateChange':true, 'linkText':'Demo Lock']]

4c507751-a48b-4903-9ecb-e2d8845a8361 6:04:45 PM: debug code report parsed to [['name':'codeReport', 'value':1, 'data':['code':'2345'], 'descriptionText':Demo Lock code 1 is set, 'displayed':true, 'isStateChange':true, 'linkText':'Demo Lock']]

5af29ccd-f285-4e89-9116-e10f2d8934f9 6:04:43 PM: debug state: [lastUser:1, userState2:[enabled:true, usage:0], userState1:[enabled:true, usage:0], lock1:[error_loop:false], error_loop_count:0]

5af29ccd-f285-4e89-9116-e10f2d8934f9 6:04:41 PM: debug Installing 'Locks' with settings: [locks:[Demo Lock], maxUsers:2, userEnabled1:true, userCode1:2345, burnCode1:false, userName1:Demo, userSlot1:1]

4c507751-a48b-4903-9ecb-e2d8845a8361 6:04:42 PM: debug setting code 1 to 2345

4c507751-a48b-4903-9ecb-e2d8845a8361 6:04:42 PM: debug code1 was null, set to 2345 

db94ef34-0a24-4c85-b96c-da092644e29e 6:04:12 PM: trace getPhrases(), state.welcomeIssue = null

6:4:5 PM: info Waiting on events...
6:4:5 PM: info For past logs for individual things go to the My Devices section, find the device and click on the Events link on the device information page.
6:4:5 PM: info This console provides live logging of your SmartThings.

Thanks for your help! If there’s anything I can do to help get this issue corrected, let me know. I’m happy to lend a hand or get you any logs or info that you need.


(Joel) #260

agreed. it was the only option that worked though. this is the device type I used: https://raw.githubusercontent.com/sebirdman/Kwikset-ZigBee-Lock/master/Kwikset%20Zigbee%20Lock.groovy


(Jonathan Rivera) #261

@ethayer Just an update. I was able to resolve this issue by removing the 916 from my z-wave network, factory resetting the lock, deleting the smartapp and smartdevice and then reinstalling everything and it worked like a charm.


#262

Beautiful! I tried Rboy’s device type, and it seemed pretty clunky anyways. Hopefully @garyd9 will happily collaborate!


(Gary D) #263

I already merged Erik’s pull request…


#264

I’m experiencing an issue now when I try to update/change codes. Here is the error I’m getting from the logger:

error java.lang.NullPointerException: Cannot invoke method toInteger() on null object @ line 812

Any idea what I’m doing wrong?


(Erik Thayer) #265

Looks like you have a user in your users array that you haven’t initiated yet. Click all your users in the user settings page and make sure it saves each user settings variables. If you have more users in that page than you need, set your users number to what you’ll actually use.

This is a user solution to the problem, but I should be able to write a code solution soon. It seems that people are entering in more users than they actually intend to use, something I haven’t accounted for in the app.


#266

I uninstalled and reinstalled the app, set the number of users as “2”, and then set both codes, but when I try to go back in to the user settings, I get the same error. Here is what is being reported in the app’s log:

1:33:35 PM: debug sendCodes fix is: [[“code1”,“1234”],[“code2”,“5678”]] Error: 1/10
1:32:49 PM: debug sendCodes fix is: [[“code1”,“1234”],[“code2”,“5678”]] Error: 1/10
1:32:47 PM: debug sendCodes fix is: [[“code1”,“1234”],[“code2”,“5678”]] Error: 1/10
1:32:04 PM: debug state: [lastUser:2, userState2:[enabled:true, usage:0], userState1:[enabled:true, usage:0], lock3:[error_loop:false], lock2:[error_loop:false], lock1:[error_loop:false], error_loop_count:0]
1:32:03 PM: debug Updating ‘Locks’ with settings: [locks:[Back Door Schlage Z-Wave Lock, Front Door Schlage Z-Wave Lock, Laundry/Garage Schlage Keypad Handle], burnCode2:false, userHomePhrases2:[I’m Back!], userCode2:5678, userEnabled1:true, userSlot2:2, userNoRunPresence1:[Ryan’s Droid Turbo, Ryan’s Virtual Presence Sensor, Stephanie’s Note 4, Stephanie’s Virtual Presence Sensor], userCode1:1234, userEnabled2:true, manualUnlock:false, noRunPresence:[Ryan’s Droid Turbo, Ryan’s Virtual Presence Sensor, Stephanie’s Note 4, Stephanie’s Virtual Presence Sensor], userSlot1:1, userNoRunPresence2:[Ryan’s Droid Turbo, Ryan’s Virtual Presence Sensor, Stephanie’s Note 4, Stephanie’s Virtual Presence Sensor], userHomePhrases1:[I’m Back!], burnCode1:false, userName2:Temporary Access, userName1:Main, maxUsers:2, homePhrases:[I’m Back!]]
1:29:41 PM: debug state: [error_loop_count:0, lock1:[error_loop:false], lock2:[error_loop:false], lock3:[error_loop:false]]
1:29:41 PM: debug Installing ‘Locks’ with settings: [locks:[Back Door Schlage Z-Wave Lock, Front Door Schlage Z-Wave Lock, Laundry/Garage Schlage Keypad Handle]]


(Erik Thayer) #267

Those logs look fine. Does it continue to loop like that for awhile before setting the codes?

If it continues until reaching 10, It could be possible that you have those codes on other slots, and the locks can’t accept the codes in slot1 or slot2 because they exist in other slots already. That error loop is something I wrote to prevent invalid codes to plague your lock with poll events.

I’m planning on making a discover section of the app… but until then…

set your users to 30… then:
painstakingly click each one, leaving the user disabled but part of the app. After you’re done… you should have 30 users, all disabled. click done and let the app delete all of the codes on your locks.

wait about 5-10 minutes… might be longer/shorter depending on your network

After this is done, return the number of users to just 2 and set the codes that you actually want.


#268

Well, that didn’t work either. Ultimately, I had to uninstall the app, manually clear all the codes at each lock, and then reinstalled the app, but it does seem to be working correctly now. I can enable and disable the Temporary Access code, and it only takes a minute or so to update the locks. But it is a good note to only set the number of users to the total number of user codes you plan to use.

I’ve been playing around with @garyd9 custom user device type that he updated yesterday with your device type code. It works beautifully with your Lock Code Manager app, and allows for even more control of the device! It allows me to toggle between the four different alarm modes (off, entry alert, tamper, and forced entry), adjust the sensitivity of the alarm for each mode, toggle the 30-second auto-lock feature on and off, and toggle the lock & leave feature on and off. I would HIGHLY recommend this version of the device type for anyone using a Schlage BE468 or BE469 touchscreen deadbolt. My poor, old FE599 handle doesn’t have a built-in alarm, so I simply left it with your customized device type instead.

Now all we need is to find out if there is a way to have the lock alarms trigger the Fortrezz Siren Strobe alarm (or possibly the other way around, or, even better, both!), and I feel like the Smart Alarm app from @geko would be the perfect place to have this implemented. @tslagle13 helped Rboy to track down the “alarm event” in his code, and hopefully he wouldn’t mind helping out again. I’ll toss this over to them, and cross my fingers that this is something that can be included in a future release of Smart Alarm!


#269

Well, I’m still having issues with being unable to go back in and enable/disable lock codes. I still have the number of users set for 2, the main unlock code enabled, and (currently) the temporary access code disabled. I haven’t added, removed, or changed the total number of users whatsoever since clearing the locks manually and reinstalling the app. Whenever I go to the user settings and select either the main or temporary access codes, I get the “sorry, but there was an unexpected error” message. Any ideas what might be going on?

If memory serves, I lost access to the main code right off the bat (no schedules set, but it is set not to run when one of four devices is present), but I did have access to the temporary access code UNTIL I added the setting not to run when the devices are present. Could there be an error in this feature?