Smart door locked sensor

I guess I want something that is near impossible, I understand that. But I wanted to check it here before I give it up.

I would like to check if the front door(s) are locked, not closed, but really locked. The doors are NOT wood, but ‘plastic’, and there is not much space.

This is my door ‘setup’:
image

The ‘deadbolt’ is 21mm deep, and the hole is only like 22mm, so very small space to detect it. The red rectangle is the part where it is in the hole.

And below we do have ‘some’ space, but it’s only 2cm deep, 2cm high and 1cm wide. But I guess it’s impossible to fit any smart thing inside that space, with a battery and some wireless (WiFi or BLE) in it? :slight_smile:

The problem is that it is not wood, so I cannot make extra holes or remove some material. Also there is no extra space around it. One can hope :stuck_out_tongue:

This is something that might be technically possible:
https://www.adafruit.com/product/1871 (but of course it does not have wifi, or GPIO)

Did I get this right that the deadbolt is 21 mm deep and the hole it goes in to is 22 mm deep?

That is problematic.
My first thought was magnetic field.
But that might mean you need more than one mm, perhaps of you shave off a mm more of the deadbolt then you can glue a magnet to the bolt.

Then on the outside of the door, (or inside) not outdoors, you have a reed switch to sense the position of the magnet.

It could work, but it all depends on how shielding and thick the door is

Yes… I see it’s almost NO space behind it, on purpose probably. So maybe it would be possible to let the deadbolt act as the contact for 2 wires, like a switch/button, from below.

Also see that a CR2032 (which indeed might JUST fit in maybe 24mm) is not going to last that long. The whole idea of the CR2032 is because the temperature sensors of Xiaomi I have are based on it and should last for 6 months. But those have BLE, and passively send out temperature and humidity.

Wifi with MQTT is easier to integrate, but takes much more power, so it will not last long. And BLE is harder because you have to catch the signals with another ESP.

The device should only send signals if the state changes, but that might be hard. I have no idea how that works. Also possible to send the state every 5 minutes, and then go back in deep sleep.

I recently wanted to do the same and found this Reddit post.

I did the same, but with just two wires in the hole.

Sadly I have no way to get rid of the cables. And the wife will kill me if I did that. She already doesn’t want me to try all this, that is their normal state I guess…

I do see an option, but don’t have any experience programming for hardware. That is with these:

Has a GPIO, Wifi and says MQTT, fits inside (only 10mm x 14mm):

Then I only need to program it that it will send it’s state, if changed, every 5 minutes. I guess that would work, and will have a good battery life.

Look into ESPHome if you want to use an ESP.

If you say there is that little gap around the deadbolt then I assume the wires will just get chewed up by the constant wear.

Yes, but below it there is 2cm x 2cm x 1cm. They BLKBOX BB-E01P (ESP8285 above) will fit in it, and it might work.

Currently out of stock since 4 days, so will wait until it is available, and then will try.

Similar situation here but with a little more space in the fitting. Did you ever manage to find a solution for this or did you just have to live without in the end?

Currently without. I did order ESP-M2 on Dec 30, 2020. I did try some things then, but after the solder joint came loose from the ‘board’ I stopped. I was terrible to solder it, as I only have a simple solder station of € 20.

And just ordered 2 of the ESP-01M, on Jul 4, 2022, so I’m trying again to see if I can come up with something. Although I thought I ordered something with holes in it, so I can test it without soldering, but it looks like I didn’t. But maybe this one is better to solder for me.

So I didn’t fully gave up on it, although it took 2 years before me next try as I was frustrated with the soldering :upside_down_face: