Custom Component: Unifi Protect

When enabling realtime metrics and it says will increase cpu, is that CPU on the device running Protect or is that the CPU running Home Assistant?

Home Assistant. It just makes it process all of the Websocket messages from UniFi Protect instead of filtering a ton of them out. Processing the messages takes CPU.

Thanks so much! I have plenty of cpu to spare on my HA install. Hoping this helps with automations I running off person detections from my G4 cameras. They are good but seem to have a couple of seconds of lag.

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.

Regrading the HACS Repo (post 2022.2.0)

The HACS repo and HACS version of the integration is now deprecated following the release of 2022.2.0. The HACS version and repo will stay around until at least the 2022.4.0 release of HA. Please follow the migration instructions to get onto the HA core version before that time.

Reporting Issues

We have disable reporting issues to the HACS Github repo for the unifiprotect integration. If you have an issue you would like to report for the unifiprotect integration, please make you are running the HA core version of the integration provided by 2022.2.0 or new and then report your issue on the HA core repo.

If you would still like to discuss the HACS version of the unifiprotect integration, feel free to use the dicussions section or the HA Community forums thread.

3 Likes

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

Instructions updated everything. Thanks for pointing out the confusion.

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!

Delete config/deps/pyunifiprotect to remove the conflicting dep. Then restart HA.

And make sure you also remove the HACS version before restarting as well. If you are coming from a version older then 0.11.x. you will need to rollback HA to 2021.12 and upgrade to at least 0.11 (preferably 0.12) test everything and then upgrade to 2022.2.

Since you missed the deprecated notice, please make sure you also review the 0.11.0 patchnotes as a lot of things were deprecated and removed for the HA core version.

1 Like

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.