Integrate "old fashioned" doorbell into HA with Xiaomi

You can specify what triggers it. Any change, only change to on, only change from off to on etc.

Look at my code earlier in this thread. I only trigger when it goes to off.

Ok. But what can i fill in the field payload to only trigger on the true-state of the mqtt payload?

EDIT:
Okay, solved that. Filled in the template-value inside condition.
But saw that true from the contact-field was written without quotation marks. It was not possible to delete them inside the gui. Edited that in the automations.yaml.

Never worked with the web version of automation, sorry :).

I’m sure you can find the answer in the cookbook.

I can’t get mine to work reliably. Sometimes I get it to report “closed”, but then it doesn’t reset to “open” again.

Has anyone tried a similar hack, but with the vibration sensor? Or is that not sensitive enough?

1 Like


Hello boneless,

Thanks for you great idea! I have bought the Xiaomi wireless door sensor and tried to place it somewhere near the electro-magnets but no luck so far. Do you think it is possible to place it somewhere without removing the top from the sensor or the top of the case of the electro-magnets? Or is the signal to weak to make it work? Otherwise I have to try to crack it and look what’s inside :frowning:

Hi Maurice,

I think it is a bit of a hit n miss honestly. Opening the sensor is quick, so that would be my first try, but not sure if it would help.

Sorry I can’t be of more help!

I have opened the sensor, removed the relay and connected the two switch-wires to the two points the relay was soldered to. I also placed a 100nF capacitor between the two contacts, that helps to avoid “fake rings” when it rains (due to elektrostatic discharges).

This works very well for me :slight_smile:

I did the same had to remove it from the casing. Love when all my Alexas say “someone rang the door bell” :slight_smile:


Hello Bouwe,

You didn’t break or removed anything from the sensor but just connected two switch-wires on both sides of the ‘bar’ as show in my picture? And theses wires are directly connected to the relay? Do you have any photo’s you could share? I also search on the Internet for the 100nF Capacitor, I found them with 50V, do you mean those? I did study electronics, so I can soldered, but the theory of connecting capacitor is gone.

Please let me know. I really would like it to make it work

Maurice Bekkema

I did remove the relay that you show in your picture. In its place I soldered the 100nF 50VDC capacitor, a through-hole type, not as SMD-type. And then I soldered the two wires of the doorbell-switch onto the two capacitor wires, one to each side of the capacitor. That’s all.

Hello Bouwe,

Thanks for your replay. I really going to try it but I will first remove the hood of the electro-magnets en try to place the uncovered sensor somewhere on top of it to see if it works. With no succes I will have to order a 100nF capacitor online :frowning: (because all non-essentials shops are closed at the moment). I found it online for € 0,18 per piece, but with shipping-cost It’s much more expensive.

Happy to help. Good luck with your experiments :slight_smile:

Hello bouwew,

Finally made some time to go to the electronic store to get the 100 nF capacitor and soldered the capacitor between the two wires. The sensor was all ready working fine without the capacitor, but as you discriped I got a lot of “fake rings”. Hopefully these are now gone. Thanks for your advices.

1 Like

I’m really interested in the solution proposed in the original post, but am not familiar with the internal working of mechanical chimes. I’m thinking of buying a Byron 776 (which I believe to be compatible with my Ezviz DB1C video doorbell), but have no idea where I would mount the door sensor. I attach a photo of the Byron unit (a screen grab from Youtube) - I was wondering if anyone could offer any guidance on where the door sensor should be mounted?

Just try different position and watch your sensor in HA, you’ll see when it get triggered.

I’ve installed the door sensor as well, and it works perfectly.

@bouwew
Thanks for the idea and clear instructions posted above (even with my abysmal soldering technique)!

Hi everyone,
I saw this post, and wanted to do the same (starting to do some home automation at my new place…)
Got a Xiaomi door and window sensor but I don’t have a clue (tried to place it inside but didn’t work) where to place it in my doorbell…
Can anybody help me ?

You´d need to place it as close as possible to the central part (maybe on top of the white part) as once activated the magnetic induction needs to reach the sensor. in the end it depends on how much space you have inside, but a good way is to just try… hold it in one place and then have somone press the doobell and see if it works… if not…move and repeat…

I have a bell that runs on 12v and makes bird sounds over a speaker as long as the push button is pressed. Thinking that there might be a magnetic field, I tried to stick the contact sensor to the speaker. I’ve also tried sticking the vibration sensor to the speaker just in case vibration occurs. I didn’t get any results. Do you have a suggestion?

I came across this thread while searching for a way to integrate my ‘dumb’ doorbell into HA, until I can sort out a PoE video doorbell instead. I’ve got a battery powered chime which uses a 9v pp3 battery to activate the electromagnet and hit the chime plates.

I tried holding a spare Aqara door sensor near the electromagnet but couldn’t get it to register, so if I understand the previous posts here, instead of using the electromagnet to activate the door sensor, I can desolder and remove the ‘bar’ on the aqara board, which makes/breaks the circuit when a magnet is near it, and instead just solder 2 wires in its place, which go to the button? The doorbell button breaks this circuit normally, but when pushed, completes the circuit, as if a magnet was present originally, and this changes the status of the sensor in HA.

In order for the chime to still sound upon a button press, can these wires also join to the electromagnet terminals on the chime like normal? Would the 9v of the electromagnet be an issue for the aqara board in this scenario? I would rather keep the original chime as well as have HA notify me on the sensor status changing.