Unifi Protect Camera Stream

@kymnyth For testing are you able to put the Raspberyy Pi into you MAIN subnet and see if the stream works?

My setup is mariginally diffeernt to your I have an Infrastructure subnet, Clients subnet and a IOT subnet.

All my UNIFI gear, Firewall, Switches, APs and UnRAID are in the Infrastructure subnet, my docker host, Shield TV and Windows PCs and any other trusted device is in the Clients subnet.

Then things I dont trust are in the IOT such as SONOFF and other unbranded Cinese systems.

I have a FIrewall rule that allows all traffic outbound from the Infrastructure subnet to the Clients subnet on any protocol.

IOT is blocked from access to the WAN and access to the Infrastructure subnet. It is only allowed to communicate to the Hassio container on specific TCP/UDP.

Ideally to troubleshoot the problem I would get all the components on the same subnet without any restrictions and see if it works. Once you have confirmed that setup works without issue you can then complicate the setup :smiley:

You should be able to get the live stream working in HomeAssistant without affecting the Unifi Protectā€¦ My protect is working flawlessly and all the cameras are manageable within both the cloud managed and locally manged instances.

Have you tried adjusting the resolution as suggested in this post

I now have the hassio rbp, my client system and the CKG2+ all on the same subnet. I switched to the lowest resolution option in unifi protect for the rtsp feed and I am still not able to get any output. :frowning:

BOO :frowning:

Are you able to ping the camera from the Raspberry PI command line? Do you get any error in the log?

Not sure what the difference is but it doesnā€™t seem to be how I am configuring the camera and stream. Instead of running on a raspberry pi I tried installing Ubuntu on an atom based mini computer and HASSIO into a docker. I only added a camera to the configuration thus far. The camera is working. There are a number of other differences as well. I will have to work my way through transferring the rest of my configuration and see if I can figure out what was causing the problem. Perhaps the pi was just under-powered.

I finally got this working but I am not sure why. I rebuilt everything on another atom based mini computer and proceeded to get it working. I will mention the differences in this configuration vs my previous which are few.

  1. The entire configuration of lovelace was done through the configuration ui vs before I used editing the ui-lovelace.yaml directly.
  2. Running on a bit more powerful piece of hardware
    Other than that, there were really no differences.
    I did notice that when accessing the camera live streams I often had to expand and contract the browser window to get it to be refresh and display. Perhaps it was working before and it just wasnā€™t refreshing properly. I did let it sit for quite a while so I doubt that is it. Hope some help can be gleaned from this by someone else.
1 Like

Fwiw, Iā€™m running hassio (now up to 0.93.2) on the pi. Both hassio and the cloud key gen2+ are on the same vlan.

The only port forwarding I did was to allow 8123 in to hassio so I could get in with my ISP-given DHCP IP and duckdns name.

I can also see the stream via the Nabu Casa / Home Assistant Cloud / Remote Control URL. I did not make any changes for this one to work.

Has anyone tried to stream the cameraā€™s over AirPlay?

My camera streams are working fine in the picture entity card, but if I stream it to the AppleTV, it just spins and spins trying to load on the AppleTV.
Doing the same action from my Foscam cameras works just fine.

There is now a custom component for UniFI Protect thanks to @briis :smiley:

1 Like