Custom Component: Unifi Protect

Oh yeah one more thing, I have cameras that I have removed from protect yet reloading/restarting the protect integration doesnt seem to remove them? Known?

As @AngellusMortis wrote another place in this thread:

If you delete the Integration and re-add it, they will be gone.

I have everything installed am getting notifications with snapshots sent to the iOs app, but I get no actions. Not sure what I am doing wrong.

Posting this in case anyone else has the same problem I did, I tried the upgrade 3 times and on each occasion, I needed to reconfigure Protect from scratch. Worked out I misunderstood the instructions. Point 2 tells you to ’ Remove your HACS unifiprotect integration’, you need to remove it from HACS not from ‘Integrations’ :slight_smile:

1 Like

I should have said, migration was flawless. Thank you so much to everyone who has been involved in both the creation of the Custom Component and the work in porting it over to core. Amazing work!

6 Likes

Looks like I’m in a bit of bother here.

I already updated to Home Assistant 2022.2.5 and now I see the Protect is depreciated in HACS and moved to core. The instructions clearly say:

" You must remove the HACS integration efore upgrading to 2022.2.0 first to prevent a conflicting version of pyunifiprotect from being installed."

So where does that leave me? How to proceed?

I don’t mind clean deleting and reinstalling if needs must, as I’m currently only using the integration for the G4-Doorbell in one automation. I just need it to work.

Cheers!

Thanks for the tips, just getting around to this point now. So I’m on 2022.2.5 as you know, and I’m now running HACS Protect version v0.12.0 (I upgraded from v0.11.4 as per instruction).

I don’t appear have any pyunifiprotect file in the deps directory (nothing in there in fact). I also did a search for the pyunifiprotect file $ find . -name "pyunifiprotect" , but didn’t return anything either.

I am in the same boat as you. I upgraded before deleting the HACS integration. The integration works, however, the ‘person’ detection doesn’t seem to be functioning.

On the Unifi app, I am getting accurate ‘person’ smart alerts, however, the object_detection sensor in the official integration doesn’t seem to be pulling in. Any thoughts?

Not often, but sometimes, I get notifications of movement on one of my outdoor G4s without Unifi showing anything in their app. So I get false alerts often (maybe always) with the object detected as “None” and no thumbnail attached.

Any idea why that might happen?

@AngellusMortis Happy Sunday sir. Hoping you can assist with getting Protect cameras integrated with the RtspWebrtc addon.

I kept getting stream errors once I added any of my Unifi cameras. After some playing around, I realized that when I edited the camera links in the RTSPWeb server addon, it was displaying the rtsps link. I always assumed the Protect integration used the non secure rtsp:// urls for the streams. I don’t believe that rtsps streams are compatible with webrtc.

Is there any way I can have the Protect integration use the rtsp stream instead? I realize that I can manually create these entities myself but it just feels unnecessary since I already have the streams being pulled in via the is awesome Protect integration. Any advice?

Use insecure ones which are disabled by default.

Thanks for that. Didn’t know there was a separate disabled camera feed.

Unfortunately I gave up on the addon once I realized it doesn’t support external access to the cameras without jumping through hoops. Reverted to the AlexxIT custom component.

Can I ask a question? How much delay you are seeing on Lovelace dashboard while these cameras are loading?

So I went ahead and deleted the HACS integration and rebooted HA as instructed. Protect was automagically added to the official integrations after rebooting. Nothing to worry about in the end. All working well (so far). Still no “pyunifiprotect” to be found no my system though.

Hmm, you’re right. Doesn’t appear to change state i.e. “none”.

From the patchnotes link @AngellusMortis provided, it does mention this as a “new” addition.

NEW: Added Detected Object sensor for cameras with smart detections. 
Values are none, person or vehicle. Contains event_score and 
event_thumb attributes.

Can’t really add much more than that to be honest. Please let us know if you get any further.

Anybody notice the feeds seem slower to load on the native integration vs previously on HACS? My cameras and HA are all hardwired so it’s not a wifi issue. I do have the high resolution rtsp feeds enabled but again, they were instantaneous on HACS. I can’t really quantify the slowness as consistent, sometimes just takes 5-15 seconds to load a stream now.

It might be because of the new stream encoding they added in 2022.2. It might take longer to load but should have lower latency. Not as good as Webrtc in my testing but much better than before 2022.2


We now enable Low Latency HLS (LL-HLS) by default to lower stream latency, thanks

Shout out to everyone involved in the core add-in! Installed and everything is working perfectly for rules detecting person and vehicle notifications! Am able to create all my rules and alerts!!! Even have internal camera’s enable/disable security mode via geofencing.

UI screwed the pooch when taking away multiple schedules to a single camera. But that is where this HA add-on comes in.

Next steps for me, to work in snip-its with the notifications.

I am trying to use motion detection to trigger lighting. It works great for about an hour, after that, it seems that most of the motion events are missed by HA and the lights do not activate.

Any tips on how how i can fix this.

@Quaface probably need a bit more information. To start, open the developer tool and filter the entities down to the motion sensor in question. Then select the info icon to see the history of activities. If you need to focus on a shorter period select ‘Show more’ and change the start and end date/time to focus on whatever period you need. Using this you can see if the motion sensor if failing or no longer detecting motion or it’s something else.