Skip to content

Migrating from keymaster

raman325 edited this page Oct 17, 2026 · 5 revisions

Migrating from keymaster

A practical guide for switching from keymaster to Lock Code Manager. The two integrations cover the same problem space — keymaster's per-slot features all have an LCM equivalent — but the modelling differs in a few places, so this page walks through the swap step by step.

The biggest difference is what you configure. Keymaster gives you a fixed block of numbered slots and you fill them in. Lock Code Manager asks you to name a person, and picks the slot number itself by reading what the lock holds. Slot numbers still exist — locks are built around them — but you do not choose or maintain them.

Before you start: a few things to know

Migrate one lock at a time. Keymaster and LCM both write codes to the lock's slots, so if both have a config entry pointing at the same lock they'll fight each other. The steps below have you remove the keymaster entry for a lock before adding an LCM entry for it. You can keep keymaster installed for any other locks you haven't migrated yet — only the per-lock entries need to swap.

Keymaster leaves PINs on the lock — clear them before adding LCM users. When you remove a slot from keymaster (or remove the keymaster entry for a lock), keymaster stops managing the slot but does not clear the PIN from the physical lock. LCM never touches a code it didn't create: it places users only in free slots and leaves keymaster's codes where they are, still working. So:

  • If you want to keep the same PINs, clear keymaster's codes from the lock first, then add each person in LCM with their PIN. LCM writes its own copy in a free slot. Leaving keymaster's copy in place doesn't work: on a lock that can read its codes, LCM refuses a PIN that is already in another slot, and turns that user off with a Slot disabled repair.
  • If you start fresh with new PINs, still clear the old codes, or they keep opening the door.

Either way, clear them with your lock integration's clear-code service (e.g. zwave_js.clear_lock_usercode), the lock's keypad, or the lock codes card, which shows codes LCM doesn't manage and lets you clear them. You don't pick slot numbers in LCM, and you don't need to.

One thing LCM does that keymaster does not: removing a user clears their PIN from the lock. Keymaster leaves it programmed, which is how locks accumulate codes nobody can account for.

Feature mapping

Keymaster Lock Code Manager
Slot name The user's name — the thing you configure, and what every entity is named after
Slot pin The user's pin field
Slot enabled toggle Per-user switch.*_enabled entity
Slot notifications flag Slot Usage Notifier blueprint
accesslimit_count (uses-remaining) Slot Usage Limiter blueprint
accesslimit_date_range_start / _end Date Range Condition blueprint, attached as a condition entity
accesslimit_day_of_week (per-day + time window) A schedule helper attached as a condition entity (Using Condition Entities)
starting_code_slot + number_of_code_slots Nothing to configure — LCM allocates slot numbers by reading the lock, and each provider declares where its numbers stop
autolock_enabled + day/night minimums Auto Re-lock blueprint
Parent / child lock relationships (one primary, others bolted on) One LCM entry listing multiple lock.* entities as peers — no primary/secondary hierarchy
Auto-generated keymaster Lovelace dashboard LCM ships its own dashboard / view / section strategies — see UI Strategies
Akuvox, Schlage, Z-Wave providers Same — plus Matter, ZHA, Zigbee2MQTT, Z-Wave JS UI (MQTT), and Virtual

Step-by-step migration

Do this once per lock (or once per parent/child group, since those become one LCM entry). You can leave keymaster in place for any locks you haven't reached yet.

1. Inventory the keymaster slots on this lock

For each enabled slot, note:

  • Slot number
  • Name
  • PIN
  • Any access restrictions: date range, day-of-week + time window, use-count limit
  • Whether notifications was on

A screenshot of the keymaster dashboard for the lock is usually enough. If the lock is part of a parent/child group, capture all of them — they share slot definitions and become a single LCM entry.

2. Delete the keymaster config entry for this lock

Settings → Devices & Services → Keymaster → ⋯ → Delete for the lock you're migrating. (For a parent/child group, delete each entry.)

This is what frees the lock so LCM can take over. Keymaster won't clear the codes on the lock — they stay set — but it stops writing to the lock, which is the only way to avoid a tug-of-war once LCM starts syncing.

3. Clear keymaster's PINs from the lock

Use your lock integration's clear-code service (e.g. zwave_js.clear_lock_usercode for Z-Wave) or the lock's keypad to wipe the codes keymaster set. LCM won't clear or reuse them for you (see Before you start), and a person whose PIN is still in a keymaster slot can't be given the same PIN in LCM.

If you add this lock to an LCM entry that already has users, and the lock still holds codes in the slots those users hold, LCM refuses to add the lock until those slots are cleared.

4. Install Lock Code Manager (first lock only)

Follow the install section in the README — HACS, restart, then Settings → Devices & Services → Add Integration → Lock Code Manager. Skip this step on subsequent locks.

5. Add an LCM entry for the lock

In Add Integration → Lock Code Manager:

  • Give the entry a name and pick the lock entity (or entities — LCM accepts multiple).
  • Choose UI to enter users one at a time, or YAML to paste them all as one block (see Configuration Structure). You do not pick slot numbers: LCM reads the lock and allocates free ones, so they need not match keymaster's.

If keymaster used parent/child locks to broadcast one PIN to several locks, configure those locks in a single LCM entry instead of separate entries — LCM will sync each slot across all listed locks automatically. There's no primary/secondary distinction in LCM: every lock in the entry is treated as a peer and sees the same slot definitions, so the order you list them doesn't matter.

6. Add each person

Give each person you're bringing over a name and pin, with enabled on. That handles the always-on codes. Anyone you did not add during setup can be added later from the entry's page with Add user — one at a time, or several as a block — or with the add_user action.

7. Re-create access restrictions

For each slot that had keymaster restrictions, set up the matching LCM construct:

  • Day-of-week + time window (e.g. weekdays 9 AM – 5 PM): create a schedule helper with the window, then attach schedule.<name> as the person's condition entity. See Using Condition Entities.
  • Date range (e.g. guest staying Mar 12 – Mar 18): import the Date Range Condition blueprint, configure it, and attach the resulting binary_sensor as the person's condition entity.
  • Calendar-driven access (e.g. an Airbnb iCal feed): use a calendar entity directly as the condition entity, or use the Calendar Condition blueprint for richer filtering.
  • Use-count limit (e.g. PIN valid for 3 entries): import the Slot Usage Limiter blueprint. It turns off the person's enabled switch after the configured number of uses.
  • Per-person notifications: import the Slot Usage Notifier blueprint and target it at the person's credential used event entity.

For attaching condition entities through the UI rather than YAML, see the Condition Linker blueprint.

8. Re-create autolock (if you used it)

Keymaster's per-lock autolock with day/night minimums maps to the Auto Re-lock blueprint — one automation per lock, with optional separate delays for daytime vs. nighttime.

9. Set up the dashboard

Keymaster auto-generated a Lovelace dashboard per lock. LCM doesn't generate one automatically, but ships strategies that do the same job in a more composable way. See UI Strategies for the options (one-click dashboard, view strategy, or section strategy), and Custom Cards if you want to compose your own layout from LCM's building blocks.

10. Verify

For each slot:

  • Toggle enabled off and on — confirm the PIN is removed and re-set on the lock (watch the slot card or the lock integration's logs).
  • For slots with condition entities, force the condition off (e.g. end-time a schedule, expire a date range) and confirm the slot reports inactive and the PIN is cleared from the lock.

Repeat steps 1–3 and 5–10 for the next lock. Once every keymaster entry is gone you can uninstall keymaster from HACS, but there's no rush — it's harmless once it has no entries.

Provider notes

Provider Keymaster LCM
Z-Wave (zwave_js) ✅ ✅ — Z-Wave integration
Schlage (schlage) ✅ ✅ — Schlage integration
Akuvox (local_akuvox) ✅ ✅ — Akuvox integration
Matter ❌ ✅ — Matter integration
ZHA ❌ ✅ — ZHA integration
Zigbee2MQTT (MQTT) ❌ ✅ — Zigbee2MQTT integration
Z-Wave JS UI (MQTT) ❌ ✅ — Z-Wave JS UI (MQTT)
Virtual (testing) ❌ ✅ — Virtual integration

If you're on a provider keymaster supports, the move is transparent at the lock level — the same lock.* entity that keymaster was talking to is what LCM will use.

Things that don't translate

  • The auto-generated Lovelace dashboard — rebuild via UI Strategies (often a one-line YAML strategy reference covers the whole dashboard).
  • Keymaster's autolock entity model — replaced by the Auto Re-lock automation blueprint. Behaviour is equivalent for the common day/night case; nuanced setups may need a custom automation.
  • Keymaster's *.connected / *.code_slots entity naming — LCM exposes per-slot entities under its own naming scheme. Update any automations that referenced keymaster entity IDs.

Clone this wiki locally