Introduction: Doors- and Windows Locked/Unlocked Sensors
I have added various sensors throughout our house. I wanted to be able to detect that windows and doors are not just closed but also locked.
For this purpose I designed and 3d-printed a couple of magnet holders that attaches to the handles on the windows and sliding doors.
The supplied STL files are for inspiration only, They fit the handles we have in our house, yours might be different.
Due to limited space between magnet and sensor, I chose to use a smaller neodynium magnet than the one supplied with the sensor.
Magnet: 10x5x3 mm
Sensor: Aqara, but other brands can be used as long as the sensor fits between the frame, magnet and handle.
The front and back door solution required some soldering and repositioning of the sensor's reed switch.
Supplies
Step 1: Window
- Set the handle in the "unlocked" position.
- Remove the supports from the "arms" on the 3d-printed holder.
- Slide the holder onto the handle as shown.
- Squeze the ring and push the magnet into the holder.
- Slide the holder all the way until it stops at the base of the handle.
Step 2: Attaching Holder and Sensor
Close the handle and observe that "locked" is only detected when the window is completely shut and the handle is in the locked position.
Step 3: Sliding Door
Insert the magnet in the Sliding door magnet holder.
Step 4: Placing the Sensor
- Slide the magnet holder onto the handle (magnet invisible).
- Place the sensor such that it will only detect "closed" when the door is completely shut and the handle is in the locked position.
Step 5: Front Door
Place a magnet on the tip of the Locking Pawl.
Step 6: Prepare Door Frame
Drill a 5 mm hole in the door frame aligned such that the reed switch is positioned in the bottom of the hole for the locking pawl. Make sure that there is adequate room for the magnet on the tip of the locking pawl when the door is locked.
Step 7: Modifying the Sensor
- Disasemble the sensor unit (note how the reset pin is situated) and carefully unsolder the reed switch from the 2 soldering pads on the pcb. (sorry no pictures of these steps).
- Solder a thin wire to each of these pads and bend the wires such that they stand perpendicular to the pcb on the opposite side.
- Remount the pcb and make sure that the reset pin can trigger the switch.
- Drill a hole in the pcb cover and remount the cover with the wires protruding the hole.
- Measure the depth of the hole and cut the wires to a length such that the reed switch is correctly placed when the sensor is mounted on the door frame.
- Solder the wires to the pins on the reed switch that were previously unsoldered.
Step 8: Sensor Placement
Slide the reed switch into the hole and mount the sensor unit on the door frame.