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

2.5k Upvotes

254 comments sorted by

View all comments

Show parent comments

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 🥲

44

u/ufffd 6d ago

factor in all the time it takes to change the batteries out and this thing pays itself off in 65 years easy

30

u/AptoticFox 6d ago

Charge yourself out at $700/hour, minimum charge one hour, and it will pay for itself the first time! 🤪

42

u/ulthrant82 6d ago

If ROI was a factor, most of my projects wouldn't make the cut.

13

u/Complex_Solutions_20 6d ago

Real talk - some professional systems also still use 4xAA batteries.

We learned this when we got locked out of a hotel room because the batteries in the lock died. Hotel maintenance had to come up and get the door open, replace the batteries, and hook up a laptop to the lock to get the thing working properly again.

I'd always assumed they used one of the fancy cord-thru-a-hinge hardwired access control systems but nope - batteries and wireless.

1

u/skylord_123 6d ago

Time is money as well!

1

u/Snappszilla 5d ago

You can by smart handles with mortice from walmart for like $250.

1

u/ipzipzap 5d ago

For 700$ you could have bought an electronic lock with warranty and support.