Need Generic Zigbee Lock Driver

Can't seem to find this online.

Where are all the drivers that come with the HE stored?

1 Like

The built in driver code isn't visible to us, but you can pull up all the built in drivers by opening up a device and selecting the driver drop down.

I need the code, not just a list of what is available :slight_smile:

Not going to get it. Not public.

2 Likes

Huh? That doesn't make any sense. Why would they lock the code down? Not even SmartThings did that.

I would like to add "Locked by Keypad" to it to immediately arm the system.

You didn't have access to that in ST, you had access to the device handler (driver code) for that device. Is that what your asking for?

So, basically two options for you at the moment:

  1. Create a rule that uses the lock status as a trigger to arm

or

  1. Convert this (or something similar) from ST: SmartThingsPublic/zigbee-lock.groovy at production · SmartThingsCommunity/SmartThingsPublic · GitHub
1 Like

Yes, that is exactly what I am asking for.

The code for the device handler or Driver code.

Hubitat has never released their driver code or app code. They have only given generic code samples. It is unlikely they will release the code, so the quickest and easiest thing to do would be to write your own driver, or have someone write one for you.

With that being said, is the stuff you are looking for (locked by keypad?) even an option on these locks? There have been requests for similar reports on Zwave locks, and we were told that this wasn't an exposed feature that was broadcasted to the hub.

It was in the Zigbee Lock on SmartThings but never enabled, I have no idea why. It works.

https://raw.githubusercontent.com/abuttino/SmartThingsCustom/master/AJB%20SmartLock%20Zigbee.groovy

Starts at line 599. Just search for more "keypad" occurrences.

I guess I am being slow today, but I am not quite sure what you mean by that? You somehow enabled this option and you know it works? Or it just exists in the code so you are assuming it works?

It seems odd to me they would include something in code and yet not have it enabled. That is usually a sign that it didn't work, it didn't work as intended, or it caused problems.

I enabled it and it worked, but; now that I have Hubitat, I would like it to work again :slight_smile:

Don't know the code yet (how to port). Was hoping to learn from this driver code. Seems silly that they won't allow such things.

As long as you have the code, have a try at it yourself. If you get stuck someone probably will be able to help you, if you post the error it generates.

1 Like

That was surprisingly easy. Only needed to change physicalgraph..

Need to get a full zigbee response from the lock on what happens on "Keypad Locked" because it doesn't work anymore.

That sounds like a reasonably good feature to add. I could also see that being used to turn off lights, etc. Maybe @mike.maxwell can give some insight on this and maybe “locked by keypad” could be added to the stock driver.

this all depends on if this is produced by the device, the two zigbee locks I own do not produce a distinct event for locked by keypad.

So in order to add this in i will need the live logs only showing the locked by keypad event.
to capture these you will need to enable debug logging in the driver, open live logging, then lock the lock with the keypad.
I will also need some specific model info for the lock in question.

2 Likes

I’ll check it out on my Kwikset 914 & 916 and get back to you shortly.

Sure enough it's there with the generic zigbee lock driver. Didn't even need my own.

Now, I have to figure out how to capture it with webcore..

2020-09-11 01:06:40.664 pm [info]Front Door Lock was locked by keypad..

BTW, This is a Kwikset 910

1 Like

This is with the 916:

They both show correct events; either locked by keypad or locked by manual. They also report "locked by digital" when locked from my phone:

Thanks for this.

@mike.maxwell
Can you push a code update that includes this info for RM and webCoRE? It's GREAT for "Instant Arming"

SOMETIMES, the lock also pushed "locked" but if it's "Locked by keypad" that should stick for the current event.

[dev:99]2020-09-11 01:11:26.207 pm infoFront Door Lock was locked

[dev:99]2020-09-11 01:11:26.188 pm infoFront Door Lock was locked by keypad