A smart doorbell is a convenient and innovative way to enhance your convenience and home security and find who is at your door, even when you are not at home.
Using two ESP8266 boards, we will build a fully functional Wi-Fi smart doorbell that integrates with Home Assistant smart home automation software and sends push notifications to your smartphone whenever someone rings the doorbell. This works both locally and remotely.
Things You Will Need
You will need the following components to build the DIY Wi-Fi smart doorbell.
2 x ESP8266 microcontroller boards, such as NodeMCU or D1 Mini, will serve as the brain of the doorbell
Doorbell switch
Micro USB power supply
DFPlayer Mini (MP3 player module)
microSD card (512MB or larger)
2W or 3W (1" or 2" wide) speaker for the sound output
Also, edit the Wi-Fi SSID and password secrets with your Wi-Fi name and password. Make sure where you are going to install the smart-bell-speaker and smart-bell-switch has decent Wi-Fi network coverage.
Choose Manual download. After the compilation, the firmware will automatically start downloading. Save both firmware on the Desktop.
Step 2: Upload MP3 Sound Files to a MicroSD card
Take a small-capacity microSD card (as low as 512MB will work). Connect it to your PC. Download your favorite bell sounds from the internet, or you can record your own or your voice, and save them as MP3 files on the microSD card. Make sure to name these files as 1.mp3, 2.mp3, etc.
Step 3: Flash the Firmware to the ESP8266 Microcontroller
To flash the firmware, connect the NodeMCU or D1 Mini to the PC using a micro USB cable and then follow these steps:
You can use jumper wires to make these connections and use a soldering iron to connect the speaker to the DFPlayer (MP3 player module).
Once everything is connected, use two jumper wires (male to female) and connect them to the smart-bell-switch ESP8266 board. You need to connect one wire to the D2 pin on the NodeMCU or D1 Mini ESP8266 board and another to the 3V or 3.3V pin. Then connect the other two ends to your traditional push-button bell switch, as shown in the diagram below.
Similarly, power on and add the smart-bell-speaker device to your Home Assistant.
Step 6: Create Automation for Custom Bell Sound and Push Notifications
To enable push notifications for your smart DIY Wi-Fi smart doorbell, you need to create an automation in the Home Assistant. To create, one, follow these steps:
In Home Assistant, go to Settings > Automations & Scenes.
Give the automation a name and then click Save again.
For push notifications on your phone, install the Home Assistant app on your smartphone, sign in to your Home Assistant, and then click Add Action in the automation window.
Select Call Service and choose Notifications: Send a notification via mobile_app_YourPhone.
Type a message that you want to receive in the notification and click Save.
If you now push the doorbell button, the bell sound will play from the smart-bell-speaker. You can check the logs for more details if automation is working.
Building your own DIY Wi-Fi smart doorbell using ESP8266 microcontroller boards and Home Assistant is a rewarding and cost-effective project.
Once the basic functionality of the DIY Wi-Fi smart doorbell is working correctly, you can add a CCTV IP camera, and integrate with Home Assistant using Frigate NVR to create advanced home automation and improve home security. You may also integrate a PIR sensor or a touch capacitive sensor instead of a traditional doorbell switch. The possibilities with Home Assistant are endless.