Keymaster but less "sprawly"?

I’ve got 3 z-wave locks, and I’d like to manage the codes on them.

I understand that keymaster is the “normal way” to do this… but I am wondering if I am missing some other simpler alternative.

Keymaster seems very “sprawly”. I.e., it made a lot of entities which overwhelmed my google assistant integration, it filled my auto-generated dashboard with stuff, and filled my automations tab, etc… And at the end of the day, it seems that it isn’t actually syncing the codes reliably.

Is there any alternative that is a little more contained?

Overall, I have been very happy about switching from smartthings to HA, but this is the only aspect I have found where I prefered the ST experience. I am really hoping there is another path.

Any advice?

With the help of various forum posts, I was able to cludge together as simplified way to do this.

Here is my Dashboard card to control it:

type: entities
entities:
  - entity: input_select.lock_code_slot
  - entity: input_number.lock_code
  - entity: script.set_lock_code
  - entity: script.delete_lock_code
title: Back Door Lock Codes

where,

input_select.lock_code_slot is a drop down helper:

input_number.lock_code is a number helper:

script.set_lock_code is:

script.delete_lock_code:

You’ll have to edit those scripts according to your lock details, but hopefully this can point you in the right direction!

3 Likes

Thanks!
This was EXACTLY what I needed.
It does exactly what I needed and taught me a lot on the way.
I really appreciate it!

1 Like

So this can replace all the helpers and scripts???

Well, no. It does not have all the functionality of keymaster, and that’s okay for me.
If you can also get away with something simpler, then this is the WTG.

@brad.trout This is inspiration! I want to do this with my Schlage Z-wave locks. I am very new to HA. The problem I am having when I try this is that I don’t know how to reference the lock code slot, and in general any entities that HA does not already offer me. I can see the slots and door codes when I open the lock in Z-Wave JS and open the device. (see screen shot) how do I reference these attributes in my dashboard card? Thank you!

If I am understanding your question correctly, I think what you are looking for is that you need to create these as Helpers (Settings >> Devices & Services >> Helpers). Here is the “Type” you need to create for each:

1 Like

Thank you Brad. Re-reading your post see you labeled these helpers with the entity ids that appear in your scripts. I was able to create the helpers. I am curious though where your screen shot is from that shows the helpers in your post? I have found the reference to the methods of zwave_js.js that you use but my question is how do I get the existing lock codes? zwave_js.js does not have a method for that.

I’m sorry, but I haven’t worked with this for so long, that I am forgetting most of it. But, if you are looking for parameters for the lock, you can try this site: Z-Wave JS Config DB Browser (zwave-js.io)

1 Like

The solution by @brad.trout worked great for me with Schlage Connect Z-wave+ locks! Here is a screenshot for those wondering what the dashboard card looks like.

Brief usage:

  1. Set the code slot you want to set or delete.
  2. To set a code at that slot, overriding its current value, select a value on the Lock Code slider, then hit RUN next to Lock Code Set.
    To delete whatever code is at that slot (not necessarily what is shown on Lock Code slider), hit RUN next to Lock Code Delete.

As noted by @mchammer, this solution does NOT allow reading current codes, so when you select a slot in the dropdown it has no effect on the Lock Code slider value. I suspect reading current codes cannot be done via Z-wave as a security precaution, but haven’t seen any documentation to confirm.

1 Like

@mr_roboto Thanks for sharing your progress! If you read this post here:

You can read how to get the current codes. So it is possible, but not trivial. I have not had time to come back to z-wave and the locks so I have not tried it. I am still working on my Bluetooth shutter motor controls and getting them were I want them to be. (more importantly where the wife wants them to be :slight_smile: )

1 Like

Ahhh, now that you mention it I see the codes are exposed under Users for each device in the JS Z-wave UI. Reading the post you linked, I can see now why Keymaster might create so many dummy entities / scripts / etc. to work around the limitations of the JS Z-wave UI integration.

Given how cumbersome it is, I think the best solution is to update the Z-wave JS integration with a service like zwave_js.get_lock_usercode. I created a feature request, may implement it myself depending on feedback: Z-wave JS: Get Lock Usercode

Similarly I think a Lock Codes card like the one @brad.trout made should be included with the Z-wave JS integration to avoid everyone reinventing the wheel for use cases too simple to warrant Keymaster. Even better would be if the card could be in HA proper to support multiple protocols at once (not just Z-wave, but Zigbee, matter, etc. as their integrations add lock support), but I think a Zwave JS card would be a fine start.

1 Like

FWIW, this is pretty awesome

Brilliant! I did not think of making a feature request but totally makes sense. Especially now that JS-Zwave is part of HA and the person responsible is a full time employee.