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.
- Pair with a Z Wave smart home or security system like Samsung SmartThings or Ring Alarm to lock and unlock from anywhere.Note: Measure your door's backset, cross bore and thickness to ensure you find...
- Hands free voice control requires Z Wave smart home system and compatible voice assistant; Alexa device (sold separately)
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).
- 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.
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.
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.
- Zwave/Zigbee hub: Nortek GoControl HUSBZB-1
- Smart Plugs: Sonoff S31 Lite Zigbee
- Motion Sensors: Hue Indoor Motion
- Outdoor Camera: Amcrest IP5M Turret
- Robot Vacuum: Roborock S7
The full list of all Home Assistant compatible & recommended devices I use can be found on my Equipment List page.