Chances are, if you’ve been using Home Assistant, you’ve came across Keymaster, which is an integration that lets you configure/sync door lock codes between multiple devices.

In fact, I’ve used Keymaster for years and it has been (mostly) rock solid!

However, the Keymaster integration creates tons of scripts, automations, and entities that really clutter up my pages. Don’t get my wrong – Keymaster is amazing, and it was my first foray into “smart home lock management”, but for my use case (just a couple locks at my home), I still consider it overkill. I don’t need to configure time slots for when the maid enters my house, or guest coming and going.

I just needed a simple way to:

  1. Configure PIN codes for multiple locks.
  2. Sync PIN codes between those locks.
  3. Configure notifications when a PIN was used (at any lock).

Thankfully, I came across Lock Code Manager, which does all of this, but without all the bloat.

In this guide, I’m going to show to how to install Lock Code Manager in Home Assistant. And at the end of the guide, I’ll include a separate guide on how you can configure notification events whenever a specific PIN code is used.

Let’s get started!


Hardware

For reference, I am using the following equipment. Any Z-Wave dongle or lock should work, but I’m including these just in case you are new to Home Assistant or new to the smart home world.

  • Home Assistant installed on a mini PC
  • Sonoff Z-Wave coordinator
  • Kwikset 620

You will also need HACS (Home Assistant Community Store) installed. There are a lot of guides out there walking you through how to set this up, but in case you don’t have it configured yet, here’s a tutorial.


Prerequisites

This step is optional, but if you have Keymaster installed already, I recommend deleting the integration and any leftover entities/scripts it might’ve left behind.

Also, take a Home Assistant backup first in case something goes wrong and you need to revert (Settings > System > Backups).


Install Lock Manager Integration in Home Assistant

  1. Click HACS from your sidebar, then click Integrations.
  2. Search for Lock Code Manager and download it.
  3. Reboot Home Assistant (Settings > System > Power button in top-right corner).

After rebooting, the integration is now available to configure.

Navigate to Settings > Devices & Services > Add Integration.

Give Lock Code Manager a name, and then choose your lock entities:

It will then ask if you want to configure via YAML or the UI. Choose UI.

Then, choose how many pin codes you’d like to setup. I wanted 3 (one for me, my girlfriend, and my son). You can always add more later. My Kwikset 620 z-wave locks support up to 250 lock codes, but since this is a brand new install – I am going to start from Slot 1 and set it to 3 slots.

Now, the next screen will ask you to set a name and a PIN code. I’m not linking my pin codes to a calendar, so I just skipped the calendar entity and Number of Uses.

I set 3 PIN codes, so I saw this screen 3 times.

Once complete, just assign them to an area if you’d like!


Adding Pin Code Management to a Dashboard

To add PIN codes to a dashboard, like the image below, then follow this section.

This might be useful if you have multiple Lock Code Manager integrations setup, as it puts those in their own view.

  1. Settings > Dashboards > Add Dashboards.
  2. New Dashboard from scratch
  3. Give it a title (Home Locks) and and an icon.

Once the dashboard has been created:

  1. Click the 3 dots in the top right.
  2. Raw configuration editor
  3. Paste in the code below.
strategy:
  type: custom:lock-code-manager
  include_code_slot_sensors: true

Once complete, it should look like this.


How to view PIN codes from the UI?

You might be thinking “This is awesome. But how can I actually view what codes I have set for a specific person? They are all ****’s!”

There’s a few ways.

Expand Code Slot Sensors

Open a Lock Entity

Settings > Devices > find your lock entity. The Diagnostic section will show configured PIN codes.


Wrapping Up

You have now successfully installed Lock Code Manager in Home Assistant! You can edit pin codes from the UI, add additional slots later on, and keep multiple locks in sync with the same pin.

And the best part is – you no longer have a ridiculous amount of Keymaster scripts cluttering things up.

If you’d like to get notified whenever someone someone uses a specific pin code, then follow my Lock Code Manager Notification script guide. This is a semi-complex setup, where you basically “listen” for whenever a certain pin code is used in the Developer Tools, and then using Trigger ID’s with an automation – you can get alerts from ANY door depending on what pin code is used. This is great to know who unlocked a door, and when -all in a single convenient automation.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *