Writing DTH for Kwikset 910 Z-Wave Lock (Issues)

(Tony B.) #1

I am trying to complete my first DTH to add “Locked by Keypad” to webCore and all other Smartthings that I need that function in.

It seems that I am stumbling a bit. Everything looks right, it even logs 'Locked With Keypad" in IDE but no matter what, I can’t use a condition “If Garage Door Locked” is “Locked by Keypad”.

What else do I need to add to make it visible in webCoRE?

I already tried asking on the webCoRE forums. Nobody was biting, after a month I got one response that didn’t help.

Can anyone PLEASE help?

(sidjohn1) #2

I think you might have to write your own smartapp for that…

(Tony B.) #3

Why? It reports the right thing, everything in webCoRE is what the DTH says it can handle.

I’m not attacking, just questioning.

(Tony B.) #4

I figured it out, finally. After 2 months.

The DTH was fine. I was not looking at the right variable in webCoRE.

$currentEventValue was what I needed.

Now, no waiting for the ST to run the “Goodbye!” routine for 5 mins.

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

Tony, @Maddie responded to your email with details on how use your RBoy Apps DTH in WebCore and CoRE.

I’ve also posted instructions here:

(Tony B.) #6

Respectfully, no that was not complete. This DTH has about 5 ‘keypad’ methods as you can see in my github link. I fixed it by altering the DTH to actually say ‘locked by keypad’. Code 18 around line 610 is where it is fixed to make $currentEventValue say what I needed.

I am absolutely shocked that this isn’t stock. ‘Locked Manually’ is. Someone at ST didn’t figure we needed that information.

You are more than welcome to take my edits and use them yourself @RBoy

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

Yes I agree, there’s a lot that’s missing from the stock handler some of which we have given to ST and they’ve incorporated into the new handler.

I know what you’re saying about the “not complete” part and it’s intentional for compatibility purposes with existing apps. The primary change you’ve made is already present in our enhanced DTH. However the additional change you’ve made to the description is so that it works with $currentEventValue variable with WebCoRE is very specific to your Kwikset 910 lock, that may break existing SmartApps from ST which is why we’ve retained the original description but included the additional metadata for apps like WebCore and CoRE to process.

The most compatible way to use the DTH would be to use the $args variable rather than looking at the $currentEventValue variable as I had outlined in my post above and this way it also works with existing apps and with the Kwikset 910 lock + WebCoRE.

(Tony B.) #8

So far, I’ve not noticed it having issues. I’m not saying that it won’t but, that change I made is only for code 18. For now, everything works as it did before and has the ‘locked by keypad’.

Your DTH says ‘Locked Manually’, even in the IDE logging. Not sure where you changed it. Haven’t looked though yours.