I have quit a normal (dutch) situation : my doorbell button at the frontdoor is connected with 2 pairs. Somewhere these 2 pairs (or at least one of them) goes to a wire connected to the bell transformer :
A separate part of the line goes to a old fashioned bell
The wire is splitted and covered in ducttape ( ) so I can’t see all the wires yet.
Lately I had some problems with the bell where the button got stuck, the bell wouldn’t stop ringing. Happened out of the blue sometimes later in the evening.
Off course the first solution would be ESP instead of fixing the problem (no, I took the button apart and did some bending on the metal, looks OK now).
Now, what I want to to is the following : take the 2 wires from the button and connect them to a GPIO/GND on the ESP. This should detect pushing the button at ESP site.
Connect the doorbelltrafo output with a relay to the bell itself, so the ESP can turn the relay on when it detects a push at the button.
This way I can easily turn the bell OFF when I simply don’t want to be disturbed, and future button problems wouldn’t set the bell continuously on, because the ESP would simply react on the button-interrupt and switch the relay on for a few seconds (whatever the push time may be on the button side).
For future projects I could detect a button push and take a camera snapshot or something else fun.
Sounds workable, or am I missing something in my theory ?