This smart doorbell project transforms a traditional doorbell into an intelligent system using ESPHome and Home Assistant integration. The system detects doorbell button presses and activates a relay-controlled chime while providing remote control capabilities.
Doorbell detections can be used for home assistant automations such as taking a photo with your existing security camera on-press and send it with a notification to your mobile devices. You can also deactivate the gong/chime at times where you need silence.
Some ideas come from the excellent work of Marcel Zuidwijk.
More images are in the img folder.
- Detects button presses via GPIO input with debouncing to avoid false positives
- Enable/disable chime remotely via Home Assistant in case you need silence
- Connects to home network with fallback hotspot
- Home Assistant Integration
- Uptime and WiFi signal strength monitoring
- Restart device remotely
- Manual gong trigger via Home Assistant to annoy your housemate ;)
- ESP32 Development Board (Used: ESP32 V4 with CP2102, AZDelivery). As most dev boards, this one can handle 5VDC.
- 1× AC/DC LM2596hv Step-Down Voltage Regulator (to convert AC to DC and decrease voltage to 5V to power ESP32 and Relais module). AC to DC is important in case you want to connect this project to your existing doorbell transformer which typically runs on 8-12VAC
- 1× SRD-05VDC-5L-C Relais Module because the typical Gong needs more amp that an esp32 can deliver. This Relais can also handle AC which would be tricky using Mosfets.
- To be powered over doorbell transformer (usually 8-12VAC) or external power source. Alternatively a separate transformer can be used. A separate transformer that delivers 5VDC would make the above mentioned step-down regulator dispensable.
- wiring cables
- Optional: WAGO connectors, terminal clamps and perfboard for easier wiring (see images)
See docs/installation_configuration.md
- GPIO4: Doorbell button input (with internal pullup)
- GPIO19: Relay control output (to trigger the gong)
- Input: 8-12VAC from doorbell transformer
- Conversion: LM2596hv Step-Down Voltage Regulator converts AC to 5VDC
- Distribution: 5VDC powers both ESP32 and relay module
Doorbell Transformer (8-12VAC)
↓
LM2596hv Voltage Regulator
↓ (5VDC)
├── ESP32 Board (VCC + GND)
└── SRD-05VDC-5L-C Relay Module (VCC + GND)
Doorbell Button → GPIO4 (ESP32)
ESP32 GPIO19 → Relay Control Input
Relay Output → gong
- Ensure proper AC/DC isolation when working with doorbell transformer
- Test all connections before final installation
- Voltage Regulation: The buck converter must be precisely adjusted to 5V to prevent damage to the ESP32 and connected modules. Connect 8-12VAC to the input pins, attach a multimeter (set to voltage mode) to the output pins, and carefully adjust the potentiometer with a screwdriver until the multimeter reads exactly 5VDC. This may be readjusted when you switch to different input voltage.
- 4x Ruthex M3 Threaded Inserts
- 4x M3 Screws
- 6x Ruthex M2 Threaded Inserts
- 6x M2 Screws
Doorbell Input:
- Pin: GPIO4 with internal pullup
- Debouncing: 25ms delays to prevent false triggers
Relay Output:
- Pin: GPIO19
- Activation time: 1 second pulse to trigger the gong
- Control: global chime (gong) enable/disable setting
Network:
- Primary: Your WiFi network
- Fallback: Creates "Smart-Doorbell-Project" hotspot
- Captive portal for easy configuration
- Basic functionality runs without any network connection, to ensure that the doorbell works proberly in case of network outage
- Change GPIO pins by modifying pin numbers in YAML
- Adjust chime duration by changing delay value
- Modify debounce timing for different button types
- Add additional sensors or switches as needed
Enabled (Default):
- Doorbell button press → Relay activates → Chime sounds
- Green indicator in Home Assistant
Disabled:
- Doorbell button press → No relay activation → Silent
- Red indicator in Home Assistant
- Button press still logged for notifications
Device won't connect to WiFi:
- Verify
secrets.yamlcontains correct WiFi credentials - Check WiFi signal strength at installation location
- Ensure WiFi network is 2.4GHz (ESP32 doesn't support 5GHz)
- Look for fallback hotspot "Smart-Doorbell-Project"
Fallback Hotspot Setup:
- Connect to "Smart-Doorbell-Project" network
- Use password from
ap_wifi_password_sdbin secrets - Navigate to captive portal page
- Configure WiFi settings
Doorbell not responding:
- Check GPIO4 wiring and connections
- Verify button is normally open (closes when pressed)
- Test button with multimeter (should show continuity when pressed)
- Check ESPHome logs for button state changes
Relay not activating:
- Verify GPIO19 connection to relay module
- Check 5V power supply to relay module
- Test relay manually with multimeter
- Ensure "Doorbell Chime Active" switch is ON in Home Assistant
This project is published under CC BY-NC-SA 4.0.




