One of the top wishlist on UniFi protect line for me is its integration with major smart home platform (Alexa, Google Assistant, or Homekit). However, we are not entirely out of luck. In fact, today I will show steps to integrate UniFi Protect products into Homekit.
In this article, you will learn:
- What is Homekit?
- What can we do with Protect devices on Homekit?
- UniFi Protect to Homekit Integration Guide
What’s Homekit?
Homekit is Apple’s smart home platform as to Alexa on Amazon platform or Google Assistant for Google platform. Homekit compatible devices will be listed on the Home app on iOS device or MacOS.
With the Home app, you can easily and securely control your HomeKit accessories from all your Apple devices. Turn off the lights, see who’s at the front door, adjust your living room temperature, turn up the music, and so much more. And with the new HomeKit Secure Video capability and HomeKit‑enabled routers, it’s all even more secure. The Home app makes all your connected devices work harder — and smarter — for you.
https://www.apple.com/ios/home/
Homekit integration means these devices may be controlled via Siri and may be put part of automation.
What can we do with Protect devices on Homekit?
I only have two UniFi protect devices at this time, UniFi Doorbell and UniFi Protect G3 FLEX Camera. Here are things I can do with these devices in my home setup by integrating with Homekit.
Digital Chime Function
The doorbell ring now plays chime sounds on all my HomePods. So I can hear the chime even in the basement. This is key reason I decided to put this integration because my mechanical chime won’t ring with G4 Doorbell after I put presumed capacitor on the mechanical chime, but I have to have it; otherwise, mechanical chime worked but with cold temperature, it started to make buzzing sound.
Stream videos on Home App
Rather than opening UniFi Protect App, I can see UniFi live videos through Home App. This is at the reasonable response speed. For G4 doorbell, it is on average 2-3 second before live video streaming starts vs. G3 Flex 5-8 seconds, sometimes faster. These are actually similar to my Arlo wireless camera, which have official Homekit support via its own Hub.
Homekit Automation Potential
For me, digital chime to HomePods is really only function I cared. But the real potential of smart home platform integration is automation. I can use FLEX camera’s motion sensor to trigger HomeKit compatible light to turn on when the motion is detected. I can perhaps set up such that doorbell push to trigger turning foyer light on.
UniFi Protect to Homekit Integration Guide
General steps
- Setup Homebridge Hub
- Create UniFi Protect User Account for Homebridge
- Install & Setup UniFi Protect Plugin in the Homebridge
- Register Homebridge to Homekit
- Setup Homekit
Step 1: Setup Homebridge Hub
“Homebridge” is the key for this process. This is an app that creates a virtual “bridge” device for otherwise, non-Homekit compatible device.
Homebridge can be installed on multiple different systems: macOS, Windows 10, Raspberry Pi OS, Linux, Docker and others. Here I have initially tried docker on my Qnap NAS server, but I had faced a strange but critical issue for my use (not able to play chime on HomePods). So I have installed dedicated Homebridge to Raspberry Pi 3B unit. If you want to install homebridge to other platform, check official website and follow instruction (here).
In fact, if you use dedicated Raspberry Pi for Homebridge (as I do), one can look this step as creating Homebridge Hub device analogous to officially supported Homekit Hub devices like for Phililps Hue bridge, Arlo Basestation etc.
For Raspberry Pi installation, it is relatively straight forward.
- Download Homebridge Raspberry Pi Image
- Flash the Homebridge Rasberry Pi Image to microSD/SD using Etcher app.
3. Insert the microSD/SD to the Raspberry Pi unit.
4. Connect the Raspberry Pi unit to network, which can be done either via Ethernet or WiFi (as long as your Raspberry Pi unit support it).
5. Access http://homebridge.local
Default user ID and password are “admin” and “admin”.
Step 2: Create Homebridge User account on UniFi Protect
In this step, we will be creating UniFi Local Access account so Homebridge can use that account to access UniFi Protect controller.
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 “homebridge” as user name myself.
Controller permissions: I like to give minimal required privilege here. In this case, UniFi Protect “View Only” is all it needs.
Step 3: Install & Setup UniFi Protect Plugin
Now that we have Homebridge running and UniFi Local Access user account created. We need UniFi Protect plugin added to the Homebridge. Go back to Homebridge admin menu (http://homebridge.local).
Plugins > Type UniFi > Install Homebridge Unifi Protect
Choose the verified, “Homebridge UniFi Protect” and click install. Of note that there is similarly named “Homebridge UniFi Protect Platform” but it does not have verified status and not as frequently updated as verified one. So I have chosen to use verified one.
Homebridge UniFi Protect > SETTINGS > UniFi Protect Controllers
Controller address: Local IP address where UniFi Protect controller can be accessed.
*In case of UDM Pro, this is the same as router/gateway IP address.
Controller User Name & Password: These are what you have setup up on UniFi e.g. homebridge for user name in my case.
Step 4: Register Homebridge UniFi Protect to Homekit
This step is simple. Homebridge admin menu has Homekit code. Using it you will add Homebridge as bridge device to Homekit. This is as simple as go to your iOS device e.g. iPhone and open Home app, then add accessory. The HomeKit code is on the main page (Status page) of Homebridge. So scan it via your phone camera.
Child Bridge Setup (Optional)
The current version of Homebridge supports “child bridge” feature. This feature allows each plugins in the Homebridge to register as their own/isolated bridge. I have mine setup as such. On Homebridge, go to plugins page.
Plugins > Config icon > Bridge Settings
Turn the UniFi Protect “on” and save. You will need to restart Homebridge.
After restarting, you can go back to the same screen as above but now you will see Homekit code. You can add the accessory on iOS using the code.
Step 5: Setup Homekit for your liking
At this point, your Home app should have all UniFi Protect devices. That’s right. You do not need to select individual devices. Above steps will automatically register all UniFi Protect devices.
If you like to use Doorbell push as a trigger event for Homekit automation, you need to turn one option “on”.
http://homebridge.local > Plugins > Homebridge UniFi Protect > Settings > Plugin Feature Options > Add "Enable.Doorbell.Trigger"
Click Save.
Now you can go to Homebridge Accessories and confirm it has added an new entry Doorbell Trigger as a switch entry. This will also show up on Home app. In fact, you can actually click the Doorbell Trigger switch icon on Homebridge Accessory menu and this should trigger Homekit event e.g. HomPod ring.
If you want to know what other options you can turn on/configure on the UniFi Protect Hub, you can check the developers official GitHub website.
Troubleshoot
- Unable to see any of UniFi Protect device
- No Protect device listed under the Homebridge accessories
- No HomePod chime trigger
Situation: Unable to see any of UniFi Protect device
Background: “Homebridge UniFi Protect” plugin automatically pulls all devices into Homebridge. Then, Homebridge registers to the Homekit as a bridge device where it contains all the Protect devices.
Assessment:
- Ensure Homebridge lists all UniFi Protect devices.
- Ensure appropriate bridge instance of Homebridge is registered to the Homekit.
Recommendation:
- Check homebridge link is working.
http://homebridge.local > Accessories
In this screen, you should see all UniFi Protect accessories.
2. Check bridge registration.
Home app on IOS > Home Icon (right upper corner) > Home Setting > Hub & Bridge
You should see Homebridge’s bridge instant added here. If you created isolated bridge for UniFi Protect of its own on Homebridge, you must make sure that “bridge” is added.
Situation: No Protect device listed under the Homebridge accessories
Background: “Homebridge UniFi Protect” plugin accesses UniFi Protect controller using user provided credential and once connected automatically retrieves all devices into Homebridge.
Assessment:
- Ensure User ID, Password and granted privilage for UniFi protect controller access is correct.
- Ensure you have selected proper UniFi Protect plugin, which is named “Homebridge UniFi Protect” (verified) not the similarity named “Homebridge UniFi Protect Platform”.
Recommendation:
- Check homebridge bridge states menu.
http://homebridge.local > Status
In this screen, you see log of what’s happening on the homebridge. If log in to the UniFi Protect is failing for some reason, this should be shown here.
2. Check bridge registration.
http://homebridge.local > Plugins
Installed Plugins will be listed here. As you can see in my case below, Homebridge UniFi Protect instant with verified mark on the right.
Situation: No HomePod chime trigger
Background: Steps involved here are doorbell push > Homebridge trigger > Homekit trigger > HomePod rings.
Assessment:
- Ensure doorbell push on UniFi Doorbell is properly functioning
- Ensure HomePod chime setting is turned
- Ensure Homebridge to Homekit trigger is working
Recommendation:
- Check UniFi Protect app trigger
UniFi Protect doorbell notification should be popping up so long as you have notification on UniFi Protect turn on. If this is not working, then the issue may be on the UniFi Protect/Doorbell setting themselves.
*I am not sure if we turn off Doorbell push notification on UniFi Protect can still trigger Homebridge event. For redundancy, I have mine turned on.
2. Check HomePod chime setting.
iOS Home App > UniFi Doorbell > Notification > HomePod Chime > check HomePods
3. Check Homebridge to Homekit trigger connection
Enable doorbell trigger option if you have not done already.
http://homebridge.local > Plugins > Homebridge UniFi Protect > Settings > Plugin Feature Options > Add "Enable.Doorbell.Trigger"
After it is turned enabled, click Doorbell.Trigger switch icon on the Homebrige. This should trigger Homekit notification on iOS device and if all working HomePod chime ring.
Somehow, I had this strange issue myself where HomePod was not ringing while Homekit notification on IOS working. After enabling this feature and clicking the switch once from Homebridge, all started to work suddenly.
Final thoughts
In this guide, we have actually set up Homebridge Hub. This is an universal Hub for many non-Homekit compatible platforms/devices. So you may have other non-Homekit compatible Wi-Fi devices that may have Homebridge plugins. For example, I have recently purchased Chamberlain MyQ Garage door opener. This can be made into Homekit compatible, only if I purchase additional device, myQ Home Bridge ($69.99). So I’ve searched for myQ plugin on Homebridge and indeed I found it. With it turned on, I have fully Homekit integrated myQ Garage door opener i.e. saving of $69.99. You can try search on homebridge official website or plugin menus within homebridge for more potentials.
Considering how well homebridge UniFi Protect plugin works, I truly hope Ubiquiti will have its own native Homekit support along with Alexa and Google Assistant. Such feature alone can put UniFi Protect product line into whole new dimension for general consumers in competition with Netgear Arlo, Eufy and Netamo while providing benefit of local storage.