Use a SwitchBot Keypad without buying the SwitchBot Lock (ESP32 + ESPHome)
The SwitchBot Keypad is kind of useless on its own — it only works if you also
buy a SwitchBot Lock, because the keypad just talks to the lock over Bluetooth.
I wanted to use the keypad as a local access controller for Home Assistant
without buying the lock, so I built a workaround.
It's an ESPHome external component that makes a plain ESP32 impersonate a
SwitchBot Lock over BLE. A real keypad pairs to it and sends its normal
encrypted lock/unlock frames; the ESP32 decrypts them and passes them to Home
Assistant as events. The keypad has no idea it isn't talking to a real lock.
The nice part is that every unlock event tells you how it was unlocked (PIN,
fingerprint or face) and which credential slot was used, so you can build
per-user automations — a different notification or action depending on who's
at the door.
Pairing is done through a small web UI hosted on the ESP32 itself: you sign in
to your SwitchBot account, pick the keypad from the list, and it does the BLE
pairing for you. No Python scripts, no laptop, no sniffing. After that it runs
fully local — just BLE and Home Assistant, no cloud. The AES key is generated
on the device and never ends up in your YAML or git.
I've tested it with the Keypad Touch and the Keypad Vision. The original Keypad
and the Vision Pro should work too since they use the same protocols, but I
haven't been able to verify them — would love reports from anyone with those.
Repo with the ESPHome config and setup instructions:
https://github.com/pierluigizagaria/switchbot-keypad-bridge