Custom Component: Unifi Protect

Are you planning to update the Smart Detection Blueprint as well? Just curious as I’m assuming this will break the existing one.

How ungrateful, I just realized all of the clips from UniFi Protect are available in in the Media section in HA. Thanks!
All the pieces for my desires are available.
Does anybody have a card that can browse media so I don’t have to navigate away from a security lovelace page for example?
I’d love to have a card for a live camera view and a card to view the clips which are already available in HA.
Thanks if anybody has a card that can show the media browser.

Truly wish there was as well. I love the one Frigate uses and someone requested this feature recently in this thread. They were advised to create a WTH feature request but don’t remember if they ever did. I would certainly vote for a generic way to display media content in a card. :crossed_fingers: that some talented dev can make this happen.

3 Likes

I think it was me. I’m basically asking the same question now realizing that there’s even more data already in HA.

Is there a way to disable the Media component of the Protect Integration. Eg I don’t want the media to be browsable by anyone but admin.

No. There is not. And even if there was, it would not actually prevent users from accessing anything in Protect. Let me put this in bold to properly illustrate the point:

Do not give access to Home Assistant to anyone you do not trust, or that you do not want to have access to everything Home Assistant has access to.

Home Assistant does not have a permission system. The only thing an “admin” account really does for Home Assistant is hide things from the UI. It does not actually really protect anything (some things might check if the user is an admin, but again, the permission system does not really exist).

If you are running HA OS or HA Supervised (anything with Add-on support), an attacker can get your UniFi Protect IP address, username and password in like 30 seconds if they know where to look. Just as I assume you can get the login info for any other external service that does not properly support oauth/OIDC/some other kind of non-password auth as well.

If you want a permission system, see

WTH2 - WTH!? No RBAC - Role Based Access Control? (Users & Groups rights).

I have an unusual issue in that my G4 Doorbell is showing all of the binary sensors as Open/Closed states:

The Show As in the entity properties are left as default:

image

My G4 Bullet doesn’t have this problem at all and shows these as On/Off:

image

I’ve tried deleting the integration, rebooting and restarting, but the problem persists.

Does anyone have any ideas?

Man that sux.
I don’t really care about the access. I just want to remove the protect streams from media browser. Surely (don’t call me Sherly) must be some config some place that lets users turn off that kind of thing?

Ignore this. I’m an idiot.

I had a customize_glob in my configuration.yaml setting the device_class of any binary_sensor.front_door* to door. Removing it has fixed the issues above.

My Unifi cameras all have a media_player speaker entity in HA, but unavailable… I didn’t think the cameras had speakers (apart from the doorbell?)

I have some G3 Flexs (no media_player), G3 Instants,G4 domes and a G4 Doorbell have media _player and work fine

I have G4 Pros and G4 Bullets (all of which have speaker ‘unavailable’) and the G4 Doorbell (which has the Speaker working), so different cameras from your G3 Flexs and G4 Domes - I wonder if that is why.

Just checked again and the G3 Flex have no media_player

Sounds about right to me. Only the doorbell actually has a speaker. For example. My G4 pro has CO and smoke unavailable. This is expected since it doesn’t have those features.

All my G4 Pros have CO/smoke detection:
image

Can i ask if this integration supports the smart sensors yet ?

Protect Sensor

I am thinking about getting these but only if my HA can see them

Can confirm that the protect sensor works with HA

Oh…wow. When was this added?

I think it’s been there a while (a year perhaps), I looked quite some time ago and saw they were supported and hence got one for my front door.

Trying to understand how to pull smart detection thumbnails from media source into notify service. Does anyone have an example of code or just a pointer to where to get event_id in media source?