Video Doorbell Mechanical Chime Interface

Front Doorbell

After Completing some basic home automation / internet of things projects while home for winter break in January 2021 (Wi-Fi light switch, home assistant automation) my parents decided that more automation would be useful. We decided to replace the network equipment with 3 Access Points, a patch panel, rack and to add two video doorbells, to provide some level of surveillance and security to the home.

The challenge with installing two video doorbells, however, is at least the ones we chose (Ubiquiti Unifi G4 Pro Doorbell) do not support use of two doorbells with mechanical chimes on the same Transformer. Since I already had set up Home Assistant on the network for the Wi-Fi light switches, the obvious solution was to use an automation from the Unifi Protect Home Assistant Plugin. The Second half of the project – the part that makes the doorbells actually ring – was a little less straightforward. My solution was to create a custom controller, one that uses a ESP8266 microcontroller to connect to Wi-Fi and fire a relay ring the doorbell. An Engineers overly complex solution to a simple problem! The project still helped my skills with embedded systems and programming, which is helpful.

Doorbell Ringer

ESP8266 Relay based Doorbell Control. ESP8266 can be seen at the center bottom, 24VAC-5VDC power supply is on the left side, and Terminal String and relay breakout board are on top.

Doobell Ringer with cover

Doorbell Ringer with the cover on.

I installed the Doorbell Controller out of the way in the basement, next to the furnace. This is on the other side of the wall from where the basement doorbell chime is located so it was easy enough to tap into the wiring for the doorbells, a two conductor cable brings power from near the upstairs chime, where all of the wires originally terminated. A new three conductor wire I fished through the wall connects each of the doorbell to the chime ringer.

Schematic Diagram of the Doorbell Ringer system

Schematic Diagram of the Doorbell Ringer system.

From the schematic diagram you can see that all the ringer does is close the relay for a short period of time (150ms) to Complete the circuit and provide 24V power to the doorbells so they ring. PNP transistors connect the ESP8266 and relay breakout board because the relay board has an optocoupler circuit on board and the relays are in the on position when the inputs are sunk to ground. Status LED’s are also included on the front of the panel for diagnosis. The power switch on the front also only switches the 5V power, not the 24VAC power coming in.

Breadboard Detail

Detail of breadboard construction and AC/DC Power Supply.

It is also important to note that this is not an isolated power supply so the ground on the negative is not tied to ground.

HASS Python Script

Home Assistant Python Script.

The python script (above) is polls the website hosted on the ESP and rings the doorbell. Another method to complete this would have been using RESTful commands. The Script on the ESP8266 was programmed in the Arduino IDE in C++. The full code for both Home Assistant and the ESP can be found at my GitHub repository.

HASS Dashboard

Home Assistant Dashboard.

Doobell Automation

Doorbell Automation in Home Assistant.

Smart Switch

Smart switch change out.

My first foray into Home Assistant and Home Automation in general was this past January (January 2021) when I replaced a 15 year old programmable time switch that was worn out and broken with a TP-Link Kasa Wifi Switch. The TP-Link Switch was controlled by Home Assistant, which I installed on a Raspberry Pi 4. Home Assistant is an open source home automation platform that facilitates communication between many platforms, including Apple Homekit, and TP-Link Projects. The Home Assistant Server automates the lights, turning them on 30 minutes before sunset and off at 1am. This is also an improvement over the previous switch as it would require adjustment several times a year, when the seasons and sunset times change.

Hardware Rack

Desktop Server Hardware.

The present server that Home Assistant runs on is an old desktop computer. The server actually runs a VMware ESXI hypervisor with Home Assistant operating system operating inside of it. The Server also runs a pi-hole DNS ad blocking service and wireguard VPN on an ubuntu virtual machine and a plex media server on a windows virtual machine.

Doorbell Tranformer

The last large step for this project was changing the Transformer. The 16VAC 30VA transformer was not going to cut it to power two video doorbells, two doorbell chimes, and the Wifi Doorbell ringer. I upgraded the transformer to a 100VA 24VAC transformer.

Schematic Diagram