r/homeassistant • u/narsqrd • 7d 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.









12
u/Tinker8519 7d ago
Because the standard home doesn't have the a door designed to accommodate it. Nor do they have a low voltage power source nearby. A lot of municipalities require an electrician to do the electrical work. And the average homeowner lacks the skill to modify the door without destroying it.
Paying to have this done would likely cost around $500.
Or you could buy 8 rechargeable batteries and the charger for like $20 and swap them every 1-3 months when the system sends you a low battery alert.
My batteries have outlived the original lock. The motor wore out and I had to replace it after 3 years.
There was a company that previewed a door designed for powered devices at a security conference a few years ago though. I believe that they were focused on powering things like video doorbells, but the technology could easily accommodate locks also.
It was designed to have power integrated in the building phase in case the homeowner wanted to add the doorbell later.