DIY Smart Doorbell using Wemos D1 Mini
Smart doorbells are fun and useful to have but they are usually expensive. In this video, I will show you how I upgraded a typical doorbell and connected it to Home Assistant in a non-invasive way - for cheap!
Components used (Amazon links - affiliate):
- Wemos d1 mini - US: Amazon.com : wemos d1 mini - Canada: Amazon.ca : wemos d1 mini
- Mini Voltage Regulator - US: https://amzn.to/3daQP9q - Canada: https://amzn.to/2BerBtA
- 1N4001/4007 Diode - US: Amazon.com : 1N4001/4007 Diode - Canada: https://amzn.to/3eadLHc
- 50V 680uF Capacitor - US: Amazon.com : 50V 680uF Capacitor - Canada: Amazon.ca : 680 Capacitor 50v
- Monoprice 3D printer - US: https://amzn.to/3eb0oqe - Canada: https://amzn.to/2USNQwh
- Perfboard - US: Amazon.com : Perfboard - Canada: Amazon.ca : perfboard
- Screw Terminals - US: Amazon.com : pcb screw Terminals - Canada: https://amzn.to/2BhTu4c
I powered the d1 mini using the doorbell AC power supply after I converted it to DC then used a reed switch connected to D5 to detect the doorbell chime as shown in the schematic below.
Most doorbells are powered by a 21 volt AC current. To get a DC current, I first passed it by a diode and then added a 680micro farad capacitor to smooth the output. This is called a half bridge rectifier. Last step was to add a buck converter to drop the voltage down to 5v.
Now that the circuit is ready, it was time to put it all together. I used a 3x7 perfboard and mounted all components according to the schematics. I tested everything to make sure the 21 volt AC current is converted into a 5v direct current. Once everything looked good, I cut the extra perfboard area.
Next, I printed a small case to easily mount it: WEMOS D1 Mini Bumper Mount by Mitzpatrick - Thingiverse
Back at the laptop, I connected the D1 mini to load Tasmota. Next, I followed a typical Tasmota setup to connect it to my network. Once the device was connected, I updated all the settings though the console. You can find the full command line here. Just make sure you update the MQTT IP address and the credentials.
Next, it was time for the integration.
Before I started, I disconnected the power. Attaching the device to the doorbell was easy: (1) I removed the cover, (2) attached the device to the wall using screws, (3) connected the power wires, (4) attached the reed switch using double sided tape (5) and put back the cover.
Back in home assistant, I opened the configuration file and added a new MQTT sensor, saved and restarted. The code is in the description. After I saved, I restarted home assistant.
This doorbell sensor can be used to trigger alerts or any other Home Assistant automation!
I configured it so it sends me an alert and shows me a stream from my security camera on the TV when someone is at the door.
I hope you find this useful!
Thank you for reading!