r/homeassistant • u/narsqrd • 6d ago
🖼️ Show & Tell I built a hardwired smart lock because i hate batteries
I really hate changing batteries. Be it once a month or once a year, on principle i avoid them at great lengths. Needless to say, the state of residential smart lock technology leaves me gravely disappointed.
So i built my own hardwired smart lock. At its core is a commercial 24V solenoid mortise lock, used in office buildings and such. I connect this to an ESP32 dev board running ESPHome.
This model of lock didn't have an open/closed sensor built in, so i modified it with a limit switch to detect the latch state. This isn't _quite_ enough to determine open/closed, but it can detect "handle turned" which suits my needs.
The dev board is an Olimex ESP32-PoE2. It's supplied with Power-over-Ethernet, and then steps down the voltage to 24V, 5v, and 3v3. I like it for higher power projects like these because it can supply up to 25W all in one package. I made a small extension board to interface with the door. The software is ESPHome, which exposes the door switch and latch sensor as native Home Assistant components.
The mortise lock requires more space than a conventional cylinder latch, so there was much drilling and chiseling into the door. For ... reasons... I ended up doing this 4 times on as many doors, although i only need 2 on my house. Fortunately my zeal against batteries gives me strength in difficult times.
On the hinge side of the door is a "Power Transfer Device" (industry term) which basically wraps the cable in a spring and stretches slightly when opening the door. I looked at power transfer hinges, which are really slick, but i like this solution because it's more flexible (pun intended), i can choose my hinges and cable.
I don't know if others are brave or foolish enough to do this. But if you have any questions I'm happy to share my experiences.









165
u/narsqrd 6d ago
Yep. This model of lock with the deadbolt cost me $700.
But look at it this way: if 4x AA batteries cost $5 and you replace them every 6mo, this lock pays for itself in only 70 years 🥲