Prototype magnetic contact sensor for sliding patio door LOCK

Below are pictures of a prototype of a patio sliding door contact sensor apparatus for detecting a locked-unlocked condition (this is different from determining door open or closed). This was inspired by another user's solution for a Pella slider that allows a different approach.

The first picture shows the locking mechanism of the slider door in the "locked position". In the unlocked position, the "hook" drops down and retracts into the door.

The second picture shows a standard pencil with a magnet hot-glued to the non-eraser end, while the eraser end is placed within the raised latch channel that the "hook" engages when locked. O-rings are used to limit travel in both directions, and a plastic cable/wire guide is used to hold and guide the pencil.

The magnetic sensor is an Aqara Zigbee unit with a bit of loop material glued to the back, which engages a 3M hook strip adhered to the door frame. Using hook-and-loop materials allows resettable positioning of the Aqara unit. The Aqara sensor is the smallest and thinnest magnetic contact sensor that I've come across and JUST fits depth-wise within the channel of the slider door frame.

The upper O-ring prevents the magnet from pulling too close to the sensor (and sticking to it) by hitting the bottom edge of the guide. The weight of the pencil helps to pull the magnet away from the sensor when the door is unlocked (so no spring needed).

This works tolerably well, but the spacing of magnet and sensor is touchy. There appears to be a bit of hysteresis in the spacing engagement, with the magnet having to move further away from the sensor to register open then the magnet had to move to register closed (e.g., 1/8" closer from rest to be CLOSED, but 1/4" away from the CLOSED position to be OPEN). The door "hook" provides just about 1/4" of upward travel so the spacing can be set to work.

The Aqara sensor sits in an aluminum channel and the face of the slider door frame is steel, so the signal is weak. I have 2 Zigbee in-wall switches just inches from the sensor, so I do get a signal.

I'm hoping that this jury-rigged setup will inspire some other solutions (including commercial solutions). I think a micro-switch plunger protruding into the latch channel and integrated into a small housing with a Zigbee radio (maybe with an external antenna wire?) would be a more elegant and reliable solution.

6 Likes

That’s very clever!!

I did something like this a few years ago on all of my doors but slightly differently. I just fitted a lever microswitch into the keep in the frame (or opposing door in the case of my bi folds). Depending on the door, either the multipoint locking hook or mortice bolt pushes that microswitch closed when locked. The microswitch is wired into the input of an Aeotec Z Wave contact and the status of all locks is shown on my dashboards around the house. There's no need to check the door/wonder whether I locked them. For UK PVCu doors it's just a case of removing the full length strip in the frame and securing the microswitch behind it.

1 Like

I'm actually headed in that direction, as I'm not convinced that the magnetic contact sensor solution is the best. Last night, I ordered these 2 items from Amazon:

Micro-switches small enough to fit within the door frame latch channel:

Zigbee water leak sensor that runs on AAA batteries:

1 Like

OK, the Zigbee water sensor pictured above arrived, and it's a dud. The Amazon website said it had a depth of .47 inches, when in fact the depth is about .76 inches. I needed less than .5 inches to fit within the sliding door frame channel without being crushed by the door when closed.

I might have to crack open an Aqara magnetic sensor -- the shallowest sensor I've found -- and try to solder a switch in parallel with the reed switch, then coat everything in a plastic potting material.

Having said that, the magnetic solution described above is actually working pretty well, except that opening the lock but not sliding the door open doesn't cause the Aqara sensor to register as OPEN (thus, a false negative). The door has to be opened an inch or two to make the sensor change from CLOSED to OPEN; I suspect that the steel frame in the door might propagate the magnetic field to the sensor sufficiently such that the sensor doesn't change state, even though the magnet has dropped down to its rest state (or so I think -- I can't actually see the pencil and magnet until I open the door). So my current prototype fails to detect a door that has been (a) unlocked but (b) not opened.

My variation of your basic plan: You can get microswitches with rollers:

Screenshot 2025-02-03 at 11.17.45 PM

swap the pencil with magnet for a pencil with a bevel at the top and when it slides UP it rolls along the microswitch and makes or breaks the contact. Run the microswitch contacts to the internal contact points of the reed of that Aqara Zigbee unit.

In the unlocked position, the bevel of the pencil is below the roller, allowing the microswitch to be Open. When the lock is closed, the bevel then the pencil body rides up the microswitch roller and into the Closed position.

I'm on the same page -- but since I didn't know exactly what would work, I ordered the following a couple of days ago:

And tonight, I ordered a Tuya Zigbee water leak sensor similar to the sensor pictured above, but using a coin battery (and is thus thinner in depth). I expect I'll still have to liberate the electronics from the plastic shell to meet the depth limitation imposed by the door frame, but I'm thinking white electrical tape will help with the WAF.