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

I’m going to try make a pulse counter energy meter with it. Going to solder a photoresistor into it. See how far I can go with it.
Waiting dor door sensor.
Post results later

2 Likes

Thanks for the inspiration I found in this thread.

I’ve built my own project using the ideas expressed hereinY

2 Likes

I’ll be interested to see how this goes as looking to do the same too. I’m not that familiar with the electronics side of things but are you hoping to literally just attach each end of a photoresistor to the reed switch contacts? If so I can say right now that doesn’t work as I have both sat on my desk and just tried it, I’m guessing as it’s not a mechanical switch like a reed so perhaps need some form of current to power itself?

I don’t have any battery contacts but perhaps if you could link up a couple of batteries for the photoresistor power and then connect that to the door sensor for the low power communications aspect before bundling it up into an enclosure…

A photoresistor will probably work with the Aqara sensor so long as the resistance dips below 2K ohms (seems to me like that’s the spot). Trick is simply to find what threshold resistance the sensor accepts. If the photoresistor is (when not lit) infinite resistance (or some very high value) then it might work.

Not sure about battery consumption if the photoresistor has a non-infinite resistance when not lit.

I’ve only got the basic ones that came with an electronics kit to test with, can confirm those at least don’t work when directly wired up. Be good to know if anyone tries it with other types, battery will be interesting!

Check their photoresistivity with a multimeter to let us know their values when lit and shielded from light.

I don’t have one sadly! Hopefully someone here has the parts lying around and can shed some light on it.

Hi there, I am trying to modify one of these, but I can’t figure out how it works. I don’t see a reed switch as big as the other sensors.


Those two pins works.

2 Likes

Maybe a hall-effect sensor on the PCB ? What brand/model sensor ?

How is this going in terms of reliability and battery life. Cheers.

How did you go with this?

I see these ones don’t quite make the cut-off @Rudd-O is suggesting.

AU $0.83 17%OFF | 20pcs 5506 5516 5528 5537 5539 Light Dependent Resistor LDR 5MM Photoresistor wholesale retail Photoconductive resistance
https://a.aliexpress.com/_m0gteV6

Reliability was great, battery life, not so much. I miscalculated something when I designed it and it’s burning through a cr123 every 60 days, so it’s out of service until I have time to address that.

1 Like

Never seen one but I NEED one :smiley::ok_hand:t2:

Which sensor is it made of?

My idea is to build a mailbox sensor :innocent::pray:t2:

1 Like

Buy a multimeter. Not worth ruining hardware if you’re not going to test it.

Drilled a 3/8th hole next to the chime hammer for the magnetic contact and double-sided taped a 3mm neodymium magnet to the side of the hammer. Works really well so far :sweat_smile:


image

ESPHome bypass the zone so it won’t trigger an alarm when armed

alarm_control_panel:
  platform: template
  id: acp1
  name: Alarm Panel
  codes:
    - "<Your Pin>"
  requires_code_to_arm: true
  arming_away_time: 10s
  arming_home_time: 10s
  pending_time: 15s
  trigger_time: 5min
  binary_sensors:
    - input: zone_05
      bypass_armed_home: true
      bypass_armed_night: true

HomeAssistant

alias: "Alarm: Doorbell was triggered"
description: ""
trigger:
  - type: opened
    platform: device
    device_id: <device_id>
    entity_id: <entity_id>
    domain: binary_sensor
condition: []
action:
  - service: notify.ALL_DEVICES
    data:
      message: You can ring my bell, ring my bell (Ring my bell, ring-a-ring-a-ring) :notes:
mode: single
1 Like

Yes! Thanks for that suggestion. Same pinout on Third Reality Door Sensor. Hall effect sensor (unmarked type). Chip Output pin is open-drain with a 1M pull-up to Vdd (high=door open). Relay/other device short from Output pin (blue in picture) to Gnd pin (white wire in picture), or to actual battery ground pin/ground hole on the PCB, gives ‘low’ (door closed). I referenced DRV5023 hall effect sensor datasheet online just to confirm understanding of what I’m working with. This will soon be a power-loss sensor. With the 1M pull-up, I’m hoping an opto-isolator source fed from a USB wart via cut-up cable will be sufficient to keep Output pin pulled to near (enough) zero (low) to signal “closed” to the sensor / hub while power is enabled, and “open” (high, Out ~= Vdd) when power to USB is lost. May be some sizable time-delay from bleed-down of the USB wart, so may have to add a resistor across the opto input to make power-loss more responsive. TBD. Stretch goal: Would like to eliminate battery (replacements) for the contact sensor, so considering running sensor “battery” as a large cap charged from the USB power regulated down to ~3v. If that can run long enough, the sensor can scream “help” (door open) via Zigbee before the sensor power dies. TBD TBD.

I was inspired by all the cool projects in this thread and dug out my old Xiaomi lMCCGQ01LM and it keeps getting stuck in the ON/CLOSED state and even tried a newer Xiaomi/Aqara MCCGQ11LM and have the same issue. Has anyone here had a similar issue before?

It doesn’t seem to be a physical issue (reed switch getting stuck) as the connectors don’t have continuity.

On the software side I’m using Zigbee2MQTT with SONOFF Zigbee 3.0 USB Dongle Plus Gateway ZBdongle-P and it appears it’s failing to report back OFF/OPEN.

I don’t seem to have connectivity issues as the sensors are showing connected directly to my coordinator and they’re not that far away. Lastly, I can “reset” them by pressing the pairing button which results in them reporting OFF/OPEN correctly or waving the sensor’s magnet around the reed switch.

Hi All, I also want to hack this switch to work as a gas meter. I order this reed switch but I’m not sure if it will work with this board. Can somebody help me and confirm ?

This worked for me.