Zigbee Lock User Code addition

No not yet I’ve been away this weekend. I’m still wondering what I can do to get that working faster. I wish I could send commands via a Xbee for faster programming :).

Any luck on your end with the sniffer?

Yep, I was able to set user code 3 to a PIN of 0123 with this command:

st cmd 0xF95D 1 0x0101 0x05 {0300 01 00 04 30 31 32 33}

Now I can lock and unlock the door from the keypad with that PIN. This PIN is not required for lock and unlock commands sent over the air from the device type handler.

Gentlemen, please continue this good work. I ‘inherited’ a Yale YRD-220-HA-619 when our low voltage contractor worked on our house. I very much would like to work the lock via ST just like I would at the keypad…but with a much simpler interface. @flynhawaiian, I am not a programmer, but will be happy to be a real-life tester in the field if you need one. I will have time for this in late December (vacation time comin’ my way!)

I’m still working on it, but now my lock has completely stopped working with smart things. Haven’t even done anything different just stopped working 6 days ago. so peeved…

Any progress on this. Can I help work on it?

just use this smartapp works great

That’s for zwave. This thread is for zigbee locks. Should be able to use the same SmartApp once someone creates a working device handler for zigbee locks that includes setting codes.

you’re right… my bad … sorry

So I’m going to take a stab at writing this. Was looking for some information. Is there more detail on the “lock code” capability? I don’t see it in the documentation anymore. All I can find is this reference.

We’ve started taking a stab at this in our lab. Will report back once we see some progress. More difficult than i expected. Need to study the zigbee guide

So the code I have has no issues deleting or setting codes. Also it pulls the user and pin length settings from attributes on the lock. The problem I have is how to retrieve a pin. I am not sure if there is something different I need to do to retrieve data from a command versus an attribute. I am executing

zigbee.command(CLUSTER_DOORLOCK, DOORLOCK_CMD_USER_CODE_GET, "${zigbee.convertToHexString(codeNumber.toInteger(),2)}00")

     trace parse() --- description: catchall: 0104 0101 01 01 0140 00 4554 00 00 0000 0B 01 0681
     cmds: [st cmd 0x4554 1 257 6 {0300}, delay 200]

where codeNumber is the user slot number. The response returned is the same for all users no matter if a PIN is set or not (only the last digit is a 0 if I send an invalid user format). Unfortunately that data does not contain the set PIN so I don’t know how to retrieve it. As I have never worked with groovy or ZigBee before I’ve been fighting with a lot of trial and error.

Perhaps someone in the user community can point me to how to retrieve the data returned from a command.

1 Like

It’s not uncommon for locks not to return pin code data due to security reasons. If you look at the z wave lock implementation you’ll notice the same thing.

Well that would make sense. I’m trying my best to implement lock codes but as I don’t have documentation on that capability, I’m just guessing the inputs and outputs of the commands.

I would guess requestCode should return a code, so that is what I was trying to implement. Do you then have the DTH encrypt and store the pins somehow or just return that the function is not available?

Unfortunately it appears that I can’t even run the command to tell if a PIN is set or not. That at least would be something.

Edit: I’ve found that to get this to work an Attribute needs to be enabled. The Yale locks set this attribute to read only so it can’t be changed.

Actually what I would recommend to have a consistent performance across the DH types and compatibility with existing smart apps, copy the user Pin MGMT code from the z wave handler and just implement the pin code reporting configuration and pin code setting / deleting commands and you should be done. We have done this in our lab with @tpmanley help just haven’t finished it up yet but that would be simplest way forward with maximum reuse and compatibility.

Have you configured the lock reporting?

Depends on what needs to be reported. I’ll take a look at the PIN management code.

Everything that needs to be reported is done automatically (no binding needed). You just have to know how to parse the responses. I’ll work on that.

1 Like

I’m hoping to have a mostly working version by next week at the latest. Is there someone who can test this with a kwikset ZigBee lock? I can PM them with the code when I’m done.

I have finished my initial version of this DTH

Have you had any luck with your ZigBee DTH? @tpmanley @RBoy. This works for me but it is not perfect. Trying to make some enhancements and clean things up.

1 Like

Hey congrats and fabulous work, our DTH is still in progress, we’ve had to put it on backburner for a while due to other priorities but we want it get it done by EOY with additional features hopefully.