Noticed a number of projects to make your old-fashioned doorbell smart, but typically these use relais so when your component fails, your bell stops working alltogether. Therefore I took a different approach:
- I am using a bell transformer which creates a 8V AC, when the knob is pressed, this will ring the bell
- I take the 8V AC for the ringer - where this 8V will be there only when the bell is ringing. Then use a diode rectifier, a condensor, some resistors and a zener diode to transform this into a 3.3V pulse which is put on an ESP-01s on its Rx pin. Works flawlessly!
Below the scheme and the yaml.
esphome:
name: doorbell-detector
friendly_name: Doorbell
esp8266:
board: esp01_1m # adjust to your ESP-01S variant (e.g. esp01_1m or esp02)
# Wifi settings (use secrets.yaml, never hardcode passwords)
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
logger:
# logger only transmits on TX, RX is not used by the logger
# once GPIO3 below is declared as a gpio pin, it's free to use as a digital input
api:
encryption:
key: !secret api_encryption_key
ota:
platform: esphome
password: !secret ota_password
binary_sensor:
- platform: gpio
pin:
number: GPIO3 # = RX pin, not a boot-strapping pin, safe to use after the one-time flash
mode:
input: true # no internal pull-up/pulldown: R3 on the schematic already handles that
inverted: false # HIGH when the doorbell is pressed (as in this circuit)
name: "Doorbell Pressed" # ESPHome slugifies this into entity_id binary_sensor.doorbell_pressed
id: doorbell_pressed # internal ESPHome reference (for lambdas/automations within this yaml)
device_class: sound # gives an on/off display instead of open/closed
filters:
- delayed_on: 20ms # small debounce margin (in addition to C2 on the schematic)
- delayed_off: 50ms
on_press:
- logger.log: "Doorbell pressed!"
- platform: status
name: "Doorbell Connected"
entity_category: diagnostic
sensor:
- platform: wifi_signal
name: "Doorbell WiFi Signal"
update_interval: 60s
entity_category: diagnostic
- platform: uptime
name: "Doorbell Uptime"
update_interval: 60s
entity_category: diagnostic
text_sensor:
- platform: wifi_info
ip_address:
name: "Doorbell IP Address"
entity_category: diagnostic
ssid:
name: "Doorbell WiFi SSID"
entity_category: diagnostic
- platform: version
name: "Doorbell ESPHome Version"
entity_category: diagnostic

