[RELEASE] Lock Manager

smartapp_locks

(Richard) #1701

Disregard. Think I see what’s happening now.


(Erik Thayer) #1702

Yep, just for others to put it here. You choose what you want to add and then you click the create button. This adds whatever it is that you choose above. This is made this way because in SmartThings, if you just have multiple buttons for the different types, it will show all of the child apps as many times as there are buttons.

This was my work-around for that. Hopefully it’s intuitive enough. I’m not sure how others have solved this problem, but it seems to work.


(Tony B.) #1703

How am I supposed to delete the DTH and SmartApp if it is in use? The IDE will NOT let me change it back to Zwave.


(Tony B.) #1704

New question… I deleted everything, that was not fun but still, so fun on a cool new thing. However, still don’t have “locked by keypad”. Would you mind if I looked over the DTH? I’m pretty sure it’s ALARM CODE 5. I will check tomorrow with a log from another device.


#1705

I initially copied the zwave-lock-schlage.groovy (here: https://github.com/ethayer/lock-manager/tree/beta-2/devicetypes/ethayer/zwave-lock-schlage.src) and manually pasted code into the device handler area on graph.ide and then I did the same for the smartapp area for lock-manager.groovy (here https://github.com/ethayer/lock-manager/tree/beta-2/smartapps/ethayer/lock-manager.src)

I haven’t yet installed in smartthings app but then I saw the installation guide for v1 and wanted to know if I can follow it to install v2-beta so I can update from repo instead of the copy/paste route? (fresh install-pending deletion of the *.groovy files I copy/pasted manually)

ok used beta-2 as branch and good to go, next step app install.


(Erik Thayer) #1706

Code is open and free to play with, do what you will.

Which Kwikset lock do you have?

I’m under the impression that, at least with the 910 unit, lock with keypad and manual lock with inside mechanism turn creates the same zwave event and alarm code. Higher tier Kwiksets probably report differently.

Test it out, put a debugger and the alarm code report and look at the parameters. Do both actions. Are they different?


(Tony B.) #1707

Oh yes, they are very different.

What is the best debugger without a Z-Wave card? I tried my ISY994i-z last
night to give you a code but it’s not reporting anymore…


(Erik Thayer) #1708

What lock do you have?

You can use the SmartThings hub with the default or modified DTH

...
/**
 * Responsible for handling Access AlarmReport command
 *
 * @param cmd: The AlarmReport command to be parsed
 *
 * @return The event(s) to be sent out
 *
 */
private def handleAccessAlarmReport(cmd) {
	log.trace "[DTH] Executing 'handleAccessAlarmReport' with cmd = $cmd"
...

You shouldn’t need anything fancy.


(Tony B.) #1709

That DTH just gives an error on creating it from code.

2 Kwikset 910’s, sorry I didn’t answer that before.


(Tony B.) #1710

@ethayer

Kwikset 910 Z-Wave

Locked with keypad:
"zw device: 11, command: 9881, payload: 00 71 05 12 00 " parsed to [‘name’:‘lock’, ‘value’:‘locked’, ‘isStateChange’:true, ‘displayed’:true, ‘linkText’:‘Front Door Lock’, ‘descriptionText’:Front Door Lock lock is locked]

Locked with knob:
bc9f9b7b-e8bf-44bb-8f4d-90b9f334b733 9:14:47 AM: debug "zw device: 11, command: 9881, payload: 00 71 05 15 01 " parsed to [‘name’:‘lock’, ‘value’:‘locked’, ‘isStateChange’:true, ‘displayed’:true, ‘linkText’:‘Front Door Lock’, ‘descriptionText’:Front Door Lock lock is locked]


(Erik Thayer) #1711

Looks like you’re still using the old DTH. The new one should include the method of unlock. Can you verify that you’ve updated to the default SmartThings DTH?


(Tony B.) #1712

This looks better @ethayer
94092a9d-0af2-4270-ba2f-ab7958c25090 9:41:19 AM: info [DTH] parse() - returning result=[[name:lock, value:locked, descriptionText:Locked manually, data:[method:manual, lockName:Garage Door Lock], isStateChange:true, displayed:true, linkText:Garage Door Lock]]
94092a9d-0af2-4270-ba2f-ab7958c25090 9:41:19 AM: debug [DTH] zwaveEvent(physicalgraph.zwave.commands.alarmv2.AlarmReport) returning with result = [[name:lock, value:locked, descriptionText:Locked manually, data:[method:manual, lockName:Garage Door Lock], isStateChange:true, displayed:true, linkText:Garage Door Lock]]
94092a9d-0af2-4270-ba2f-ab7958c25090 9:41:19 AM: trace [DTH] Executing ‘handleAlarmReportUsingAlarmType’ with cmd = AlarmReport(alarmLevel: 0, alarmType: 18, eventParameter: [], numberOfEventParameters: 0, zensorNetSourceNodeId: 0, zwaveAlarmEvent: 0, zwaveAlarmStatus: 0, zwaveAlarmType: 0)
94092a9d-0af2-4270-ba2f-ab7958c25090 9:41:19 AM: trace [DTH] Executing ‘zwaveEvent(physicalgraph.zwave.commands.alarmv2.AlarmReport)’ with cmd = AlarmReport(alarmLevel: 0, alarmType: 18, eventParameter: [], numberOfEventParameters: 0, zensorNetSourceNodeId: 0, zwaveAlarmEvent: 0, zwaveAlarmStatus: 0, zwaveAlarmType: 0)
94092a9d-0af2-4270-ba2f-ab7958c25090 9:41:19 AM: trace [DTH] Executing ‘zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityMessageEncapsulation)’ with cmd = SecurityMessageEncapsulation(commandByte: [18, 0], commandClassIdentifier: 113, commandIdentifier: 5, reserved13: 0, secondFrame: false, sequenceCounter: 0, sequenced: false)
94092a9d-0af2-4270-ba2f-ab7958c25090 9:41:19 AM: trace [DTH] Executing ‘parse(String description)’ for device Garage Door Lock with description = zw device: 12, command: 9881, payload: 00 71 05 12 00

Still locked manually but, it’s not your DTH.

On the last few pages of this it looks like Alarm Code 18 is that Locked by Keypad I was talking about.

http://s7d5.scene7.com/is/content/BDHHI/ApplicationNote-UsingASCII-Z-Wave-Locks


(Tony B.) #1713

I made a custom DTH to take care of this. Not exactly sure why it says “Locked by keypad” in the code defining this then says Locked Manually under that

git: https://raw.githubusercontent.com/abuttino/SmartThingsCustom/master/Z-Wave%20Kwikset.groovy

Not bad for my first DTH. I am sure that I have a couple extra things to fix in there but it’s a good start.


#1714

Just installed the new version. It was a seamless install. I changed the device types first, and then removed the old Lock Manager device type, and then all of the instances of the app. I then removed the smart app child apps and then the main lock manager.
Installed the new app, and all worked great. Much cleaner and easier to use than the old version. It took about 5 minutes to install on all 5 locks in my house.

Great product from what i see so far!!

Thanks!


(Rob) #1715

TL;DR I had trouble setting lock codes after converting my Kwikset 909 to a 910. I factory reset the lock and started over and everything works fine now.

I installed the Z-wave card in my Kwikset 909 to make it a 910. At first Smartthings wouldn’t even see it at all so I had to exclude it in the General Device Exclusion in the Z-Wave Utilities in the app. Then it paired fine, so I thought.

For some reason I could still only use one code that I set before and I was seeing errors in the Smart App as well as the IDE every time I tried to set a code. “Code not set.” It was also not reporting when it was locked or unlocked without a manual refresh. Something wasn’t right…

I deleted the lock from Smartthings to start over, but I left the DTH and Lock Manager, since there’s really no messing up an installation (right?).

Then I RESET THE LOCK! by removing the batteries and holding the exterior lock button while I inserted the batteries again. I held the button until the third beep while it calibrated and did whatever it needed to do.

After that, I added the lock to Smartthings and it actually used the Z-wave Lock Reporting DTH right away and I didn’t have to manually select it in the IDE. Everything has been very smooth since. I can create lock codes and it reports un/lock immediately to the app (and WebCore and ActionTiles). Whew.

Just putting this out there in case it would help someone.


#1716

@ethayer, this 2.0 version will work with @jhamstead Universal Zigbee Lock DTH? jhamstead`s DTH has aditional features for Yale locks that Smartthings default DTH doesn’t have.


(Dana ) #1717

Thanks for posting your process. I’m looking forward to doing the upgrade, but out of town last weekend and this coming weekend, and want to do this on a weekend to allow me plenty of space to screw things up and then recover before the work-week starts. :slight_smile:


(Richard) #1718

Here’s something odd. Slot 1 keeps getting deleted. And it actually sends me a notice that it’s being deleted. Has done this twice now.


(Erik Thayer) #1719

Just randomly? If you get a chance, turn on debugging in the app by opening the advanced settings on the bottom of the app, then look at the log in the IDE.

I haven’t had that happen in testing… Is another app altering the slot?


(Richard) #1720

I’m also using the ST Smart Lock, but not to manage anything. But I recall you said that was OK. For now, I moved the slot one user to another slot, and I’ll see what happens. Thanks