Probably done many times before but it’s the first time I’ve done something like this.
I’ve got a bunch of Xiaomi door sensors. I saw a youtube video where someone had soldered two points of the sensor to a water sensor matt. I thought why not do it to some battery springs and stick it in my door…and…IT WORKED!
Interesting! So basically you turned it into a contact switch where the bolt connected the two springs? Cool! Will have to try this with a sensor I still have around.
That’s exactly what I’m after!
I’m a little confused though as to how the springs work in thus case
So you have both springs soldiered to the sensor then the bolt goes in and presses them in which closes the circuit?
Could you perhaps upload more photos of the installation please?
I used springs as I wanted something with some “give”, as the bolt will push against it. Technically no reason you couldn’t measure the depth of the hole and use any other conductive material (even bare wire if you measure it right / use correct placement).
It’s quite a simple process:
Open up your Xiaomi door sensor.
Solder 2 wires to the sensor (as per the middle photo)
Connect those wires to springs (or whichever method you want)
Make sure the bolt hits whatever you use to complete the circuit.
Whenever the circuit is complete your sensor will report “off”.
Use your customize.yaml to change it to a lock (so it reports locked instead of on)
binary_sensor.door_window_sensor_12345678910:
friendly_name: "Front Door Lock"
device_class: lock
I have a UPVC door, and the black plastic thing is an insert that the lock enters.
The hacked xiaomi door sensor fits easily behind it.
All in all ~1 hour to build this.
Family VERY happy that they can check the lock status remotely!
A few months later and I found that constant locking/unlocking cycles has started to damage the micro switch.
I now have some spring battery terminals and will alter the sensor to that approach.
Last week my cleaning lady forgot to lock my front door and I thought that I need to find a way to sense if the door is locked or not without changing the lock with a smart one(I kind of don’t trust them) and I came up with almost the same idea but instead of battery springs I will use this kind of micro switch:
It has a roll at the end of the lever which will make the detection of the locking bolts even smoother. I will test it next weekend and share the results with you.
@Knottyboy if you come across my reply… Are you still using this a couple of years later and how’s it holding up? Been looking for this exact use case as I don’t want to destroy the door frame but also don’t want a smart lock.
Anyone also know what gauge wire I’d need for this? I’d like the thinnest possible but obviously needs to also work. I would use jumper cables but I want to run the wires up to the top of the door so will need something a bit longer.
I finally got around to trying the original post suggestion but sadly it didn’t work well for me. The whole metal section of the door acts as sort of a relay which confuses the sensor when you touch parts of the door. Basically not reliable for me sadly, I think I need an approach that ends up pressing something rather than relying on the signal conducting…
This worked for me. I attached an Aqara sensor into the inside thumb-turn housing. I superglued some magnets in place so when the turn piece is in the locked position, the magnet rotates to the closed position on the sensor. Of course, it only works if the door is closed.