How To Install Keymaster in Home Assistant

by Danny
11 comments

READING TIME: 6 MINUTES

In this guide, I’m going to show you how to install Keymaster, which is an addon for Home Assistant that lets you add new door programming codes to your z-wave locks.

Whenever you purchase a z-wave enabled lock, typically they come with default pins to unlock the door from the outside. To reset or change the code, you often have to go through a series of very specific button presses to add or reset codes.

Wouldn’t it be easier if you could simply add new pin codes from within Home Assistant? With the Keymaster integration in HA, you can!

Estimated setup time: 30 minutes

The instructions below will be for my zwave-js integration but should be very similar for openzwave or the deprecated zwave integration. I am using a Schlage BE469 zwave lock.

SCHLAGE BE469ZP CAM 716 SCHLAGE Connect Smart Deadbolt With Alarm Inbuilt Camelot Trim In Aged Bronze
  • Pair with a Z Wave smart home or security system like Samsung SmartThings or Ring Alarm to lock and unlock from anywhere
  • Hands free voice control requires Z Wave smart home system and compatible voice assistant; Alexa device (sold separately)
  • Easy to install with just a screwdriver; Unique Snap ‘n Stay technology snaps the deadbolt onto the door so both hands are free during installation

Preinstallation Steps: IMPORTANT!

Before I get started, here’s a link to the developer instructions. I’m expanding on those to make the guide even more user-friendly (including screenshots), but should you need to configure something I didn’t cover (such as child locks or notifications), then you’ll want to check it out.

The very thing you’ll need to do is add the below code to your configuration.yaml file (if it doesn’t already exist).

  1. Navigate to File Editor > Configuration.yaml. Add the code below.
homeassistant:
  packages: !include_dir_named packages

2. Then, create a packages directory in the same directory as your configuration.yaml file. To do this, just click the “New Folder” button and name it packages.


Step 1: Install HACS

The supported method of installing keymaster is using HACS, or the Home Assistant Community Store. If you don’t already have HACS installed, you’ll want to do that by following this guide. While you technically can do this manually, it’s recommended by the devs to use HACS for this particular integration.


Step 2: Install Keymaster Repository

Navigate to HACS > Explore & Add Repository. Search for “keymaster

Click through the default prompts to complete the install.

**You will need to reboot Home Assistant afterwards. (Supervisor > System > Reboot Host)


Step 3: Add keymaster Integration

Now that the required keymaster files have been added to Home Assistant via HACS, and you’ve restarted Home Assistant, you need to add the keymaster integration.

Navigate to Configuration > Integrations > Add Integration.

Search for ‘keymaster‘.

Note: You will need to install the integration for each lock you have. If you have a frontdoor and backdoor lock, you’ll set up two keymaster integrations.


Step 4: Configure Your Locks

A screen will pop up asking you to select your lock. The dropdown should select the correct entities, but if you have multiple locks just make sure to select the correct one. I have a separate door sensor on my front door, so I am also selecting that.

It should look something like this once filled out:

If completed successfully, you see a message like this:

To confirm everything is setup correctly, you should see a new directory for each door in <your config directory/packages/keymaster/>.


Step 5: Copy Lovelace Text from file

Navigate to the config/packages/keymaster/frontdoor/ directory (or whatever you named your door, if not frontdoor like I did).

Find the frontdoor_lovelace file.

Copy everything to clipboard by clicking the empty space > CTRL+A to highlight all, and then CTRL+C to copy.

Next, go to your Lovelace dashboard. Click the 3 dots > Edit Dashboard > Raw Configuration Editor. Scroll to the bottom and then paste the contents (CTRL+V). Then click Save.

This will now create a new “view”. You should see a lock icon at the very top of your lovelace dashboard like this:


Step 6: Install Additional Modules for Lovelace

For the lovelace ui to work correctly, there are a few additional items you need to download. The easiest way to do this is from HACS.

HACS > Frontend > Explore & Add Repositories.

Search for and add these 4. After clicking each, scroll to the bottom and click Install this repository in HACS.

  1. lovelace-auto-entities
  2. lovelace-card-tools
  3. lovelace-fold-entity-row
  4. numberbox-card

Step 7: Create New Lock Codes

If all goes well – you should now see several empty cards under your Lockscreen view. If you don’t see these cards, be sure to read over the troubleshooting steps to see if you missed anything.

There’s a lot you can configure here. You can set pin length, specify certain days or times that the door will lock, and much more.

For this example, I am creating a simple 4-digit lock pin. My card now looks like this:


Testing it Out!

The last step is to simply test it out!

During my testing, I successfully added 5 new lock codes. One for me, my daughter, my wife, and our parents.

If you change the lock code from an existing card, it deletes the old lock code (as expected) and only allows the new one to work.

I did notice that our old lock codes still work (the ones that we manually programmed into the lock). So, I just added those existing codes under each card for each member in my family. If I wanted to delete those, I believe I’d have to look at the instruction manual that came with my lock. Or, simply that that code to someone, let it synchronize, and then change it to something else.

I haven’t had a chance to test out some of the other features, such as day/time, notifications, or enforcing a pin limit, but I’m assuming those will work as expected also.


Wrapping Up

All in all, I am extremely happy with the keymaster integration. This was something I loved having in SmartThings, so I’m really happy to see an integration that works well in Home Assistant.

Hopefully this step by step guide helps you get it setup yourself!


My Favorite Home Assistant Devices

Below are some of the Home Assistant-compatible devices I personally use in my home. I highly recommend each of them.

The full list of all Home Assistant compatible & recommended devices I use can be found on my Equipment List page.

11 comments

You may also like

11 comments

Noah April 4, 2021 - 3:10 pm

Awesome guide – very helpful!

Reply
Danny April 4, 2021 - 4:13 pm

Happy to help! It was a fun project for me, and figured someone else out there could benefit from a step-by-step guide.

Reply
Edwin D Hall April 10, 2021 - 11:48 pm

Great instructions. Do you know how this interacts with alarmo?

Reply
Danny April 11, 2021 - 12:08 am

Thanks! I haven’t set up Alarmo yet, so I’m not sure what all can be done with it yet.

Reply
Ben Sims June 9, 2021 - 3:59 pm

Hi Danny, great job! I’ve followed another one of your guides, and it helped me solve an issue I was stuck on and couldn’t figure out from the developer’s documentation. I’m back again with another problem. I have 2 Z-Wave smart locks. I successfully set up the first one following your guide. However, I want the codes to synchronize between the locks. I can’t find a description of the “child locks” feature. Do you know if multiple lock synchronization is what the “child locks” feature is supposed to be used for? -Thanks, Ben

Reply
Danny June 9, 2021 - 6:00 pm

Thank you! I’m glad my guides could help you out.

Yes, you are correct – child locks are used to share lock PINS across multiple doors. I only have 1 zwave lock so I haven’t been able to test this out, but reading through this forum post might help you out if you search for “child lock”: https://community.home-assistant.io/t/keymaster-z-wave-lock-manager-and-scheduler/166419/1749

Reply
Nikos June 16, 2021 - 10:59 pm

Awesome documentation Danny; thank you!

I am fearly new with HA and I cannot figure out what went wrong.
HACS installed without issues.
Lovelace addons looks like they where installed ok.
Keymaster installed without any errors and created the Yaml under “/config/packages/keymaster/garage_outer_door/garage_outer_door_lovelace” but I am getting the error:
“This entity (“binary_sensor.pin_synched_garage_outer_door_1”) does not have a unique ID, therefore its settings cannot be managed from the UI.

The door is working perfectly for locking/unlocking from the HA.

Any thoughts?

Many Thanks,
Nikos

Reply
Danny June 16, 2021 - 11:49 pm

Test

Reply
Danny June 17, 2021 - 1:12 am

You’re welcome! I’m glad it helped you out. It sounds like you are almost there which is awesome.

The first thing I recommend trying is renaming the door without spaces (i.e. – GarageOuterDoor1 instead of Garage Outer Door 1. I didn’t run into that issue whenever I set mine up, but hopefully it’s as simple a fix as that.

Reply
yapishkahilt September 29, 2021 - 10:58 pm

This was very helpful. I have the same lock and while my initial attempt resulted in my successfully connecting to the lock, the PIN Status and Desired PIN State entities were missing and the codes wouldn’t update. I reset the lock, wiped all remnants of keymaster from HA, and followed your directions, and everything appears to be working.

Reply
Danny September 30, 2021 - 11:23 am

That’s great! I’m glad my guide helped you get your lock setup correctly.

Reply

Leave a Comment