A list of door sensor / reed sensor hacks! (Aqara, Xiaomi, others)

Used these pins for a Tuya 19DZT.
Attached an old doorbell button to it.
Automation triggers various things like a chime on Google Nest Speakers and notifications to phones.

1 Like

I tried this too. Same hall sensor, in another type of sensor. Battery was drained in one single night. When closed, the device pulled 50mAh so this was not working for me.

Difficult to solder there. I will try anyway, but probably gonna break the circuit :wink:
Can i use a jumper cable for soldering, or is too thin?

The last one even has a light sensor (blue arrow)

https://www.aliexpress.com/item/1005005175930741.html

I have the same issue. Only just discovered this thread. Bridged the terminals on the hall sensor and it’s drained the battery overnight. Did you find a solution?

Did you have any luck with this, I basically bridged the two terminals you’ve pointed out in red and it works perfectly, but has a cheeky little 50mah draw like @mistraller had so flattens a battery in about 24hrs.

I did only measure what’s wrong, but no time to try the solution…
I measured the hall sensor will put a HIGH signal to the chip when magnet is not near. The wire we soldered to it, will connect the gnd to the output as well. So signal goes low and chip will detect that, but we are also creating a loop through the hall sensor. The sensor can deliver 50mA so battery will drain. I think hall sensor must be removed; connect sensor between vcc and the sensor output which goes to the chip. Invert your signal in HA. Only thing I’m not sure about is if the chip will detect the difference between vcc and “open contact”. If that does not work we should add a pull down resistor. (Or a pull up to get HIGH in rest) and pull the signal up (or down) with our sensor. I’m not sure which value to choose for a pullup resistor but the higher the better as that will limit the current.

See Pull-up resistor - Wikipedia

Really cool. I’ll do some experimenting. Thank you

I have managed to get it working with one of the door sensors that uses a hall effect sensor, without overnight battery drain. I did basically as @mistraller explained, it’s pretty easy to do, just requires a small amount of careful soldering.

First, I would recommend testing that the switch works in the first place, as one of mine didn’t.

Using a multimeter, identify the pinout connections on the hall effect sensor. In my case, the pinout was as follows:

Next, remove the hall sensor, I just carefully desoldered it, but you could also cut the pins if that’s a bit difficult.

We then want to solder a pullup resistor between VCC and Dat, to ensure the Dat pin is high when the switch is ‘open’. I used a 100k resistor which worked well for me. If you struggle with accuracy of the results (which you shouldn’t), you could try go down to 47k or even 10k, but this is likely to increase battery drain.

Next, solder the two wires from your switch. Attach one wire to the GND pin and the other to the Dat pin. I used Dupont cables to ensure the sensor isn’t permanently attached to the switch, making it easier to move the setup if needed.

Then you can reconnect the sensor to HA, and test that the modifications work, just touch the two ends of the wires connected to VCC and Dat (or flip your switch, whatever is easier), you should see the state change from closed-open.

I then added a template sensor in HA to invert the state of the sensor so that it reads correctly.

3 Likes

You absolute legend. Thanks so much for taking the time to share.

That is great news :slight_smile: I had so much other projects that I still didn’t find time do test this. I have 10k, 47k and 100k in smd size (very cheap on aliexpress) and i think there’s a free spot in my sensor to place it. dupont wires is also a smart idea, I damaged one of my sensors because a wire ripped off a soldering pad.

Hi, I just used this one for a rain gauge meter and got it working by soldering wires of an external reed switch (in the rain meter) to the tiny black sensor that you see right from the middle on your picture. That is the magnetic sensor that is used to detect ‘magnetism’ from the magnet.

BUTBUT After 3 weeks the whole set-up stopped working and effectively the sensor is ‘dead’. It still detects via Zigbee, I can still find battery voltage, but it does no longer detect ‘magnetism’. My guess is that the sensor cannot withstand soldering and being connected to an outside reed contact.

I will retry using the Aqara sensor, that is natively fitted with a reed switch therefore better equipped for tampering and soldering.

Cheers Kees

1 Like

I use an Aqara door contact modded with a microswitch on the end as well as the factory reed switch so i could detect if my window was unlocked or open, as a closed window that is not locked is open in my eyes. I did this to all my windows in the house.