Ubiquiti Unifi Protect cameras

You do not need the Python server any longer, as long as you are running a current version of the Hubitat firmware. The functionality runs locally on Hubitat now.

1 Like

I was able to get it connected, my firewall rules wouldn’t let my Hubitat which was in my IOT vlan talk to my protect controller. Has anyone successfully got the cameras integrated into HomeKit? All my devices currently connected to Hubitat show as incompatible devices so there is no QR code to get the Hubitat bridge into apple HomeKit yet. These devices include ecobee and hue devices. I saw a potential restriction with Hubitats HomeKit integration in that it won’t integrate Wi-Fi or lan devices. Makes me think I should just use a Hoobs hub instead of a Hubitat hub.

Good question. I don't use the Hubitat HomeKit integration, but I remember some others talking about how community-developed drivers (such as my UniFi Protect drivers) could not be supported due to some restrictions.

Do you actually plan to use them with something in Hubitat, or is your end goal primarily to get them in to HomeKit?

Can you integrate your UniFi Protect system directly with HomeKit, perhaps by running HomeBridge on an external controller?

My goal is to get camera feeds into HomeKit so I can view in the home app. If I need to have a homebridge server running then I don’t see the benefit of Hubitat as I have mostly HomeKit devices except for a few such as UniFi protect, konnected security panel and a few others. Maybe I’m missing the benefit of Hubitat except for maybe the great rules engine. 2 main goals are having a great rules engine for automation (which apple doesn’t natively) and get some non-HomeKit devices into HomeKit. I’ve heard of people running Hubitat and homebridge together but why not just homebridge?

@bent1187 I use GitHub - koush/scrypted: Scrypted is a high performance home video integration and automation platform to display my Unifi cameras in HomeKit. I use docker on a Synology NAS. Works great.

2 Likes

Thanks for this! Do I need to run scrypted on a server like a raspberrry pi continuously?

This is mainly what I developed my Hubitat integration for -- for motion, smart detection, and doorbell press events in automations, as well as automation actions like snapshots and doorbell messages.

I use the video feeds directly in the UniFi Protect app when I need to view them.

Sorry, not sure if it runs on a raspberry pi, but I bet it does.

I run Homekit using the Hubitat Integration and with Homebridge running on my M1 Mac which is on 24 hours a day. If I am at home and connected to my wifi I cannot view the cameras using the Home app. All I get is a snapshot of the camera and the cameras will not go live. But if I turn off the wifi on the phone and just use my cell provider the cameras go live and work as expected. I have tried to figure out how to make these work when at home on my wifi but to no avail.
This is the Homebridge plugin that I am using.


This is the equipment that I am using.

It sounds like something is blocking local traffic between your UniFi controller, your homebridge host, and/or your phone. Since your phone can connect externally (presumably via cloud/internet), I'd start looking at vlan routing rules that affect your phone.

Thanks Tom, I have tried and tried to get this to work with no luck. I think I need someone smarter than me. LOL

1 Like

Hi @oakweb, it seems from your other thread that you're having issues with child device creation.

Please enable logging on your UniFi Protect Controller virtual device and save, then let me know what appears in the Logs output.

Are you using a local account on your UniFi OS console? Make sure you grant that account permissions for the Protect app.

Thank you! here is the output

2023-07-10 10:09:18.135 PMerrorjava.lang.ArithmeticException: Division undefined on line 1320 (method ReceiveData)

I added local credentials to be same username and password as account I made (with full management access) as well

I also see this

  • WebSocket Status : Failed - Requires a manual login to reset

Thanks for the info! Based on those lines, I think you are actually using a different integration.

If you want to use mine, please install hubitat_unifiProtect from HPM and create a virtual device of type UniFi Protect Controller and try that.

1 Like

I uninstalled that one, I have hubitat_unifiProtect installed too. Maybe it was effecting it, I'll get some new logs and see what happens

Trying to uninstall all other Unifi apps in HPM, and reinstall hubitat_unifiProtect. I got an error on uninstalling " Unifi Protect Drivers " one, hopefully that doesn't effect. I guess if those are just drivers I could just delete manually.

It probably couldn't uninstall because you still have a virtual device associated with one of the drivers. Just a hunch.

My advice would be to delete the existing virtual devices and create a new one. Make sure you choose the UniFi Protect Controller type if you want to use my integration (hubitat_unifiProtect).

Thanks, got them all uninstalled and started fresh. Put the same login that worked before and received these errors now:

dev:2682023-07-11 03:42:15.542 PMdebuginitialize() failed: Illegal character in authority at index 8: https:// 192.168.1.1/api/auth/login

dev:2682023-07-11 03:42:15.540 PMdebugrefreshCookie() failed: Illegal character in authority at index 8: https:// 192.168.1.1/api/auth/login

dev:2682023-07-11 03:40:42.011 PMerrorjava.lang.NullPointerException: Cannot get property 'cameras' on null object on line 252 (method createChildDevices)