Smallest Contact Sensor to detect lock?

I’ve been trying to find something that can detect when my back door is LOCKED (not just shut) as the kids keep leaving it unlocked
I had the idea of stripping back an Aqara contact sensor and putting it in the lock channel, and affixing a magnet to the bolt and, while the principle works (and i 3D printed a tight enclosure for it, the circuit board for the sensor is just a little too wide and wont fit in the channel in the correct orientation

Which puts me back at square one…
Does anyone have any suggestions on a smaller contact sensor?

I have a fair amount of contact sensors (great for hacking things like this) but the Aqara ones have the smallest PCB out of them all.

Perhaps it’s possible to desolder the reed switch (the glass tube) from the PCB and place that inside the channel, with some wires coming out going to the PCB?

For my “is it locked” solution (also using an Aqara sensor) I replaced the reed switch with a microswitch (that gets pressed in by the bolt when locked) so I don’t need a magnet.

1 Like

What type of handle do you have for the lock?

What I did with my nightlatch is to just stick an zigbee door sensor into the gap for the magnet and used a old drive enclosure to raise the reed sensor side enough to read the changes between locked and unlocked state:

I’ll prob redo the mounting setup in the future and clean it up but for now this works to “smartify” my dumb nightlatch so I can get reminded if I left it in an unlocked state when going to bed.

I was using an aqara p2 before hence the previous mount point showing heh, the magnet is still from that p2 so kept it as is on the handle.

That’s actually not a bad idea - thanks! there is enough room to squeeze the board in, just not where i need it for my original solution… I also have a few spare switches from my arcade which may do the trick if i replace need to replace the reed…

The handle doesn’t affect the lock sadly - it’s one of those where you pull the handle up to engage the locks and then turn the key to get the bolt. So I need to detect the bolt movement in

Then the other solution mentioned would be the best path for you if you don’t just install a smart lock instead.