Skip to content

raman325/lock_code_manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

621 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lock Code Manager

Lock Code Manager is a Home Assistant integration that keeps PIN codes in sync across one or more locks, even across different lock providers (e.g. Z-Wave and Matter locks sharing the same codes). Define your codes once and Lock Code Manager handles setting, clearing, and monitoring them on every lock.

Features:

  • Synchronize PIN codes across multiple locks and providers
  • Automatic sync — codes are set and cleared as needed, with retry and drift detection
  • Condition entities control when a code is active:
    • calendar — active during events
    • binary_sensor / switch / input_boolean — active when on
    • schedule — active during scheduled times
  • Blueprints for usage limiting, calendar-driven PINs, and more
  • Dashboard cards for managing codes and viewing lock status

Supported lock integrations:

Integration Read PINs Push Updates Code Events Notes
Z-Wave Varies Yes Yes Some locks mask PINs
Matter No Yes Yes PINs write-only per spec
Schlage WiFi No No No Cloud-based, PINs masked
Akuvox¹ Yes No No Local API, polling-based
Virtual¹ Yes No No For testing only

¹ Custom integration required (Local Akuvox, hass-virtual)

Adding support for new lock integrations is straightforward — see the Adding a Provider guide. Contributors welcome!

Integrations That Cannot Currently Be Supported

Some lock integrations cannot currently be supported due to limitations in their underlying libraries. See the wiki for details.

Condition Entity Integrations Not Supported

Some condition entity integrations are not compatible. See the wiki for details.

Installation

The best way to install this integration is via HACS.

  1. Set up your locks in Home Assistant through a supported integration (Z-Wave, Matter, Schlage, etc.)
  2. Add this repository as a custom integration repository in HACS
  3. Go to Settings > Devices & Services > Add Integration
  4. Select Lock Code Manager
  5. Follow the prompts - additional information about the configuration options are available in the Wiki

Blueprints

Pre-built automations for common patterns:

  • Slot Usage Limiter — Disable a slot after a set number of uses Import Blueprint
  • Calendar PIN Setter — Extract and set PINs from calendar event attributes Import Blueprint
  • Calendar Condition — Control slot access based on calendar events Import Blueprint

See the wiki for detailed setup and configuration.

Learn More

Visit the Wiki for detailed documentation including configuration, troubleshooting, dashboard setup, and development guides.

UI & Dashboards

Lock Code Manager provides Lovelace strategies and custom cards for managing PINs. See the wiki for configuration options and setup guidance.

Inspiration

I spent some time contributing to keymaster, and what I learned working on it, and the regular complaints users had about it generating too many automations, entities, etc. led me to take a different approach. This isn't a knock on keymaster, unfortunately a lot of what is built in this integration wasn't possible for most of keymaster's life. I briefly considered implementing this into keymaster but:

  1. keymaster is still a great solution that works as is.
  2. keymaster is surprisingly simple under the hood because it makes Home Assistant do a lot of the heavy lifting for figuring out when to enable and disable a usercode. This integration, on the other hand, attempts to do all of the heavy lifting internally in code, which means it will generate less entities and automations but it is likely more fragile to changes in HA Core or even changes in the codebase.
  3. It would be impossible to seamlessly migrate users from the current implementation of keymaster to this integration's implementation. Rewriting keymaster to do this would have been the equivalent of creating a new integration anyway.

Thanks

A big thank you to the other keymaster maintainers:

  • @FutureTense
  • @firstof9

As well as the person who created the base concept that keymaster evolved from: @ptdalen

About

Lock code manager for locks integrated with Home Assistant

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors