Skip to content

Migrating from keymaster

raman325 edited this page May 11, 2026 · 2 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.

Before you start: a few things to know

Migrate one lock at a time. Keymaster and LCM both actively sync slots against the lock and run drift detection, 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. 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. That gives you two easy paths once the keymaster entry is gone:

  • Reuse the slots. Configure LCM with the same slot numbers and PINs. LCM will re-sync those slots and pick up where keymaster left off — no cleanup needed.
  • Start fresh. Clear the codes from the lock (via your lock integration's clear-code service or the lock's keypad), then configure LCM however you want.

Either way works — pick whichever fits how you want your slots laid out going forward.

Feature mapping

Keymaster Lock Code Manager
Slot name Slot name field
Slot pin Slot pin field
Slot enabled toggle Per-slot 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 Any slot numbers you choose, configured in the LCM entry
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, 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 its drift-detection coordinator stops, which is the only way to avoid a tug-of-war once LCM starts syncing.

3. (Optional) Clear stale PINs from the lock

Skip this if you plan to reuse the same slot numbers in LCM — LCM will re-sync them on first run. Otherwise, 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 previously set.

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:

  • Pick the lock entity (or entities — LCM accepts multiple).
  • Set the slot range you want to manage. Slot numbers don't need to match keymaster's; LCM lets you start at any slot the lock supports.

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. Configure each slot

In the LCM entry's options, fill in name and pin for each slot you're bringing over and toggle enabled on. That handles the always-on slots.

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 slot'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 for the slot, and attach the resulting binary_sensor as the slot'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 disables the slot's enabled switch after the configured number of uses.
  • Per-slot notifications: import the Slot Usage Notifier blueprint and target it at the slot's 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.

Cleaning up non-overlapping slots

If you mapped a keymaster slot range onto a different LCM slot range (say keymaster managed 1–10 and you configured LCM for 11–20), the original 1–10 slots still have their old PINs on the lock. Either:

  • Clear them using your lock integration's clear-code service or the lock's keypad, or
  • Add slots 1–10 to LCM and leave enabled off — LCM will clear them on the next sync.

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
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