It’s still on my back burner of ideas, the trickiest part is trying to figure out how to scrape what cameras are in protect like the NVR component does. The rest of the component works in the same fashion.
For now I have it setup as a generic camera that works in the same manor as before, just have to manually configure them. I went this route especially because of new stream component.
The one thing I haven’t sorted, and didn’t spend much time on, is passing camera user and pass credentials so I just enabled anonymous snapshots for now. Log into each camera and enable that function and it works.
Enable RTSP under the protect interface and use that URL for the stream source if you want streaming, if not remove that section.
Is there anything else you had to do to get the generic camera platform working? I have my flex working as an ffmpeg camera but when I try to configure as generic the stream won’t load in the front end and interestingly it also breaks my Ring and Nest cameras…
Same here, @geekoftheweek I have RSTP set up in protect and I have my camera set up like above but I am not getting any streaming. What am I missing? The “snap.jpeg” is solid but not the same quality…
It does break Ring, I noticed that as well. I haven’t had much time this weekend to look into it, but it seems to break something with FFMPEG. I haven’t found a fix just yet.
Make sure you enable anon snapshots as well, to make it load in the UI, you have to log into each camera to do so. I haven’t spent much time trying to figure out how to pass the auth creds back to it. No API on protect so it works different than how the NVR component is setup. The NVR component pulls the same exact snap.jpeg file so that works exactly the same once you get it to load.
You are also able to to configure the password in the GUI using this Guide
Access the UniFi Cloud Key Gen2 Plus (UCK-G2-PLUS) via SSH. The SSH credentials will be the same as those used to access the Cloud Key’s management portal. By default, these credentials will be ubnt/ubnt.
Once credentials have been accepted, update the system packages and install Nano with the following command:
`apt-get update && apt-get install nano -y`
The following command will open the configuration file for UniFi Protect using Nano and allow editing:
I understand replying to an existing thread is not ideal. However, I have everything working except the live stream. For some reason,I am not able to view it through HA.
This is my configuration.yaml configuration section:
@noodlemctwoodle No I have verified everything a number of times with no luck. I have not tried making custom cards and I’m not sure how to go about what you suggest.
Since it works as a generic camera with the stream integration it’s kind of a moot point / dead at this time, didn’t really see the need to pursue it further since it works now. If an API is ever officially release could look into it again possibly.
It also actually worked with the previous Unifi NVR component but the auto discover piece needed some work, the generic camera with stream support is a much better integration.
Do you have a location for showing the support for the Unifi cameras with the generic camera /stream support?
I seem to be having issues getting snapshots and streams to work with Home Assistant despite enabling RTSP in Unifi Protect (on multiple resolutions) and anonymous snapshot directly on the Unifi Camera.
component in my configuration.yaml. I also needed the DIRECT ip to the camera for the still_image_url instead of the Unifi Protect instance the rtsp stream source points to.
Now they both work. (Still and stream)
Also – thank you for your contributions on github. I’ve referenced your repo numerous times – it’s great.