KeyMaster Z-Wave lock manager and scheduler

Thanks to all the devs for their work on this project. I’ve been following it since darn near the beginning. I’ve just ran into a weird issue. One of my slots is “stuck” and I can’t delete (it just stays on “deleting”) and when I try to add a new code it stays on adding. I reinterviewed the lock and which was successful but still doing the same thing. All of the other slots work fine. I also tried to heal the node and that hasn’t worked either. Interestingly, when I try to “Reset Code Slot” input_boolean.turn_off turns it off immediately with no change in behavior.

Any ideas on additional troubleshooting I should try?

I’ve been having similar issues with my locks lately. Mine seems to be caused by underlying zwave issues and keymaster not being able to detect some failure states.
For example, if the zwave node is marked dead while attempting to set/delete a code, keymaster will assume success. If the node is dead before setting the code you can get stuck in adding/deleting.
I would rule out zwave issues first. Can you post a “silly” level debug log that is taken while a code is being set?
Configuration → Integrations → ZwaveJS → Logs → Silly

That makes sense. Perhaps further verified by the fact that I’m not getting anything in the “silly” logs when I try to add or delete that slot. Literally nothing. When I add or delete other slots I get a ton of expected reporting.

I have many locks, and about half of them started exhibiting this problem sometime within the last week or two. I don’t think its a keymaster issue. I think its either extremely cold weather messing with zwave propagation/devices, or maybe a zwavejs update. When I watch the node get declared dead in the logs it seems to happen extremely fast. One second I believe.
I’m in the process of switching to zwavejs2mqtt which gives much better insight into the network.

One more thing to try to get something from the logs;
Call zwavejs.ping in the developer tools. Pass in the device name. That should try to force the zwavejs server to reach the node.

I just re-read your posts and noticed something. If its just one code slot, but the others work on the same lock, you are definitely connected to the device.
I also want to clarify that when you call script.keymaster_<lock>_reset_codeslot you’re just passing in the number of the code slot, not the input boolean. In yaml it should look like this (if its the first code slot):

service: script.keymaster_<lock>_reset_codeslot
data:
  code_slot: 1

I had been just using the switch in the UI. Using the switch in the UI resulted in the switch immediately being turned off by input_boolean.turn_off as documented below:

image

When I reset the other code slots I don’t get this behavior.

I did go back and just call the script as a service in dev tools to test and I got the same results.

I’m mostly back up and running. In case this problem happens to others, here’s what I did:

  • deleted all keymaster integrations along with all related entities, automations, scripts, and timers.
  • removed zwave-js, but not sure if I needed to.
  • showed hidden entities and deleted the keymaster and zwave related ones.
  • started over, re-adding and configuring everything again
  • make sure to check config and restart HA after adding keymaster integrations

I did NOT attempt to use the parent-child feature. I was too worried I’d have to redo all of it again after the disastrous impact it caused previously. I would like to hear from others if they have the same problem as well as any insights into what caused the problem.

Do not put spaces in your lock name.

I have an installation question. The very first forum entry above describes the necessity to create input_boolean.allow_automation_execution and then various automations to manage it. Similar language is described in the GitHub and actual code is included there also. I’m using Zwave JS which I believe is the current recommended Zwave. There is no discussion of using Zwave JS and the example code doesn’t seem appropriate for this implementation, only for OpenZwave and the original Zwave. Is all of this deprecated now with the transition to JS and all of this logic no longer needs to be implemented? I searched the forum for discussion of input_boolean.allow_automation_execution and the last discussion was over a year ago.

input_boolean.allow_automation_execution is no longer used.

I now have my own answer; I’ll post here in case anyone else has this question. That first forum entry is out of date and the ‘Important Note’ should be ignored. Also the GitHub referenced is also incorrect as it references the old Lock Manager. If you find the proper GitHub, it specifically discusses Zwave JS and indicates that you no longer need to worry about input_boolean.allow_automation_execution. Here is the proper GitHub. Home · FutureTense/keymaster Wiki · GitHub. As I’m typing this @firstof9 also answered. Thanks all.

1 Like

I have 3 Yale YRD256 locks in my house, I originally had this installed and working as three separate integrations for each lock and everything worked fine. After some additional research I decided I just wanted to set it up as one Parent Lock and 2 child locks since I wanted them all to be sync’ed. Before switching over I removed all the integrations and manually deleted any disabled entities/automations/scripts/helpers so I had a clean install for the parent/child setup. I rebooted my raspberry pi and proceeded with the new setup.

Here lies my problem…when making changes to the parent lock it works ‘sometimes’ but it seems most of the time one of the child locks gets stuck in the “adding” stage and never completes the sync. Looking at the individual device, it adds the new code but doesn’t enable it. The locks are all responsive to individual commands and the integration worked fine when I setup them up on their own. Any thoughts as to what might be going on?

EDIT: Fast forward a day, and now the child locks are updating when I add a new pin but the parent lock is stuck in the “Adding” Pin status?!

This doesn’t make any sense to me.

Regarding “stuck” slots with states of adding or deleting:

This is just an observation/suspicion that I have, but I don’t really know for sure as I’m pretty new to this. I would get slots stuck in the “adding” state when I would make changes to multiple slots too quickly. Ever since I slowed down, waited for “adding” or “deleting” to finish before editing another slot, I’ve not gotten into the stuck state. It makes me wonder if the parent/child automations sending out multiple rapid-fire commands is causing problems.

Here are some of the ways I’ve fixed the stuck state:

  • Try reseting the slot - sometimes that will solve the problem
  • I think states get stuck if the same code is used in multiple slots - try removing the codes and/or reseting both slots
  • If that doesn’t work, once codes are removed and slots reset, try adding the same code to a different slot. Then remove and reset that slot as well. The original stuck slot then worked for me at least one time.
  • The most reliable solution has been to go to developer tools, find the pin entity that is stuck, such as input_text.back_lock_pin_3 for slot 3, and use the form at the top to set the state to blank.
  • Also browse the states in developer tools to find duplicate PIN codes. This seemed to be a frequent problem for me as I had been moving codes from one slot to another.

I hope this helps.

I have lots of locks and lots of slots, so I’d like to setup up button-card and broswer_mod for a more compact view of slot states, similar to what @mang0 did in this post:

However, that post uses a lock_manager_button template, and I can’t figure out where that should be defined. I referenced the post that inspired @mang0 and I see the templates defined, but it doesn’t indicate what file they go into or where I should put them in the config.

I’m new and haven’t used templates yet. Can someone help me understand where they go in the config? Do I need to switch my dashboard to yaml mode to do this? What’s the best documentation to review?

Thank for the input…In my case it isn’t an issue of adding/deleting too quickly in cessation. When making the changes, I literally sit there and wait for all three locks to attempt to sync before moving on…I let one sit for 30 minutes in hope it would finally get on board! lol…I was more interested if I was the only one experiencing this or this particular function of the integration was still a work in progress. I’ll probably just end up going back to each individual lock having it’s own integration and drop the child/parent for now. Appreciate the feedback.

Hi Tauren,

I’m looking at this solution for a similar setup but want to use it at 14 different locations. How are you managing locks in other locations? Is the system centralized or is it it’s own instance of HA inside the AirBnB?

I do multiple locations from a single interface, BUT, there is still a home assistant at each location.
I’m not sure how you could do this without HA at each location because you need something to control the zwave network/antenna.

Here’s the way I do it:

  1. HA at each location.
  2. Remote Home Assistant installed on each: GitHub - custom-components/remote_homeassistant: Links multiple home-assistant instances together
  3. Keymaster setup, running, and properly tested at each location.
  4. At the central location install Remote Home Assistant.
  5. Add a remote HA integration for each location.
  6. Custom central UI that sets the keymaster input_text and input_boolean variables through the remote service interfaces from the remote HA integrations.

I would also use the zwavejs2mqtt addon instead of the default zwavejs addon, simply because it gives much better insight into your zwave networks.

Thanks for this information! I’m not opposed to running HA at each location.

How solid are you finding this setup? Are you integrated with a calendar/.ics file to automatically add/delete lock codes?

There are pros and cons, and my installation is highly customized. Most of your experience will probably depend on what locks you use.
I would try it at one location and thoroughly test it to get a feel for it.

One thing you’ll run into is the sheer number of entities that one lock will create. I’m not exaggerating when I say I think each code slot (not just each lock) might create 40 different entities in home assistant. This is on top of the various automations and scripts each lock will install.
Unfortunately this makes doing anything else with HA a bit of a pain because you are constantly digging through keymaster entities to get to other devices.

The only times keymaster hasn’t done what it says on the box is when there are underlying issues with the lock itself. (I’m looking at you schlage FE599). For this reason I’d install and test it at each location before manipulating the individual entities remotely.

I don’t use calendar/ics integration, but I do feed the codes in through an external system through HA webhooks and it works well.

Lynn,

My installation is for a single Airbnb location, but there are 5 separate rentable rooms within one house. Each room has a Yale YRD256 lock, plus YRD256 locks on the front door and back door of the house (7 total locks). I’ll probably add 2 or 3 more (garage door, basement door, laundry door) eventually.

I have HA installed on a Raspberry Pi 4 with an Aeotec Z-Stick Gen5 Plus in a central closet near all the bedrooms and above the front door. I also have one Enbrighten 55256 Z-Wave Plus Smart Receptacle to extend the range to the back door. I’m using zwavejs, not zwave2mqtt. I keep considering switching, but everything is working pretty well now and I’m not sure I want to mess with it.

There aren’t really any other smart devices in the home, but the network is comprised of Ubiquiti
gear, including gateway, cloudkey, switches, access points, and protect cameras. I hope to add integrations for them, but I’m not sure how useful it will actually prove be. Also I’m going to attempt to install wifi modules into 8 Daikin mini-split head units and get them integrated next. That way I can automate switching the units to heating or cooling mode based on outside temperature since the system won’t run if head units are in conflicting modes. I have a MyQ garage door module to install and I’m tempted to install open/closed sensors on the front and back doors to make auto-lock smarter. Not sure if I should add Zigbee for those sensors or stick with zwave.

I’m not multi-site yet, but I’m about to start on a configuration at another house, so I’m definitely interested in how to go multi-site. I’ll certainly review the @jwsample posts for ideas! I’m going to attempt to configure HA on a Synology NAS using docker with a USB zwave adapter and probably try zwavejs2mqtt at this new location.

I agree with @jwsample about the number of entities. It’s crazy how many there are – at approx 40 per slot, I’m close to 3500 entities just for the locks. For an HA noob like me, it’s been hard to wade through all the “noise”, but I’m starting to figure things out. I’m sure there is a ton that I could be doing that I’m not doing. But I’ve got the essentials working:

  • Remote access to manage lock codes (via Nabu Casa)
  • Add/remove/schedule lock codes for guests, hosts, and service staff

I’m toying with the idea of building a simple house management webapp/mobile app for non-technical staff to use to handle property management tasks. One feature would be to add a guest name, dates, and key code and the app would use HA webhook integration to configure the locks. I’m not sure if calendar/ics integration would work all that reliably, but it’s interesting to consider.

In case you’re interested, I’m using 10 slots for each room lock, and 18 for the front and back door locks. This is currently overkill, but I wanted to make sure I had enough for possible future scenarios. The “emergency” slots are full-time codes available in case a guest code isn’t working and there is a technical problem preventing me from promptly fixing it remotely. Here’s how the slots are configured:

Room Lock Slots:

  • Slot 1: Current Guest
  • Slot 2: Upcoming Guest
  • Slot 3: Cleaner
  • Slot 4: Maintenance
  • Slot 5: Other
  • Slot 6: Host: Manager/Employee
  • Slot 7: Host: Owner A
  • Slot 8: Host: Owner B
  • Slot 9: Emergency Backup
  • Slot 10: Emergency Backup

Front/Back Lock Slots:

  • Slot 1: Room A Guest
  • Slot 2: Room A Guest
  • Slot 3: Room B Guest
  • Slot 4: Room B Guest
  • Slot 5: Room C Guest
  • Slot 6: Room C Guest
  • Slot 7: Room D Guest
  • Slot 8: Room D Guest
  • Slot 9: Room E Guest
  • Slot 10: Room E Guest
  • Slot 11: Cleaner
  • Slot 12: Maintenance
  • Slot 13: Other
  • Slot 14: Host: Manager/Employee
  • Slot 15: Host: Owner A
  • Slot 16: Host: Owner B
  • Slot 17: Emergency Backup
  • Slot 18: Emergency Backup