Ubiquiti UniFi Video and Protect NVR Integration

Ya now they all look like this

Pretty sure in classic I had no issues with anything ever

One thing that may have changed since it worked great was, I setup monocle cam so alexa can pull these cams up on tvs and shows via rtsp(?), if anyone knows if that affects the integration I guess I’ll have to choose which is more important

hi @Joe_Mcnelly, the motion detection works really well for me and 100% accurate so might be worth revisiting your config as the device handler code was updated at least once this year. The only errors I get in the logs are

and these occur for every camera and there is a specific reference to it above from @cvincent. Would be really great to have the camera snapshot working too though as it did in the classic app.

1 Like

Hey, I am all new to this Smartthings world… Can anyone tell me how to install this to my ST Hub ?
Is there a guide somewhere ? Youtube video maybe ?

Hi everyone - so I recently moved to UniFi protect and I’m trying to implement this but I’m not having any luck. My SmartThings hub (v2) and cloudkey gen2+ (with protect) are on the same subnet. I also set up a SmartThings specific username/password to use for this with admin rights on protect. After waiting, I’m still not seeing the cameras populate in the devices menu. Any thoughts?

I switched to UniFi last year and all my Smarthings stuff worked just fine. But that has nothing to do with Protect cameras.
Do you have your ST on a VLAN?

Hi @Syswatch, try these links…

Overview here https://github.com/project802/smartthings/blob/master/UniFi_Protect.md

Code here https://github.com/project802/smartthings/blob/master/smartapps/project802/unifi-protect.src/unifi-protect.groovy

Yeah unfortunately Protect is a separate system. But yes, same subnet/VLAN - the cloudkey can reach the hub no problem

I had Unifi Protect working fine on Smartthings up until the release of the new firmware for the UKC-G2+. Now I can’t get it to work. Anyone else have this issue?

Have you have just done the upgrade from v1.1.13 to v2.0.24 as I was just about to give it a go ? Did the camera status go offline in SmartThings or has motion detection stopped working ?

Yes, that is the upgrade I did. The cameras ceased detecting motion. I tried deleting them and re-installing. They now never populate. I deleted the smartapp and re-installed as well. I am guessing it has something to do with the login, since that changed with the new Protect firmware. They now use a single log-in for both “Protect” and “Network” as well as added some other items.

Just stumbled upon this and was very eager to give this try.
I understand this was developed years ago and also not meant for the new ST app but was really hoping to maybe even just be able to have the cameras show up and be able to view (I wouldn’t mind at all if there was no integration with motion, etc.)

I’ve added the SmartApp and Device Handler and have it published for myself.
I’ve added the SmartApp in the SmartThings app but doesn’t seem to work.
Checking the LiveLogging, this is what I get is an error logging in:

error nvr_loginCallback: unable to login. Please check IP, port, username and password. Status 404.

I’m running Unifi Protect on the UDMPro.
I’m pretty sure about my login/password. The IP used was the IP of the UDMPro (
I had the smartthings hub on a separate VLAN (10.0.63.X) from the UDMPro, but have also tested this with it being on the same VLAN (10.0.3.X) as well.
The Protect Cameras are on a separate VLAN (10.0.10.X) as the main network where the UDMPro is but UniFi Protect runs properly and has no issues viewing the cameras this way.
I kept the port as the default.

1 Like

I am also hoping this will work with the UDMPro but not having any luck. Did you notice he said must be a local login? In the edit user section you can add a local username and password.

My Protect NVR is doing the same thing. It seems as though Ubiquiti changed the way local connectivity works. If I go to http://mynvrip:7080 I just get an unrecoverable error that keeps reloading. If I go to https://mynvrip/protect I get the local login. It won’t let you connect locally without https.

I have not yet upgraded my hub to v2.0.27 ( still on v1.1.13) and I added a new G3 camera last week. There was a slight delay before it appeared but it is now configured and working (motion detection only as snapshot has never worked in new SmartThings app) so looks like it is definitely the new firmware causing issues.

Ok I got this working in some sort of way, but you will need a pi or machine to run docker.

Go here and set this up:
Make sure you get the correct build.

In the yml file make sure you update the ip for your UDM or NVR and add a second port under the ports config

  • 5080:80

In the Unifi Protect Smartthings app put in the IP of the docker container and port 5080. Make sure you are using a local username and password.

So far it found the cameras, but only motion works. It is very reliable for me.

Had to upgrade eventually due to other issues and it is now broken as expected :frowning: . Anyone had any luck with finding settings or a workaround that fix it in the SmartApp now the http local login has been removed ?

@cvincent do you have a view on whether the new UniFi OS / firmware for UniFi protect can now be integrated with SmartThings using an App & Device Handlers or is this now impossible ?

Has anyone found a different IOT hub that works with UniFi Protect even if it just for motion sensing !

Cheers Rob

HomeAssistant does not require any additional devices. It makes a direct connection to the protect controller.

Agreed. local login can be setup but unfortunately there does not appear to be access to the ‘protect API’ via http (default port 7080) anymore which I think is required for this SmartApp to operate. I would love to be wrong :frowning:

i did some hammering on this based on some documentation i found.
the homebridge kit has a plugin that does what we want, homebridge-unifi-protect/ProtectAPI.md at master · hjdhjd/homebridge-unifi-protect · GitHub also some documentation was available for the controller, products:software:unifi-controller:api [Ubiquiti Community Wiki] . i made several code changes to this project and while i was able to send commands and seemingly get authentication at the UDM, the smartthings hub does not ever acknowledge the response. The hub seems to have very limited ability to communicate (NONE?) over https and the UDM devices all require https that injects an auth key through an api. there MAY be hacks or work arounds to get communication, that would be far beyound my ability to fix broke shi…stuff.