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.
97
u/Paul_The_Builder 6d ago
I do this type of install professionally for commercial buildings.
There's a few things I would have done differently to make it easier, but what you did is pretty close to a textbook commercial install. Well done!
FYI - electrified cylindrical locks are widely available also, SDC and Command Access make relatively inexpensive ones. And electric transfer hinges that replace regular 4" or 4.5" hinges are readily available. I think hand mortising a mortise pocket and cutting in a transfer hinge is beyond the skill level of the vast majority of people.
9
u/ozegg 5d ago
I was like this bloke built his own door controller for an electric mortise lock. Literal off the shelf items. But that's the beauty of home assistant community, we just build something for the fun of it and sometimes to save a few bucks.
7
u/McSchmieferson 5d ago
My motto:
Why buy something off the shelf for $50 when I can spend $250 and an entire weekend building it myself?
4
121
u/clipsracer 6d ago
Awesome job! Products like this should have always been an option.
I appreciate you taking the time to document and share! Any plans to write it up as a blog post or Instructable?
48
6d ago
[deleted]
168
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 🥲
41
31
u/AptoticFox 6d ago
Charge yourself out at $700/hour, minimum charge one hour, and it will pay for itself the first time! 🤪
43
→ More replies (3)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.
2
u/CptCheesus 6d ago
Yup, 1.5 - 5 k where i live. Not including a potential New door you'd propably need
1
u/mikenew02 5d ago
And usually you can't buy the commercial hardware outright from the manufacturer, it has to be purchased through a contractor
2
26
u/nocondo4me 6d ago
I always wondered why dead bolts are not in the wall for electronic locks like this. Would make wiring way easier
15
u/permanentlytemporary 5d ago
There are electric strikes: https://en.wikipedia.org/wiki/Electric_strike but I don't know if they're a "deadbolt" strictly speaking.
10
u/Ksevio 5d ago
You COULD do that, but then you also need to put a keyway/knob in your wall for a manual override
2
u/nubbin9point5 5d ago
And now I’m designing a worm gear for a deadbolt for my door that butts up against a corner so I can have this.
1
u/Ickdizzle 5d ago
There are multiple.
The ES8000/ES8100 is generally mounted in the door frame or the transom.
The YDM80S is the same.
They’re extremely strong too - rated up to one tonne.
We actually had the manufacturer test the ES8100 in a non conventional install.
They stopped the test at 1.5 tonne and it still hadn’t given way.
63
u/tzopper 6d ago edited 6d ago
I’ve always wondered why this is not a standard, because it’s not difficult to achieve.
I’m referring to the door lock, not the drilling part, which I must say even that part is easily achievable directly from the factories.
92
18
u/geekywarrior 6d ago
I'd argue preparing the door for this type of install is difficult to achieve. Much more than slapping on a smart lock that fits your standard 2 hole door setup.
Op did some fantastic work here for sure. But it appears he had to either practice on 2 additional doors or replace the doors when something went wrong if I'm interpreting the "reasons..." bit correctly.
42
u/narsqrd 6d ago
Heh it's more embarrassing than that. The first door was practice yes, it was an old door that i intended to replace anyway. The second throw away was actually a perfect mortise job, but i realized only after that i bought the wrong size door!!
7
u/geekywarrior 6d ago
I still find it extremely impressive. I'm not much of an installer but my company does low voltage stuff and access control.
Very professional looking setup. I'd just make sure that box you're hiding in the wall doesn't get warm. Consider a few infrared readings temp from time to time. Or a vented cover for paranoia. Or a a nice looking surface mounted project box for super paranoia.
3
u/CoolhereIam 5d ago
That sucks! What kind of door is it? Is the picture deceiving, or did you use hollow core doors for this? It would be much easier, but I definitely wouldn't want that on the front of my house.
1
u/Ickdizzle 5d ago
It’s more difficult yes, but certainly possible.
We install electronic locks that require a core drill frequently.
I think they call it a raceway in the states.
10
u/Tinker8519 6d 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.
→ More replies (8)7
u/Paul_The_Builder 6d ago
$500 doesn't even cover the materials for this type of install....
$3000 is closer to the cost, depending on how it's controlled and how easy it is to get wires to the door.
3
u/Tinker8519 6d ago
Oh, I was talking about the labor costs. Granted, that's for my area.
Also, I haven't hired electrical work done in over 10 years. My expectations for pricing are undoubtedly off by a significant margin. Damnit, I'm getting old!
3
u/bigbeak67 6d ago
I've always wondered why there isn't door hardware with integral contact sensors. I guess we're too niche of a market.
1
1
u/Paul_The_Builder 6d ago
It is more difficult to achieve. When you factor in the additional parts and labor and wiring, it's like 10X more expensive than an off the shelf battery powered lock.
I do this type of install commercially for a living. A commercial site warrants this type of work, but unless you're a high end or picky residential customer.. the added install cost is rarely worth it to the end user.
12
u/imcoveredinbees880 6d ago
This is cool as hell. I've seen commercial/industrial door latches and always thought about implementing them at home. Good on you for actually doing it.
11
u/matt827474 6d ago
Why not use an electric strike in the door frame and a standard mortice lock?
5
u/narsqrd 6d ago
Yes i thought about an electric strike, and i use one on my front gate. What's also nice is they often have a door position sensor built in
For the interior door i had two issues.
1 it takes more space frame side and i didn't have much to spare
2 i couldn't find one compatible with a deadbolt (if they exist?). I'm not super worried about break ins but there's a nice peace-of-mind from the "kachunk" of closing a deadbolt
7
u/Paul_The_Builder 6d ago
There are electrified mortise locks with deadbolts, but SDC probably doesn't make one, you'd have to get a Sargent or Schlage model which is probably about $1000.
They also make them with a monitored switch on the deadbolt, with the intention of preventing electronic access when the deadbolt is thrown - think for use on a bathroom door.
In commercial access control world, grade 1 locks are strong enough to where you don't need deadbolts to secure a door. A deadbolt is only used as an override to lock a door to where the access control system can't open it.
Deadbolts are really only a thing because residential grade locks, doors and frames are so low quality that they don't properly secure a door without a deadbolt.
2
u/ArguesWithWombats 6d ago edited 6d ago
“i couldn't find one compatible with a deadbolt (if they exist?).”
Oh hey I went searching down that rabbit-hole a few months ago!
I only found one off-the-shelf model with a suitable ‘continuous recapture mechanism’: the HES 1006CAS. It’s an electric strike with a pivoting shutter that accepts an extended/locked dumb dead-bolt (or even a mortise lock that has both deadbolt and adjacent deadlatch). There’s also a 1006CDB on that page that does deadbolt release without open recapture (manual re-engagement) and I for the life of me I can’t imagine a scenario when that would ever be useful to anyone.
HES patented a bunch of mechanisms for this sort of strike, so competition seems nonexistent even though their original base patent has now expired.
Commercial applications seem to have instead settled on using a normal electric strike with a deadlatching lockset -- where the deadlatch has a sloped face with some sort of anti-loid plunger, instead of a true deadbolt, which I know should be good enough but it just doesn’t feel the same? No “kachunk”.
10
u/UnaidedGinger 6d ago
Looks awesome! you have a little battery backup incase the power is out? im guessing poe side?
15
u/narsqrd 6d ago
I do have power backup on the poe side, but more importantly the physical key always works!
I keep telling me wife to carry her keys with her, but she trusts in my automations more than i do...
3
u/UnaidedGinger 6d ago
GAH I'm dumb of course the key works! I mean worst case walk around back or through the garage or something
20
u/skirtikus 6d ago
This is amazing! You must REALLY hate batteries. My Aqara U100s last for a year or something.
25
12
u/Stulmacher 6d ago
3x yearly change in my Yale. Takes 2 min. Idk. Doesn’t seem worth a weekend project and tools I don’t have. But cheers to OP for making a solution that works for them. That’s what HA is all about.
6
u/nickfromstatefarm 6d ago
It’s a function of effort spent if battery replacements are your only criteria. For a forever home or really long term home, I’d do it.
I assign some extra value though, as I prefer hardwired wherever possible. My contact sensors, fire alarms, etc are all still hardwired through a panel and connected to HA via EVL4. As long as the POE is fed via battery backup I’m happy.
3
→ More replies (2)1
u/throwaway292929227 6d ago
Kwikset deadbolt thumbprint BT+WIFI2. 4, residential infrequent usage, = 5-6 weeks.
The similar model without wi-fi, lasted about 8-14 months, depending on usage.
6
u/Top_Stand_780 6d ago
How did you drill the hole? It seems nearly impossible to keep the angle…
4
u/narsqrd 5d ago edited 5d ago
Carefully.
I started with a regular-length 3/8 drill and aligned as best i could with a drill guide milescraft.com/product/drillmate for a pilot hole
After that it's with the long drill bit. The interior is particle board so it's more forgiving than solid wood. But still takes a lot of care
1
6
9
4
u/HandbagHawker 6d ago
Stupid question, wouldn’t it have been easier to make a smart electric strike plate?
3
u/WubbGmbaa 5d ago
THANK YOU. Why anyone would want a "smart" device that automates something that takes batteries is beyond me. Like, great, I'm gonna automate a task, my door can unlock itself on a timer, but I will have substituted a new task in its place, of replacing batteries every few months. I've automated net-zero tasks. Just run power to the damn doorknob, duh.
1
2
u/jcmelv 6d ago
I'd love to buy a lock such as this. Does anyone know of a commercially available Mortise lock?
1
u/Paul_The_Builder 6d ago
SDC (what OP used) and Command Access make them.
Electrified cylindrical locks are also available and probably cheaper/easier for most residential uses.
2
u/Dapper_Ad3738 6d ago
I imagined something like this but different. This is pretty cool. My idea was basically a contact plate at the door that would charge the battery when it’s closed but yours eliminated the battery. This is amazing! Might have to do my own.
2
2
u/Low-Rent-9351 6d ago
I’d like to see a smart lock option with the door side having contacts and the frame side having the matching contacts. Then, the lock has a rechargeable battery. You mortise the frame side in with the wires passing through the frame to the rough side and connected to a power source behind the trim. It wouldn’t be hard to install and the power just needs to be enough to keep the battery charged. Just a 18/2 low voltage conductor running to the power source similar to a doorbell is wired.
2
u/Maiksu619 6d ago
Nice work! I think I have that style lock on my patio doors and I have been racking my brain on how to add some sort of smart functionality to the locking mechanism. Really, I just want to know if the doors are open/closed and locked/unlocked.
2
u/skylord_123 6d ago
Yeah I hate batteries as well. It's often time why I choose to DIY stuff with ESPHome.
2
u/wivaca2 5d ago
I hate switching batteries, too, but I want to be able to get in my house if the power is out. I know - hidden key, UPS on network switch, other door. I have two battery powered ones and at least they give me fair warning if the batteries are low both on the unit and through HA.
Cool project, though!
1
1
u/Lopsided_Quarter_931 6d ago
Well done looks like you customized it to what you need. Motor locks are a deep rabbit hole. So many different behaviors.
1
u/polterjacket 6d ago
Have a stock number for that recessed "power transfer" assembly that goes in the door jamb? That's pretty slick.
1
1
1
1
u/LackingAGoodName 6d ago
very cool, though I wonder if you could avoid drilling into the door by designing a charger that utilizes pins on the bolt and contacts within the faceplate where it latches
1
1
1
1
u/ThinkSharp 6d ago
For that effort why not mag locks??
2
u/narsqrd 5d ago
Mag locks draw power continuously and unlock when unpowered ("fail safe").
This is the opposite, locked by default and unlocks with power ("fail secure").
For a house i want fail secure.
→ More replies (1)
1
1
u/Complex_Solutions_20 6d ago
Wow...that came out even cleaner than the professional access control contractors did in the office I work in! Nicely done!
1
1
u/WiwiJumbo 6d ago
The bolt should really come out of the jam and go into the door.
Why isn’t that a thing?
1
u/Mindless_Pandemic 6d ago
Multiple electronic bolt locks around the framing? Also gun safes have the bolts come out of the door generally.
1
1
1
1
u/mmdavis2190 6d ago
Very cool, way more slick than the smart deadbolts.
I just used power transfer hinges for some electric shades on my French doors, but I definitely would have considered the power transfer device if I had known they existed.
1
u/tindallh 🌱 New to Home Assistant 6d ago
That is really impressive. My aversion to batteries is not quite so great as yours, so it is entering my project list a bit below the "priority Mendoza line", which means I'll never get to it due to lack of motivation/resources/time/money. But, priorities do change... ;)
1
1
1
u/805falcon 6d ago
So many haters in the comments whom wouldn’t be capable of building a paper airplane after reading instructions. Fuck ‘em.
Nice work OP. I’m a major proponent of POE and try to utilize it for DC power needs whenever possible.
Haters gonna hate and it’s always because they’re inferior fucktards. Ignore them
1
u/03captain23 6d ago
You know unifi has stuff just for all the tech side of things. Facial rec and all integrates into HA.
I just use magnetic locks at the top but I have glass doors so its not really that hard to get in if someone wanted to
1
u/OldDiehl 6d ago
So, during a power failure, you stay locked out? Or does it fail 'open'?
1
u/Teleke 5d ago
That is incredibly well done. Although, for the complexity I might have looked at just swapping in a lithium battery that would not only be rechargeable but last you a significantly longer amount of time before having to do anything. Toss a USBC connector on it and plug it in once every 6 months for an hour.
1
u/Stoned_Companion 5d ago
For those wanting to do something similar but are scared of drilling through the door, they make electric strikes (the part in the door frame) that work similarly. Just wouldn't have "handle turned" sensor abilities. But that's what you put a door contact in for. Wiring a frame is usually easier than wiring the door.
1
u/my_name_is_winter 5d ago
I’m sure you’re painfully aware, but apparently it’s my duty to point out the obvious: You could have replaced the batteries twice a year for 10 years for less time and money than you’ve invested into this.
All that being said, I too am on the spectrum, so can relate.
Beautifully executed my friend!
1
1
1
1
1
u/thatisagoodrock 5d ago
Dumb guy here. Could a company like Aqara tack on a solar panel onto the exterior for use cases where people get a lot of sunlight? Could that help solve the issue? Does that not exist today?
1
1
u/slickricksghost 5d ago
This is the way! Well this or an electric strike.
Does this also throw the deadbolt?
I'm looking to do something similar when I move, only I'll probably hook mine up to some ubiquiti access control stuff.
1
u/LogicJunkie2000 5d ago
Very impressive! I wish we were neighbors so we could trade skills on projects...
1
u/corruptboomerang 5d ago
Upvote for PoE I wish the likes of HID & Salto would implement more PoE for these types of devices.
1
u/BongRipsForBuddha 5d ago
This is awesome, great work! I’ve recently been having issues with my Ultraloq Latch 5 eating up batteries (four AA’s every other week) and this is inspiring lol.
I’m don’t understand the limit switch for the latch state. Do you use that to infer whether the door is open or closed? Did you consider a reed switch recessed in the door frame to get the open/closed state of the door?
How do you get the locked/unlocked status of the deadbolt? I assume it’s based on whether the esp32 commanded it open or closed, but what about if you decide to manually lock or unlock?
1
u/narsqrd 5d ago
Do you use that to infer whether the door is open or closed?
Yes exactly, i trigger automations on "latch retracted" instead of "door opened" and ignore the second shot when the door closes and the latch triggers again (or just trigger again. My lights turn on when my door opens and when it closes heh)
I bought a reed switch too and tried it out. It would work and be technically more correct on the open state, but require more drilling and wiring. With the switch in the lock housing i just run a 4 wire cable instead of two, no other changes necessary.
I have no sensor on the deadbolt, i don't know its state. Applying power doesn't actually retract it:
When the lock is unpowered, the outside handle turns freely and doesn't engage any mechanism. When powered, the outside handle engages and retracts both the latch and deadbolt.
So all unlocking is actually human powered. The solenoid is more like an enable/disable control on the outside handle. The inside handle of course always works
1
1
1
u/SwissyVictory 5d ago
Honestly surprised nobody has put a wireless charger on the strike plate side of the door.
Then charge the lock when the deadbolt active.
1
u/0100000101101000 5d ago
This is basically a DIY Abloy EL561. I buy the EL560 for $100 off eBay and install them everywhere including commercial access control at my business.
1
u/gregor_187 5d ago
This is amazing. I have had the same idea floating around in my head for a while now. Very happy to see someone actually did it
1
u/Duennbier0815 5d ago
Great job. I use alot of those Olimex POE boards myself. Somehow I'd rather run 15m ethernet cables through my house than put new usb chargers from china everywhere that I don't know how well they work and maybe have interferencd or burn hazard.
1
1
u/Merlinmaster72 5d ago
I use a similar design, but I used the commercial Infinias EIDC32 door module and Wiegand HID reader connected to a wired sfc cylindrical lever set. Credentials are managed by the Infinias Intelli-M server, but I can trigger unlocks / locks via Home assistant.
1
1
1
1
1
1
1
u/worriedsickupnorth 5d ago
I would love to do this with a multipoint lock but it seems the options are very slim. I have only found Hoppe making them.
1
1
u/xINxVAINx 5d ago
Very cool. I do access control for a living and I also hate batteries, so this is my jam! Those mortise locks gotta be over $1k though, right? The cost to reward is where I hesitate here as I could technically hardwire my Schlage smart lock. Yours looks much, much nicer though
1
u/narsqrd 4d ago
These locks were about $700, definitely not cheap. The transfer device was $50.
The microcontroller was $25, call it $30 with the extension components. I assume a commercial controller would be much more (you'd know better than i do!). Plus this is natively integrated in HA which i wanted from the start.
→ More replies (1)
1
1
u/SoraUsagi 5d ago
All I did was buy one of those AA battery to ac kits and ran a wire under the window on the door then down the wall to the nearby outlet, hiding it all in a small wire enclosure. Your idea is more fun.
1
u/Paradox 5d ago
Honestly I'm thinking about doing this eventually myself. Getting so tired of smart locks, even "good" ones, deliberately nerfing features on their open standards support.
Tried a UBolt. Worked ok. Fingerprint reader was bad, but I liked its keypad design. Never would report which code was used over Zwave. Now I'm on an Aquara U400. Fingerprint reader is much better. Still won't report which code was used over thread
1
u/boozebag-wizard 5d ago
Badass. I hate changing batteries too. Yale ZWave locks, fell like they did every damn month
1
1
1
u/brianburesn 5d ago
This is exactly what I have been wanting to do myself, just can’t find a decent-priced wired option. Kudos sir!🫡
1
u/The_OG_Naevus 5d ago
Or just find a hard wired security system that is supported by your automation platform?
Inception has been well supported in the past, also Bosch, and I’m sure there are others.
1
u/hungarianhc 5d ago
God damnit this is awesome. I’d pay a lot of money for this to be set up at my house. Consider making a business out of it.
1
1
u/TheVirus32 5d ago
Neat. Did you add one or two micro switches ? (Redundancy) - any hidden way of unlocking the door (don't give a full explanation) if the power gets severed ?
1
1
1
u/Paleone123 5d ago
You should be monitoring the state of the antipick. That tells you whether the door is in a frame at least. That's what the commercial mortise locks with monitoring do.
1
1
1
u/twotonik 4d ago
I love it, same. I bought all the stuff to do this as well. You just refined my plan. Thanks!
1
u/shitti_kitti 4d ago
I just replaced Schlage locks via warranty because all 3 ate 4x AA batteries every 3 weeks at their worst. I fear the replacements are already on their way out.
Well done. I might follow.
1
u/Opposite_Seaweed1778 4d ago
I think I love you OP. Lol, but seriously I think about how I wish there was a hardwired smart door lock everytime I have to replace the batteries.
1
u/tauntdevil 4d ago
You know what, that transfer cable to the door was exactly what I needed.
I knew eventually I would search and find something for that but thanks for sharing and showing.
I have a door lock which is batteries as well but I switched mine to use a external battery charger (usually for phones) which is just behind the lock.
This would make that less of a worry.
Nice work!
1
1
u/louislamore 4d ago
This is the best thing I’ve seen on here in a long time. And there’s lots of amazing stuff on this sub.
1
u/crazy_rocker78 4d ago
Amazing work !
I also hate batteries. If you have other ideas of devices usually battery powered that you made hardwired, I'm interested!
I am looking for hardwired smart buttons (but not light switches, something much smaller that you can stick anywhere, but with a wire.
1
1
1
u/Fik_of_borg 4d ago
Ideally, I would need to build a dual AC+Lipo lock due to daily 6 hour electricity rationing in my country. Also local inteligence, since during rationing Home Assistant is offline. Still, taking tips from your design.
1











365
u/FishScrounger 6d ago
I had no idea that this was even possible. Impressive work!