I've wanted to upgrade our basic plug-in doorbell to a smart video doorbell ever since I started playing with home automation. Finally, I've gotten around to replacing the doorbell with a UniFi G4 Video Doorbell!

So, it's out with the old:

Traditional wireless plugin doorbell
Traditional wireless plugin doorbell

And in with the new:

Why go for a smart doorbell?

There are two downsides to our current doorbell, which is a typical plug-in doorbell:

  1. It isn't smart
  2. It takes an annoyingly specific A23 battery which you use for no other purpose and requires replacing from time to time
  3. It chimes whenever the plug-in chimes are powered on

For some reason, whoever designed the doorbell decided the plug-in devices should chime when the chimes are powered on. The downside is that the doorbell will go off when the power is restored after a power cut. In most contexts, this isn't an issue, but a few times, we've been woken up in the middle of the night due to a brief power cut and the doorbell going off.

Whilst these are very much first-world problems, I've been making the house smart over the last couple of years, and as a result, there are a few ideas I want to experiment with now that the doorbell is capable of being smart:

  • Using Alexa as the doorbell chime
  • Turning on outside lights at night when the doorbell rings
  • Displaying the doorbell feed on our wall-mounted dashboard in the kitchen whenever the doorbell rings
  • Being able to use my noise-cancelling headphones when waiting for a delivery without worrying about missing the door

Why the UniFi G4 Doorbell?

I didn't do a huge amount of research when it came to which doorbell I wanted. However, there were two essential requirements that I cared about – local recordings and no subscription fees. But beyond that, most smart doorbells are similar.

Therefore, I decided to go with what fits with my existing ecosystem. Not too long after we moved into the house, I decided to redo the home network and upgrade it to a Ubiquiti setup; this included buying a few UniFi Protect G3 Cameras, which we use for CCTV. The existing UniFi setup is the main reason why I opted for the UniFi G4 Doorbell – I get local recordings, no subscription fees, and it works with the existing ecosystem.

Installation and Setup

The G4 Doorbell requires a 24V power supply – this was the main part of the installation process, as the previous doorbell was battery-powered. Fortunately, a loft area is just above our front door from which power is accessible.

The G4 comes with a 24V transformer which has been mounted in the loft with a power feed from this dropped down inside the wall to power the doorbell.

Once the doorbell was powered up, I opened the UniFi Protect app on my phone, which immediately popped up with a prompt to adopt the G4 Doorbell. Pressing "Adopt" was all I needed to do to get the doorbell adopted into my network.

Within Home Assistant, I'm already using UniFi Network and UniFi Protect integrations for my existing UniFi devices:

Home Assistant with UniFi Network and UniFi Protect integrations

As a result, Home Assistant automatically detects the new doorbell:.

G4 Doorbell Device in Home Assistant

The entire installation was straightforward. It would have been even easier if we already had a mains-powered doorbell as we would have been able to reuse existing wiring rather than running a new power feed.

Using Alexa as a Chime

If you have a hardwired doorbell chime, the G4 Doorbell comes with a device that lets you use your old mechanical chime with the G4 Doorbell. We don't have a mechanical chime, and I don't want to return to an older technology when we could use Alexa to announce when we have someone at the door!

alias: Doorbell
description: Doorbell
mode: single
trigger:
  - platform: state
    entity_id:
      - binary_sensor.g4_doorbell_doorbell
    from: "off"
    to: "on"
condition: []
action:
  - service: notify.family
    data:
      title: Door Bell
      message: There is someone at the door
  - service: notify.alexa_media
    data:
      message: There is someone at the door
      target:
        - media_player.james_s_echo_plus_2
        - media_player.office_2
        - media_player.master_bedroom_2
        - media_player.kitchen_2
      data:
        type: announce
        method: all

This automation actually does two things when the doorbell is pressed:

  1. Sends a push notification to all devices in our "family" notification group
  2. Uses Alexa to perform a text-to-speech announcement saying, "There is someone at the door."

Between these two methods, we'll know if someone has rung the doorbell. We have Alexa throughout most of the house, so it should be easy to hear if someone has rung the doorbell.

Don't miss the door when wearing headphones!

I have a pair of Bose QuietComfort headphones which I enjoy using when I want to get my head down and focus on getting some work done. However, using a pair of noise-cancelling headphones isn't necessarily the best choice if you're waiting for a package to be delivered.

With the old doorbell, I'd avoid using my headphones while waiting for deliveries. However, with a more modern doorbell, I wanted to see if I could:

  • Use my headphones even when waiting for a delivery
  • Know if the doorbell goes off even if I'm in the garden

My current automation for the doorbell sends a push notification and uses Alexa. However, there are two drawbacks to the push notification:

  1. I'm not always looking at my phone
  2. I can get a lot of notifications on my phone, so how can I reliably spot the doorbell notification from the noise of everything else

In an ideal world, when I'm wearing headphones, my phone would be able to read out notifications to me when I receive them. I currently have an iPhone, and technically an iPhone can do this. Annoyingly though, the iPhone will only do this with "compatible headphones". This list of compatible headphones is very limited; Apple-manufactured headphones make up half of that list.

Because Bose didn't make the cut of compatible devices, I needed a slightly different solution.

Fortunately, push notifications via the Home Assistant app can support custom sounds, and I can use a custom sound to help distinguish the doorbell from all other notifications.

Lacking originality, I used a copy of the Chime sound file made readily available via this unifi-g4-doorbell-sounds repository I found on GitHub.

The sound file needs to be imported into your device running the Home Assistant app:

Setting up custom notification sounds in iOS Home Assistant app

The automation then needs updating to include a data payload that specifies the sound file. I also decided to mark the notification as time-sensitive too:

...
action:
  - service: notify.family
    data:
      title: Door Bell
      message: There is someone at the door
      data:
        push:
          interruption-level: time-sensitive
          sound: "G4DoorbellChime.wav" 
...

The sound filename in the data payload must match the audio file's filename on your device.

Provided my phone isn't on silent, I'll be able to audibly distinguish the doorbell from other notifications when I'm using headphones, whether I'm in the house or the garden!

Dashboard Automations

In our kitchen we have a wall-mounted tablet that provides us with access to our Home Assistant dashboards.

One of our dashboards shows the video feeds for all of the cameras. Since getting the doorbell, I've also added the doorbell video feed to this dashboard.

Home Assistant - CCTV Dashboard
Home Assistant - CCTV Dashboard

I wanted Home Assistant to detect whenever the doorbell is rung and change the active dashboard on the tablet to the CCTV dashboard. As a result, if you're in the kitchen and the doorbell rings, it will be easy to see who is at the door because the tablet will respond accordingly.

The tablet that is being used for the wall-mounted dashboard runs Fully Kiosk Browser. Full Kiosk Browser has a number of REST APIs as well as a Fully Kiosk Home Assistant integration.

By enabling remote administration in Fully Kiosk Browser and adding the integration to Home Assistant, I can control what the kiosk app displays via Home Assistant automations.

Installing Fully Kiosk integration in Home Assistant
Installing Fully Kiosk
Configuring Fully Kiosk with credentials
Configuring Fully Kiosk with credentials

I can now amend my doorbell notification to so that whenever the doorbell is pressed:

  1. A push notification goes to all family devices
  2. Alexa announces, "There is someone at the door."
  3. The wall mounted dashboard is changed to display the CCTV dashboard

Putting all of this together, we end up with:

alias: "Doorbell"
description: "Doorbell"
mode: single
trigger:
  - platform: state
    entity_id:
      - binary_sensor.g4_doorbell_doorbell
    from: "off"
    to: "on"
condition: []
action:
  - service: notify.family
    data:
      title: Door Bell
      message: There is someone at the door
      data:
        push:
          interruption-level: time-sensitive
          sound: "G4DoorbellChime.wav"
- service: notify.alexa_media
    data:
      message: There is someone at the door
      target:
        - media_player.james_s_echo_plus_2
        - media_player.office_2
        - media_player.master_bedroom_2
        - media_player.kitchen_2
      data:
        type: announce
        method: all
  - service: fully_kiosk.load_url
    data:
      url: https://192.168.1.5:8123/lovelace/2
    target:
      device_id: a1b2c3d4e5f6

Light Automations

As we were going to the effort of fitting a doorbell that required hard wiring, we used this as an opportunity to update the outside lights we have on the driveway and in the garden.

Before and after comparison of video doorbell with outdoor lights

The new light fittings have been fitted with Shelly Duo GU10 RGBW bulbs which we can control through the Shelly integration in Home Assistant. Nearly all of the lights in our house are controlled via Shelly (you can read here about how I've used Shelly devices for Home Automation).

Whilst I'm yet to build any specific automations, I'm toying with the idea of turning on the driveway lights based on the time of day or when the doorbell detects motion.

Conclusion

The G4 Doorbell has been a great addition to our smart home ecosystem. When I first thought about making the doorbell smart, the original idea was just to use Alexa to announce that someone was at the door. But over the course of a weekend, I've found the potential is much greater than this, and I've been tinkering with Home Assistant and adding a number of automations as I've outlined above.

The use-case of keeping an ear out for the doorbell whilst in the garden or using headphones (which now seems obvious) only emerged this weekend, when I was in the garden and needed to listen out for the doorbell because my wife had gone out and she was expecting a delivery.

I've already started getting more automation value from a video doorbell than I had originally anticipated. I also like the idea that we will no longer be woken up in the middle of the night by a doorbell chiming when there is a brief power cut!