Custom Component: Unifi Protect

Updated my CK2+ to UniFiOS the other day… all working well, and the extra few seconds gained on my motion automations is great - I have a camera snapshot taken, sent to AWS rekognition for object detection (only g3’s for me!) and notification to my phone in near real time!!

2 Likes

I have tested this on both a UDMP and CK+ with the latest FW installed, and both are streaming fine on my iPad 12.9".

1 Like

G4 cams? Or G3?

And only one Cam or multiple? All playing? And we are talking about live streaming, not 10 second snapshots

The UDMP has G4-PRO and CK+ has only been tested with G3.
And yes, clicking a Lovelace Picture Glance card to start streaming incl. sound. I tried with all 7 cameras I have.

So you don’t have live streaming in the card before clicking?

No, I did not, but I just enabled it, and still get live streaming from 2 xG4 and 1xG3 at. the same time on the iPad

I get live streaming on the camera pop ups on a latest iPad Pro. You do have to click the play > at the bottom of the window

I factory reset the UNVR, readopted all the cameras, set up a brand new, empty Home Assistant and bang: NO live stream on iPad.

I guess that is the problem! AutoPlay does not work on iPad anymore. It plays when clicking on the video and opening it, then pressing the play button. But it used to play right away in the video card, and when opening it started playing by itself, without pressing the play button.
This prevents playing directly in the picture-glance card, as there is no play option.

Autoplay hasn’t worked for me for a while now…on any camera that I stream (includes unifi and amcrest cameras). I’m not sure what version of HA this started with but if definitely not the latest. It is the same for my Android phones and my IPad. It only autoplays on my desktop.

Just an Fyi…so you know this is not unique to this unifi integration or to IOS devices

Hmm. Would be nice to get it working again!

Good to know you see the problem, too. Hope this gets sorted out soon!

Rolled back to Home Asisstant 0.112 from this summer, here it works perfectly. So it is a change between 0.112 and the current version.

The frontend issue can be found here: No autoplay of camera streams in lovelace anymore with unifi protect devices · Issue #8041 · home-assistant/frontend (github.com)

I’m interested in knowing a bit more about the delay that I’m seeing when viewing the cameras in HA via the live feed. For me, this is about 20 - 25 seconds.

The old integration for UVC didn’t have this issue in HA - I’ve just confirmed this with a camera that I haven’t migrated over to the Cloud Key Gen2+ yet.

I love the additional features that the Protect integration brings over UVC.

With all 3 of my Protect cameras (G4 bullet, G3 bullet, G3-Flex) I see about a 15 second live feed delay in HA (hosted in venv on an i3 NUC running Ubuntu linked to a UCK-G2+ within a GB lan).

This seems to be a HA not integration issue and may be linked to key frames based on my reading and (very) limited understanding - there’s a good discussion of the available camera platforms here that confirms early comments in this thread about it being linked to streams.

1 Like

Will there be any compatibility issues upgrading CKG2+ to v2.0.24 which is now Unifi OS?

https://community.ui.com/releases/UniFi-Cloud-Key-Firmware-2-0-24/b6684f1e-8542-4660-bc0b-74e0634448e8

No.
There are several posts about this in this thread.

You will have to reconfigure the integration to accommodate the port change that comes with the move to UnifiOS, or modify the raw configuration parameters within .storage.
Personally I removed and re-added the integration. Took about 10 minutes.

2 Likes

Cheers! Anytime I use a camera in a notification I use a mjpeg stream from motioneye or frigate. They are always realtime and minimal overhead on a Odroid N2+.

Thanks @TazUk - it’s good to know it’s not just me :slight_smile: