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

smartapp_alerts
dth_locks
smartapp_security
smartapp_locks
rboyapps

(Tina Caron) #44

I am really interested in this set of SmartApps code. I’m very new to the IDE, and have successfully added a couple of others by copying published code. With @bigpunk6 device-type.lock code, I get the following error message, which I’m not sure how to fix:

Java.lang.IllegalArgumentException: Metadata definition not found

It’s not giving me a line number so I don’t know where it’s gone wrong. I have a Kwikset 912 lever lock, in case it makes a difference. Thanks in advance!


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

Are you creating a Device Type or Smart App?


(Tina Caron) #46

I started with the Device Type so that I could then use a smart app that leverages that device type. I hadn’t done anything with the smart app because I assumed I would need the device type associated to my lock first. I do already have the lock in my smartthings as a lock. But…I’m having horrible results from it just as-is so I was hoping some of these community apps would work better. I had no trouble pairing the lock, but it almost never is able to lock or unlock from the app. Status is almost always reported to the app correctly, but when trying to actuate the lock, it tries for several minutes, and eventually times out (doesn’t even register in the logs either, so something is clearly wrong).

Occasionally I will have a problem with proper status too, but anyway I digress. I was hopeful that I could use some of the awesome device types and apps some talented community members have created, and have better results and reliability. The way it stands as installed from ST, it’s almost a useless investment because I can’t count on it. End Rant. :smile:


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

This is a Smart App, not Device.


(Tina Caron) #48

I finally got it to work, was trying to create the custom lock device type. But…turns out, at least for now, that I may not need that after all. I managed to finally remove and re-pair the lock and find the right logs. Those logs were confirming that I wasn’t getting the secure portion of the installation finished. I dug up a long ethernet cable and got the ST hub within a couple of feet of the lock and then it paired up all the way through. I have success with some of the stability issues I hope, and other smart apps that I thought would require that custom lock device type are working without that.

Thanks for your replies! This forum is really helpful in getting the most out of this awesome device.


(Benson Wong) #49

Just want to say thanks. I’m new to smartthings and just installed the schlage camelot but I got this to work just by copy and pasting the code. Works really well!

I would love to see if there was a way to get notifications like “User 2 has unlocked door”. and then beyond that would like to see see if I could add a condition to that notification, such as a lack of my mobile presence, or that my nest is set to away, or both.

I believe my googling has led me in the right direction… thanks to rboy again?


(Tina Caron) #50

@wrongbenson there is code by another user that does what you are looking for. I have used it successfully on two different doors, with two different codes, and different messages for each code on each door. It’s a smart app called Cleaners Have Arrived I believe. I installed mine through the IDE using the “add smartapp” and “from code” option. I am not sure how to get you a direct link to his code, but it’s in a thread. If you search the forum for “Cleaners have arrived” it will get you there.


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

Okay I’ve published 2 version of the app now

  1. Lock single user code management
  2. Lock multi user code management with notifications

The first one is manage the door user codes individually, this is for security if you don’t want history of user codes to be left in the app or are managing the user codes manually from the lock also.

The second app is for a more comprehensive user management. You can program multiple locks simultaneously (make sure they have the same user code lengths). Simple to use, just enter the maximum number of user slots the lock can program (highest amongst all locks if managing multiple locks simultaneously), now enter the user name/codes for each slot. Leave it blank to delete the user slot. Keep in mind the app take 5 seconds to program each code, so you’ll have to wait 5xZ seconds if you lock supports Z user slots before the programming is complete. You can select notify if you want to be notified when a particular user uses the lock.


(Gary D) #52

[quote=“RBoy, post:1, topic:7043”]
http://earlyaccess.mcebuddy2x.com/SMART_THINGS
[/quote]This is generating an authentication request…


(Dave N) #53

Yeah, I tired any same thing, wants me to log in.:frowning:


(Jay Jay N.) #54

same having an authentication issue, please provide the user information so we can get access to this code thanks!


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

I’ve put a bunch of cool apps and device customization’s I’ve written on the RBoy server. You may want to consider joining the RBoy Apps program to get access to the server.

Basic apps I’ll continue to post here under the open source license.


(Chad Walters) #56

Ok. How do you get the z-wave locks to behave nicely and deterministically? I have been messing with the setcode and deletecode methods for hours now. When it executes, some of the commands get returned by the z-wave as successful. Some do not. It is non-determinstic. From reading, I am pretty sure there is a timing problem (can only have so may active pings to it), but I can’t slow it down enough and not time out. I see that in your latest you are doing a runin with a 1 second delay, but that does not seem to work for 3-8 different codes.


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

Yes that was tricky took me a week to get the parameters and logic right. That’s why this is a full time activity for me -writing apps and software :smile:

There are multiple issues you need to address, a timing - z-wave on ST is notorious for not retrying if the command fails and you need to account for devices not responding in a timely fashion. Second being the ST platform itself, timing is not one of it’s strengths, e.g runIn works great if you call it once, but if you call it 7 times in a row it stops working. Same with delay, put in a more than 20 second delay and the platform kills the app (exception).


(Chad Walters) #58

Ok. I assume this means I need to listen for various events. What events do I look for?

Actually, there is a easier question: where is there any doc or examples of doing anything even remotely like this?

If I have to worry about commands not working, then I need to create a generic handler class to use for everything I am going to write. A PITA, but one that I can do once and re-use. I just need to know where there is doc or examples that tell me how I should deal with “making sure” things get done in my system? What are the events I should listen to? Or are their return codes I should evaluate?


(Brian) #59

I’d like to buy but for $30 donation I would like to know what the other cool apps and device customizations you have there and what they do. Is there a place to go to view or read about these?


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

Actually you can get a discount code access for half the price through an ongoing facebook promotion at www.facebook.com/rboystapps under access coupon.

Some of the apps there so far:

  1. Multi user code mgmt
  2. Single user code mgmt
  3. multi day thermostat
  4. weekend/weekday thermostat
  5. Motion based thermostats
  6. Smart station controller

will add more as we come up with stuff.


(Cody Truscott) #61
  1. I don’t understand what a Windows media player app has to do with SmartThings & Locks.
  2. I think it’s incredibly unethical to sell software intended to strip advertisements – content creators need to be paid.

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

:)) Tell that to “the hopper” which is sold by a cable company!
Since you’re so happy to pay content creators please subscribe to RboyApps and pay the devs for the years of effort they are putting into it and also the months spent developing apps for SmartThings.


(Gary D) #63

I personally have no intention whatsoever of paying for a project designed for video commercial skipping in order to view source for automating a door lock. (I also have to question the oddness of requiring a paid donation to a site that has the following text on the very top of their webpage: “Project Hosting for OPEN SOURCE SOFTWARE.” Since when does “open source” require a donation?)

However, if that’s how @RBoy wants to “sell” his code, that’s certainly his choice. If there are any licensing issues with it, I’m sure he’s aware of them (or will eventually learn of them) and will handle them.

On the other hand, I suspect, that most people would be more inclined to give $5 to the author directly as a show of appreciation than to pay $30 to a website that has nothing whatsoever to do with SmartThings, door locks, etc.

…just my opinion.

Take care
Gary