[Depricated] Lock Code Manager

Nagui -

I’ve implemented something that HELPS, but does not SOLVE some of these issues. I sent 26 codes to a lock using this method and all but 2 codes were set. This is BETTER in my opinion than it was before, but I think it could be better still.

Use 2.1 for now and see if it helps, but I’ll be working on another release that manages this issue in a much better way. Please be patient, you’ve posted the same error twice.

As far as that java error that Dlee was having, I’m afraid that there’s not much I can do to prevent this. It will have to be in your hands. ST has disallowed the getClass method, which I would have used to make sure your input was correct. As I cannot do this, you will have to take responsibility for your input.

  • Clear all USER CODE entries and re-enter them.
  • If you get an alphanumeric keyboard, the wrong keyboard is popping up! Don’t use this on codes!
  • Try using the default keyboard on your device. In most cases, the developers of the default keyboard have done a better job at making sure a string is entered vs an integer, or vice-versa.

It’s unfortunate that there are bugs in the Android version of ST. I’m using an iPhone as my main, but I just took out my Note 2 and I saw that it was much more difficult to navigate. I’ll look into this a little, but this is mostly bugs with ST and not this app, so I’m not sure I’ll be able to do much.

This is all happening in my free time, and spring has just hit the midwest. I’m going to be outside. I may be able to do a little work on it this weekend, but don’t hold your breath. The sun is out and my clients don’t pay well =)

2 Likes

I had hoped to push a new release last weekend with a new method of sending codes, but I took a look at the code for the zwave lock and it wasn’t as much of a breakthrough I was hoping for.

Still, while looking through the source-code for the zwave lock I noticed some patterns that I could use to make this app better. I’m looking forward to integrating those soon.

I’m also thinking about modifying the official zwave lock code to give some feedback on code changes that I could then hook into to add some logic to ensuring that codes are set… basically setcode… wait… getcode… is code = what_it_should_be? No? Repeat logic. Yes? End, success… might not be possible, but if it is, it would greatly improve the reliability and trust level one could put into this app.

3 Likes

@ethayer I believe that workflow should be applied to a lot of these call types where you sendEvent/make call, put in delay then check status. If the status isn’t what you expect make the call again for X times until you put the device in a “failed” state.

Thank you for all the dedication on this app, I see this as an eventual direct integration with SmartThings. Where you enter say the “pin” on the user’s/presence page so there is a tie-in with who is using the code more so than just the name field that you have now. That said, for me the app has been working wonderfully, I do have an issue where new codes don’t always get pushed and I have to force them by running the app a few times until they register on all locks. I am guessing that is some of the error handling that you are working on.

Indeed, that’s what I’m working on now.

It involves editing the official zwave device type though, something I was hoping to avoid. I’m likely to include some device type code in the next release. If you decide to use it, you’ll get the reconcile method, if you decide to stick to the default, you’ll just miss that functionality but the app will still work. I’m happy though, at least the edits to the official ST device type to support this are very minimal.

I should be able to add another method to my app using this that checks to make sure a code was set successfully, and if not, send only that particular code or codes, which will get us a nice reliability spike.

Thanks for the app.

I have installed this app and it is listed under my smartapps. When I click “Done” after entering a username and code, I get an error “Please fill out all required fields”. I don’t see anything else to fill out. Please help

Latest code pushed with more features!

Use the custom device type included in the repository for better reliability. Codes will reconcile with the app and send the missing codes back to the lock until the lock is up to date!

This should also fix some of the issues that android users were experiencing.

The custom device type isn’t required, but reliability is a lot better with it. I only added a couple of lines of code to support my app.

-Enjoy

1 Like

Now that I think I have some of the issues around reliability solved, I’m ready to move on to working on making the app itself better.

This forum has come up with some good ideas to include in the app, which I’m hoping to get to most of them.

Let me know your experience with the app. How are you using the app? Is the app working as you’d expect? @DavidQ brought up a scheduling issue I hadn’t even thought about. Keep the suggestions coming, and I’ll add them to my wish list!

WISH LIST:

  • Start/Stop on specific date/time instead of daily (@DavidQ )
  • Possible passcode protection for the users page of the app (@Anyway)
  • Specific hello home actions based on user code and current home occupancy (@brianlees)
  • Certain user codes as ALWAYS ON users which ignore the normal schedule (@brianlees)
1 Like

java.lang.IllegalStateException: Method on class [physicalgraph.device.Command] was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails correctly.

Is this something to be concerned about? Is seems to have originated from the smartapp.

Kevin

I think I found the error. Pushed 3.1 to fix it. Please update your app.

I’m not home so I can’t test the usage functionality. You should be able to create users now at any rate.

Thanks!

##V3.3##
###Overhaul Schedule once again###

  • Added ability to schedule between calendar dates. @DavidQ
  • User usage now is reset manually, not on schedule or initialization.
  • Added more UI descriptions.
  • Cleaned up code for Scheduler.
  • Added A LOT of code comments for community readability.
  • Removed leave mode toggle. Access is now revoked whenever selected mode is no longer current, unless time is set.
1 Like

This app is great! I recently installed smart door locks on all my exterior doors and this app has simplified the process of user code management greatly.

I’ve only had the locks now for a few days now and I’ve noticed that the battery for a couple have dipped below 100% (the lowest is currently @ 87%). The doors reporting those values aren’t getting heavy use.

I reviewed the logs and noticed there appears to be polling of some sort (perhaps to validate latest codes?) that occurs every ~6 minutes. Also during initial setup there were a number of calls to update user codes. All of this is, as I understand, is intended behavior. However, does anyone have a good idea of the effect of the polling on battery life? Is this typical battery behavior for smart door locks? Is battery status reporting more likely the culprit?

If the battery on a motion sensor dies, no biggie. If the battery on a door lock dies, my family might make me the next “thing” to die. :stuck_out_tongue:

Any ideas are appreciated. Thanks!

My locks are as follows:
1 - Schlage Connect (Installed 3/24 - 100%)
3 - Monoprice Door Locks (Installed 3/21 - 100%, 94%, 87%)

i wouldnt trust a monoprice lock to be very trust worthy, especially in battery life

The app polls every two minutes until all codes are set, and then no longer polls after all codes are successfully reconciled. Normal polling will continue per normal, and the app will use that event to make sure the correct codes are still set, but won’t schedule any additional polling events.

Your poll every 6 minutes is likely being caused by other factors other than this app. To confirm, my app runs the method ‘doPoll’ every two minutes while it’s working on codes. If you don’t see that schedule method the log trace, it’s not this app.

One thing to watch out for is if you set a code that the lock, for whatever reason, wont accept, the app will go into a polling loop trying to reconcile the code. If this happens, the lock will be polled every two minutes, but that doesn’t sound like your case. To fix this, just fix the offending code in your settings. I plan on handling this edge case in the future, but this should be pretty rare.

My advice for anyone with these locks is to have a backup in case of battery failure. Some locks can be jumpstarted with a 9v battery, and some locks accept a traditional key. I have two entrances to my house with two smart locks, so I doubt that they will fail at the same time… but I do keep a key on my keychain just in case. I’ve never been locked out or had to use the key in the two years I’ve been using them.

Hope that helps.

Thanks for the response!

In general, what type of battery life are folks getting out of their smart locks?

Hi, Erik!!

Now you’ve really done it!! This version 3.3 is off the hook! I LOVE it!! Thank you for the Calendar option, it’s working flawlessly. I also like the code usage counter; it will help with battery management in estimating number of times codes are used as battery life dwindles. I have nine Kwiksets; most are 910s and a few are 914s but either way, the app is functioning as expected. Next I’m testing multiple installs of the app so I can schedule door codes for guests arriving two or three weeks down the line. And since each of my rentals has its own ST hub, I suspect that installing 3 or 4 installs per hub won’t be a problem. I’ll let you know what I find.

Again, thank you for this wonderful app. Home owners and Vacation rental managers using smart locks are rejoicing right now.

David

3 Likes

v3.4

Just a small change for those using the custom device type. I removed the annoying blank log message in the device feed.

That’s all.

Ah! That is what I was seeing showing up in the log every 6 minutues. After updating to the latest version this no longer occurs.

I have 3 schlage camelot touchpad deadbolt locks.

After installing the device type and the app; when going into the device, then smart apps, then the User Lock Manager app I get “You are not autorized to perform the requested operation”.

I’ve restarted my phone and the app a few times. When going into SmartSetup and then into the app most everything looks okay except when I setup for 2 users both show “User 2”. When I input my user credentials it shows me as both users.

Any idea? I’ll try and reinstall to see if that helps

Strange! Can you look at the logs that you get in the live logging section of smartthings?

https://graph.api.smartthings.com/ide/logs

Get that error to pop again, and then look at any error messages you get, specifically about the lock manager app. Then post those here.

That will get me the info I need in order to fix it. Usually when an error like “You are not authorized” is actually just a nice way to say “Erik messed something up.” The real error lives in the IDE logs.

Thanks!

@ethayer

I believe your latest change has broken the User Management settings page.

In your setup that pass a params value to a dynamic page it appears that it should be “def i = params.params.number” instead of just on params. May want to change it to page as the function variable to avoid confusion.

Additionally, I like the idea of this coding style for the menu, but for some reason it always shows the maximum user as all the entries. ie if I select max users of 3 it says “User 3” all the way down. It may be some caching bug in the android client or larger, not sure. Are you seeing this issue?

I put in some debug statements and throughout the calls the correct value is being passed once the params issue is corrected. Here is my edited code of your latest git with debug: https://gist.github.com/chuckpearce/d9f0d4a6f34855b38607