Building my own recessed door sensors
Why do I want door sensors
Door sensors are one of the most useful and underrated sensors in a smart home. They’re cheap, battery life is excellent, and they unlock a surprising number of automation possibilities beyond just “is the door open?”
I use door sensors all over the house, they’re handy for all sorts of things, and aren’t limited to doors at all A nursery door that gently turns on a lamp at night, a baby wipe container that boosts light brightness during nappy changes, and a back door that automatically turns on outdoor lighting after dark.
An Aqara T1 on the change-table baby wipe box
To do this properly though, I want my smart home to know the state of every door and window without my house looking like a smart home showroom covered in plastic sensors.
That’s where the problem starts.
The off-the-shelf solution (and why it sucks)
Most door sensors are designed to be stuck to doors and walls with adhesive. They work fine, but they look messy — and I don’t want visible sensors all over my house.
There are recessed door sensors that hide inside the door itself. I’ve used one before: Aeotec’s recessed door sensor. On paper, it’s perfect — completely invisible once installed.
In reality, it was expensive, unreliable, constantly disconnected, used a weird battery, and cost around $100 AUD. The only thing it had going for it was the form factor.
But that form factor was the key.
My solution
Most door sensors work using a simple reed switch and magnet — including the Aqara T1 sensor I already use everywhere. After pulling one apart, I realised the PCB was tiny enough to fit inside the same 20 mm recessed footprint used by the Aeotec sensor… with a bit of creative reorientation.
So I designed a custom enclosure that lets the Aqara T1 live inside the door instead of stuck on the surface.
After a few prototypes and a lot of tweaking, I landed on a three-part printed design that:
Fully hides the sensor
Keeps the bind button accessible
Allows easy battery changes
Uses the original Aqara magnet
Costs under $10 per door
I replaced my old recessed sensor with the new design, and it worked immediately — faster, more reliable, and dramatically cheaper. Two weeks later, it was still rock solid.
I ended up printing enough to fit every door in the house, and now my entire home has invisible, reliable door sensing, without spending thousands on commercial recessed sensors.
Make Your Own!
The printable files are available here:
You’ll need to supply your own Aqara T1 sensors!
If you don’t have a printer, you can buy them in packs of 5 here!
If you’ve got ideas for clever ways to use door sensors, let me know — I’m always looking for more excuses to automate things.

