KeyMaster Z-Wave lock manager and scheduler

I guess its time to give up banging my head against the wall and ask for help. I have been trying 2 days to get one of two identical Schlage Camelot ZWave locks working with Keymaster.

Long story short I am transitioning to HA from Smartthings. I have over 100 devices in ST currently.

One of my big concerns was the lock management so the first thing I did was exclude my back door lock from ST and pair with HA. It was the only device I attached initially. At the time I was using the stock “out of the box” zwave JS and supervisor.

I find the older I get the more I need to question my memory but I am more than reasonably sure that after I got the lock paired as the only device I got it working in keymaster and syncing codes. As I recall the only issue I had was missing entities in the dashboard that worked after a reboot.

I added about a dozen devices maybe 4 or 5 zwave and the rest zigbee and all was great. Along came the update to zwave js that I posted about in zwave config sub forum and nothing would join. That is relevant because I next tried to add the front door lock and no joy. That is when I found out nothing zwave would join anymore.

Not yet knowing this was due to the update to zwave JS I tried to get visibility in to zwave and saw I had none. At that point I blew away the entire Raspberry Pi and started over. This time I went with zwave js to mqtt version of zwave control and used zwave-JS without the built- in supervisor. I liked it because of all the functions/features it had over the default and in particular because it had the “Factory reset” of the controller as well as backup capability. I factory reset the controller and proceeded with no good luck. I then put everything back on ST and used the “RBoy” lock manager I have in there to set codes on both door locks with no issues.

The next day I learned that the zwave JS I updated was the culprit and got the newest version of that before pairing devices again. I started with the front lock this time and got keymaster set up and added codes without issue. I added a few other zwave devices, switches and the like then moved to the back door lock. I had a hard time pairing it as it did not always fully interview properly. I put in new batteries and tried again with consistent success pairing now. It is at this point that I added another keymaster integration but it will not ever say “connected” on the codes. Only “Adding” or “Deleting”. I want to say my memory was that the first time around when I paired it I got the “Adding” message but the code worked and eventually it switched to “Connected”. This time around it never gets the code, never says connected. I have tried unsuccessfully for hour to fix this. it is now device 45 from where I started at 19 with the back door lock in zwave manager. That is how many times I have re-paired it trying to figure this out :frowning:

I have removed the front lock keymaster and excluded both locks, added just the back one and added keymaster. I can’t even guess how many times I have restarted and even power cycled after install/uninstall of keymaster but nothing works.

So… help. Where do I look now? Where do I go from here? I know its not the lock because it sets codes in ST just not HA with keymaster.

Looking up now I guess I should have said “Long story Long” sorry for the book its been a long 2 days and late nights on this.

Here are a couple of other data points on this. Here is the dashboard for the lock codes:

I note when I toggle a code from off to on or vice versa the automations does run for code synchronization. Even if I trigger them manually they don’t get updated/added in the dashboard or on the lock itself. I see nothing in the zwave js to mqtt or zwave js logs at the time I trigger a change either ?!

The code you enter cannot be already entered into the lock.

1 Like

I have “factory reset” the lock multiple times now. The default code length drops to 4 and there are no codes in it anymore when I do that. One thing of note is my codes are 8 characters long and I usually reset the lock and then enter the programming code and change the length to 8 before pairing it with HA and then installing keymaster. One time I forgot to do the length change to 8 first before installing the keymaster integration and I swear I saw the first two codes showed connected even though the code length was the default 4? The other 2 codes were showing adding.

This bring up another question. I delete keymaster every time. I often have to remove entities from it even after a reboot.

When I reinstall keymaster using the same “name” during the deployment as last time I can delete and re-make the dashboard for it copying in the code from the locks lovelace file and it still shows the 4 or 5 codes I have configured with the correct name at least in the field, I can read the passcode. Where do I go to clear that? I can confirm that when I remove the keymaster integration the packages/keymaster/lockname paths are gone afterwards.

On my front door lock the codes were in it from ST, no reset. I can toggle them on/off all day and they show connected or deleted and it tests out to be so. I did not always reset the lock and expected to behave the same as the front door lock but have reset at least 6 times now.

Others have tried firing the code_slot_sync script manually with success.

I have done that but see no activity in the logs? Where do I look for it to see that its doing something?

Homeassistant Core, zwave js to mqtt and zwave JS logs don’t show activity corresponding to the script launch when I do it manually.

Does the code in the pin field match what zwavejs2mqtt shows under your usercode slot?

Im not sure where to look for the zwavejs2mqtt usercode slot?

You’d look where it says User Code:

image

So you actually meant in the device I see, I thought it was some kind of entity in HA.

I don’t have a User Code V anything on the one that doesnt work:

Front Door that works Values:

Back Door that doesnt work Values:

This is what is under that vundefined on the back door:

Even more fascinating to me is that I dont even have a “code length” entry anywhere for the one that works?!

No User Code Command Class means you can’t set codes, re-interview your lock.

1 Like

I just set that off but TBH I can’t tell you how many times I have tried that before today. I’m grateful!
for your help and am at least glad to be finding the root cause.

While writing this the interview completed (I think) and now the list looks different:

I find myself wondering if I can pull the firmware from the working one and flash it to the broken one? I don’t see a way to get Schlage firmwares online. They do report the same version number

What you’re showing looks very much like a signal issue, is your zwave usb stick on a USB extension cable at all?

4 Interviews in and I have a UserCode 0 entry and I was able to set a code but the device ID still shows undefined.

I will keep trying but will give up if I can’t get the ID after a whlie, I have a few hours before I need to go home from work. LOL

Thanks to you firstof9, without your guidance on where to look I would not have know to “keep trying” until I got a usercode value.

Really puzzling why its working this way but whatever I guess

Not wishing to dwell on this a huge amount but I did just unearth this:

https://github.com/zwave-js/zwavejs2mqtt/issues/347#issuecomment-772848655

FYI Allegion BE469 is exactly what I have 2 of.

I spent a number or hours last night trying to work through this and these are the results:

Taking the problem lock off the back door and moving it closer to the hub got a more consistent result while pairing. More often than not I would see the UserCode Value. It was definitely not 100% though so I did most of my testing with it sitting on the couch next to me.

firstof9, you stated above that I needed to clear the lock codes before using keymaster so I tried that again by factory resetting the lock that was always working and the results were interesting.

When I said that I first paired it up with the codes in it from ST and it worked I think I now understand why. For some reason when I wiped the lock, the first instance of setting a code on any of the 1-6 code slots I provisioned in keymaster it would get stuck on “Adding” eternally. Armed with the knowledge you provided above I was able to review the value for usercodes and see two fields per code. One was an “Available/Enabled” field and the other was for the code itself. There is a pair of these fields per code. The enabled field was set to (0)Available but the code field was populated. If I changed the enablement field to (1)Enabled and clicked the “Submit” arrow the code would get set and keymaster showed the code as Connected instead of Adding. Here is an image of that:

From that point on I could disable/enable that same code at will and it worked. Disabled, the key no longer worked, enabled it did work and the Connected/Disconnected text toggled accordingly in keymaster as well. I had to do this one time for all 6 slots and then they all worked thereafter. This applied to BOTH locks. Writing this up now it occurs to me that I did not try to change the code and enable that so will do that when I get home tonight.

I was able to set up the front door lock as a parent to the back door lock and it all works enabling/disabling from the parent. Overall in good shape now but there does appear to be an issue with my locks at least initially. After returning the lock to the back door codes synchronized without issue.

Update I tried setting a new code on slot 5 and the lock that worked kept the enablement slot at available and the back door lock set up correctly ?! I guess I will be examining the code slots any time I make a change.

I hope this helps someone else.

2 Likes
  • Exclude the lock, and factory reset it.
  • Delete all KeyMaster integrations
  • Reboot HA
  • Include the lock
  • Add then configure KeyMaster integration

This is what I have to do whenever I have problems. I don’t know why it works, but it does. And I wrote the stupid thing.

1 Like

I followed the install instructions, and I ended up with this screen. I’ve uninstalled, and reinstalled, and keep getting the same thing. What am I doing wrong?

Seems you missed a step.