[UniFi Protect] Protect Unleashed Episode I | Adding UniFi Protect to Home Assistant

UniFi Protect products are powerful with motion detection, local storage and cloud independent operation. There are many reasons to choose UniFi Protect platform for home surveillance camera system. However, they do not support Alexa or Google Assistant voice control. They are not Homekit compatible. We cannot set scheduled recording. Excellent hardware but software is lacking. Should we wait and keep hoping someday Ubiquiti will add some of above features? The chance is slim. But you are not out of the luck. We can use Home Automation platform/system like Home Assistant to make UniFi Protect devices into not just real smart home device, but a genius one. In this new series I will share my personal experience how I am making UniFi Protect product unleashed using Home Assistant. The first in this series, I will talk about how to setup UniFi Protect integration with Home Assistant. The subsequent articles will talk about some of examples what you can do with unleashed UniFi Protect products.

Prerequisite

What do you need?

  • UniFi Protect device & controller
  • Home Assistant Hub

In this article, you will learn:

What’s Home Assistant?

Home Assistant (HA) was initially released on September 17, 2013. Similar to its competitions, this is a home automation software/platform designed to be a central control system for wide range of smart home appliances with emphasis on local control (ref). As of today, HA is considered to be one of the most popular local home automation platform. If anyone is serious about a home automation using local control, this is one platform you cannot ignore.

What’s home automation?

Let’s talk about Home Automation itself. Home Automation is an integration of various network connected so called, smart home devices to perform sequences of actions i.e. routine. Amazon’s Alexa, Google Assistant routines or Homekit’s automation function are the examples of home automation.

https://www.apple.com/ios/home/

For example, rather than voice control to just turn on the kitchen light, you can create automation such as when you say “good morning”, the blinds throughout home opens, multiple lights and TV in the kitchen turns on, coffee maker power turns on and unlock front door while turning off bedroom lights and living room fan.

Why do we need another home automation platform?

If big 3 already supports home automation, why do you want home automation hub/controller unit like home assistant (HA)? There are several reasons but the biggest reason are two forms of independence, platform and cloud. UniFi Protect users are most likely already conscious about cloud independence part. But the other part, platform independence is what you want here from HA.

Platform independence

We live in Apple ecosystem; however, my security camera system is UniFi Protect. Unfortunately, they are not compatible with Homekit. Using homebridge hub, I was able to make UniFi Protect to become Homekit compatible. This works really well and my Unifi Doorbell can make ring sounds to HomePod minis in low latency.

However, in my case we have other areas in home with Sonos speakers and not able to hear doorbell ring in those area. So the real automation I like to do is UniFi Protect Doorbell push to announce “someone is at the door” on all my Sonos speakers throughout home. In fact, I want to do this in Japanese.

This is where dedicated home automation hub like HA plays a role. HA acts as home automation controller/brain unit and ties otherwise completely independent products from different venders to integrates together and allows to make an automation.

How to add UniFi Protect Integration on Home Assistant

This article assumes you have working Home Assistant OS with HACS add-on. This is because UniFi Protect integration is available on un-official Home Assistant Community store. In order to install UniFi Protect integration on the Home Assistant, you need to do following two main steps:

  • Create local Home Assistant User Account on UniFi Protect for Home Assistant Integration
  • Install UniFI Protect Integration on Home Assistant

Create Home Assistant User account on UniFi Protect

Home Assistant needs to access UniFi Protect controller. For the security reason, you want create a dedicated user account for home automation device integration.

https://unifi.ui.com > Users 
Add User > Add Admin

Role: Limited Admin.

Account Type: Local Access Only.

Local Username and password are what you will be entering in subsequent step. I put “hassuser” as user name myself.

Controller permissions: I like to give minimal required privilege here. In this case, UniFi Protect “Administrator” here because Home Assistant integration can change UniFi Protect device modes.

Install UniFi Protect Integration

Now that you have UniFi controller integration account setup, you are ready to install the integration.

HACS > Integrations > Explore & Add repositories > Type UniFi Protect > Install
Configuration > Integrations > ADD INTEGRATION > UniFi Protect

You need to restart the system. Now this has added UniFi Protect to your official integration search list. You need to configure it.

IP address: I used UniFi Dream Machine Pro so the router address is the same as where UniFi Protect controller runs. If you use Cloud Key, this is Cloud Key’s IP address.

Port Number: Leave to 433 for Unifi OS.

Username & Password: I have created a new user on UniFi controller for home automation integration. Below is how I did this.

The rest of the set up I left as default. After submitting, each of UniFi Protect devices showed up. All I did at that point was assigned area/zone of the device, which you can do it later. In my case I only have UVC-G4-Doorbell and UVC-G3-Flex.

What’s next?

Now that you have unlocked full potential of UniFi Protect products, you can do all sorts of things including Unifi Doorbell ring to trigger Sonos text to speech announcement, making UniFi Protect devices to Homekit compatible, Alexa compatible, or schedule camera recording mode and others. Your imagination is the limit.