Introduction: Invisible Zigbee Deadbolt Sensor

Sometimes I forget to lock the doors of my house. The doors are closed, just not locked, so regular door sensors won't work. I wanted a Green / Red indicator to see lock status at a glance..

Other people have put switches in the deadbolt strike hole, and I bought microswitches to do this, but I was having a hard time figuring out how to drill holes and mount them.

You can buy deadbolt strikes with switches (http://www.sdcsecurity.com/Latch-and-Deadbolt-Monitoring-Strikes.htm), but these cost $150.

You can also solve this problem with a $100 smart lock.

The door side of the deadbolt is more standard (at least on all my doors) so I thought something here might work better.

I added a magnet and inserted the sensor in the deadbolt cutout. No drilling or mounting is required, so this will work if you are renting. Once you re-assemble the deadbolt, the modification is invisible.

Supplies

  1. Neodymium Magnet (4.8mm diameter x 1.7mm thick)
  2. Sonoff SNZB-04 Zigbee
  3. Smartlight Zigbee USB Coordinator v4 CC2652P
  4. Raspberry Pi3
  5. 2032 Coin Cell Holder (optional)
  6. IKEA TRADFRI control outlet (optional)

You can use this idea with other hardware and software. This is just what I used that worked for me.

I bought the Smartlight USB because it was in stock. It shipped from Ukraine to California in 10 days.

Step 1: Install Zigbee2MQTT

The website https://www.zigbee2mqtt.io/ has good instructions on how to install the software.

MQTT is a pub-sub (publish subscribe) protocol often used by the Internet of Things (IoT).

It is very useful for passing messages between devices.

Note that this actually detects when deadbolt is unlocked, not that it is locked. In my application, this is okay.

The door sensor battery holder gets bent during shipping. You may have to bend it back down to get the battery to stay in.

Press and hold button for 4s to pair sensor to the Zigbee network.

Step 2: Install Magnet

Install magnet at the tail end of deadbolt. I was going to epoxy it in place, but it works fine just held magnetically.

The magnet moves around a little when operating the lock, but it doesn't get out of position.

Step 3: Install Zigbee Sensor

Tape up sensor so it doesn't short to the deadbolt mechanism.

Insert board at end of deadbolt so the magnet is next to the reed switch.

This fit fine on two of my doors. One of my doors required me to relocate the battery with a coin cell holder.

This worked with my Schlage deadbolts. But there are a lot of different mechanisms, so you will have to open up your deadbolt to see if it will work for you.

Step 4: April 2022 Update

Originally I moved the battery to fit one of the locks, but it didn't work very well. I think it was not aligned properly with the magnet. To fix this, I replaced the battery and moved the reed switch instead (using blue wires in picture). This seems to work much better.


Another sensor was too far from my Zigbee hub. I used an IKEA TRADFRI control outlet as a Zigbee router (aka repeater) to extend the range. Nothing is plugged into the outlet now, but it might be useful later.