Yep, it's a bummer that the external server is required. I'm not sure if Hubitat could handle the load (though I presume it could) -- there's no way to test because the necessary libs aren't available.
Just to be clear in case lines got crossed in this thread: the UniFi Protect driver requires the external server, but the UniFi networking driver (aka UniFi SDN previously) is all local to Hubitat.
Maybe it is true that someone who made the investment into UniFi stuff is probably savvy enough technically and doesn't mind the few extra $$ to have something to co-process with. But it would be nicer to just install, configure(), and go.
I tried to structure my driver interaction with the external server so it would be easy to swap out a Hubitat-based version if it became available. I'd be happy to beta test and switch my code over if it would help.
One quick thought -- this is still "local" (meaning no internet/cloud interaction), but it's not running natively on Hubitat. I think that's clear, but just wanted to state it.
Totally. Sorry, wasn't saying it wasn't local. Was emphasizing the "win" rather than the local. =)
Seem to have it up and going. Sweet. Now if I could just get Juicebox to have native support for local energy reporting, I could hear down my HA install. =)
fwiw, to get things working with pm2, I had to do:
pm2 start /root/server.py --interpreter python3
instead of the first line being just "pm2 server.py".
It would error if i just did that. and without the "--interpreter python3" I would an error (because my Pi defaults to python2). Obviously note that I have server.py in /root. YMMV there.
Hmm... now it doesn't seem to be working. Need to poke more...
okay, no, it was opening port. Had to seemingly click "initialize" in the parent device and that seemed to get it going. Watching the pm2 logs was helpful.
I have UniFi G4 Cameras to get the feed on to my dashboards I have enabled rtsp and then run a docker on my nas that has the command line version of Vlc setup to take an rtsp stream and output an mjpeg stream - its working fine and doesn’t use much resource on the nas .. I’m sure a pi would run this too..
Quick note- with some feedback and testing help from @markbellkosel84, I made some improvements to enhance uptime of the system. I recommend that everyone updates to version 1.2.2 via HPM or manual installation.
Only the UniFi Protect Controller driver is affected, and once you update the code please run Initialize once to kick the new changes into action.
Also thanks to @ogiewon for an excellent model on managing connection status to help ensure uptime.
Hi all. I love your work. I have a quick question. I was able to get my unifi camera to work great, thanks to the amazing instructions. I can capture the image under the device page. My question is how to do I get this image to display on a dashboard, and even better how can I get this integrated with sharptools? Anyone have any ideas? Thanks!!!
You'll need to set the image size to be dashboard friendly. Then in the dashboard select the device and attribute template. Then you'll just select the image attribute.
Any idea - For motion events using the G4 Protect Doorbell, is it using the camera, PIR sensor, or both?
I'm thinking of setting up an automation to turn on my porch lights for a motion event, but would only like to do that using the PIR sensor as the camera detects motion if a car's headlights hit my lawn.
Funny enough, I've just installed my G3 Domes outside and I haven't seen a false motion event yet. They've made a big improvement with Protect 1.18 (beta) on that front.