I created an integration to provide Zigbee lock management in HA. This integration automatically creates the necessary helpers, automations, and dashboard YAML to allow anyone (who can install HACS and add /packages support in their config) to quickly setup a KeyMaster-like UI for control of user codes on a ZHA keypad lock.
Good to see this, it looks quite similar to what I’ve just written up on how I’m managing Yale Assure locks with zigbee2mqtt. Some clever person could probably combine the two.
Good timing! Given the differences here are mostly just the automations YAML and the service calls to ZHA vs Z2MQTT, it would be fairly trivial to modify this integration to support both types of locks. The flow would then create the automations based on which protocol the selected lock uses.
Adding support for syncing multiple locks would be a bit more effort.
*I also don’t have a Zigbee lock at my disposal (I prefer Z-Wave).
I made this because I used to have some, and I manage a few HA instances for folks who do. I was always annoyed by the lack of support for ZHA locks. Like you, I had created my own set of helpers and automations in YAML I’d created to solve this, but it wasn’t easily scalable and not something less HA-savy folks could jump into. Hence I created this integration to make it simpler and easier to set up.
Excellent! I will try this one with a Yale Zigbee Lock (YRD256L TSDB). I have the Yale Zigbee Gateway as well, but trying to keep my lock setup simple with just the lock and without the Yale Gateway. Everything works nice and stable (lock / unlock, state, and battery) but I miss the user code management module. Do you guys have any idea if we have this planned for HA natively?
I don’t think HA has plans for native user-code management of locks, as there are so many differences between brands and protocols, etc.
For your lock, if you’re not using the gateway, then I don’t think I’d expect there to be anyway to access the lock settings other than the keypad.
I’m not familiar with how HA integrates with the Yale Zigbee gateway. If it connects with ZHA (Zigbee Home Automation) in HA then this will work as is. But my guess is that the Yale is cloud connected, so you’ll need an integration specific to your Yale hub to get it into HA.
Ok, I’m stuck with the installation of this Lock Manager. I believe I’ve successfully downloaded and install it as an integration. But, I don’t know what to do next. The last set of instructions on the Github page states,
I see you enter the user’s name for a lock code slot with this manager. So when someone uses their code to unlock the zigbee door lock, will an entity or attribute be set with that person’s name so that a notification could be fired off saying, “Benjamin Franklin unlocked the door!”?
You could most definitely set this up in an automation, and once sorted, it could be included into the integration. Ironically, I don’t actually have a Zigbee lock with a keypad, so I’m not really able to set this up myself, as I can’t see exactly what is passed in the zha_event when the lock is operated with the keypad.
What you’d need to do, is use:
Setup a user code in the ZHA Lock Manager
Start a ZHA Event capture: Developer Tools > Events > Listen To Events > “zha_event” > start listening
Operate the lock from the keypad with the code you entered in the ZHA Lock Manager.
Share the full ZHA_event details here. *It shouldn’t include the pin in the event so there’s nothing private in the event.
From this we can build an automation that listens for this event, and references the code slot # used to operate the lock against the input_text helper with the user name that corresponds with that code slot.
I need the zha_event details to know what attribute is used to reference the code_slot and whether the slot # ties exactly the to the slot you provided in the lock manager. (e.g. which code slot the code belongs to in your lock manager configuration) I’m not certain on this, but I think some ZHA locks start the first user code slot at #2, while others don’t, so there may not be a one size fits all mapping between the code slot communicated by the lock and the slot the code is tied to in the integration.