Hacking an Aqara Door Sensor into a Dead Bolt Sensor

  • December 12, 2022

Here’s an exciting home automation project for you: Can a door sensor work as a way to tell if a door is dead bolted? Yes…but do you have any paperclips?

I’m a big fan of home automation, especially since working from home, and I’ve been experimenting with the Aqara sensors. Their door, temp, water, and vibration sensors all work great for me, but what I really need is a way to check if the back door of my garage is locked. Yes, it sounds a bit lame, but it’s a pain to keep checking it throughout the day and every night! I’ve got to walk through the kitchen, open the door to the garage, look in the back of the room, realize I can’t tell if it’s locked without the lights on, turn the lights on, confirm it’s locked, go back inside, lock the door to the garage, go back to what I was doing…and then think to myself “Am I sure it was locked?” before doing it all over again. It’s a real process and one I would like to avoid going forward.

My plan was to modify a door sensor to work as a lock sensor.

These door sensors are pretty simple actually. They have two contacts with a glass tube in between them. The tube contains two little magnets and when an external magnet is put against the side the two little magnets connect, which connect the circuit and the sensor reports that it’s “Closed”.

I simply cut that glass tube out entirely and soldered wires to each of the contacts. After a little hot glue to be safe, I drilled a couple of holes in to the outer case for the wires to pass through and the case can then be put back around the modified circuit board.

The last trick is how to install the modified sensor in the door and make the wires connect when the dead bolt is locked. The bolt on my lock is conductive, so I just need to put some contacts in to the hole that will consistently make contact when locked. I ended up simply making a couple of “springs” by wrapping paperclips around a pencil, and then soldering them to my wires.

The springs are then attached in to the inside of the jam so they don’t touch unless the bolt is inserted.

I put the door back together and the modified sensor works great. I’m using the Aqara products with Home Assistant and I can immediately see the change in state. Computers are awesome!

(This is the door to my garage / workshop. It’s OK that it looks like crap. That’s actually a feature.)

Related Posts

Thoughts on Apple Bloggers and Vision Pro Coverage

I posted this on Mastodon, but I figured I would cross-post it here as well. I wonder if we’re headed for a weird place with the #Apple Blogosphere (AKA the Apple Blog Mafia). All of the main players are talking about Vision Pro all the time and saying things like “I lose track of time in here!

Read more

The Simple Pleasures of a Mobile Office Whiteboard

I’ve built a lot of stuff for my home office over the last few years of working from home, but my current favorite is something so simple: A custom rolling whiteboard A couple of weeks ago I gave myself a Saturday challenge to take my existing old whiteboard and build a rolling stand for it only with materials I had in my workshop.

Read more

I Made Myself a JARVIS Over the Weekend

With some spare parts, a USB speakerphone, and my Home Assistant server, I was able to make a competent JARVIS for my home office over the weekend…and the exciting part is that it’s only going to keep getting better! Last year was the “Year of Voice” for Home Assistant, the open source home automation platform, and the team accomplished a ton of work that enables Home Assistant users to make their own voice assistants.

Read more