Unable to view live Unifi Protect camera feeds

Hello All,
I’ve recently had an issue viewing the live camera feeds from Unifi Protect. This previously worked fine and stopped working in the last few weeks. Don’t often use the feeds in HA to view the camera so not exactly sure when this started.

Please note, the only issue is with viewing the live camera feeds. The integration itself is able to access the UDMPro, all camera entities appear to work properly, can play media (audio) to cameras with speakers and am able to view motion/detection events in media browser.

Below is the error message received in the picture entity card.

Failed to start WebRTC stream: webrtc: streams: EOF, exec/rtsp [rtsp @ 0x7f697d790000] method DESCRIBE failed: 404 Not Found [in#0 @ 0x7f697da12b00] Error opening input: Server returned 404 Not Found Error opening input file rtsp://127.0.0.1:18554/camera.driveway_ai_medium_resolution_channel?audio&source=ffmpeg:camera.driveway_ai_medium_resolution_channel%23audio%3Dopus%23query%3Dlog_level%3Ddebug&log_level=debug. Error opening input files: Server returned 404 Not Found

Configuration

  • Unifi Protect v5.2.62 running on UDMPro v4.1.13
  • Home Assistant v2025.3.4 on HAOS v15.0 x86-64
  • Separate VLANs (subnets) are used to separate the LAN, Cameras and Servers.
  • HAOS is allowed to communicate with the cameras in the firewall
  • Client devices are allowed to communicate with HAOS
  • Using Nabu Casa WebRTC connections

Additional info

Using debug_ui for go2rtc, I was able to temporarily make go2rtc work by changing the go2rct config to use rtsp and port 7447 instead of the default rtsps and port 7441. However, since HA manages the go2rtc config automatically, the config was replaced with non working config when the camera card or more info dialog is opened.

For instance, the following go2rtc config displays the camera feed in the go2rtc debug ui

# This file is managed by Home Assistant
# Do not edit it manually

api:
  listen: ":11984"

rtsp:
  listen: "127.0.0.1:18554"

webrtc:
  listen: ":18555/tcp"
  ice_servers: []
streams:
  camera.driveway_ai_medium_resolution_channel:
    - rtsp://192.168.8.254:7447/PRIVATE
    - ffmpeg:camera.driveway_ai_medium_resolution_channel#audio=opus#query=log_level=debug

While the config below does not

# This file is managed by Home Assistant
# Do not edit it manually

api:
  listen: ":11984"

rtsp:
  listen: "127.0.0.1:18554"

webrtc:
  listen: ":18555/tcp"
  ice_servers: []
streams:
  camera.driveway_ai_medium_resolution_channel:
    - rtsps://10.10.10.254:7441/PRIVATE
    - ffmpeg:camera.driveway_ai_medium_resolution_channel#audio=opus#query=log_level=debug

Unifi Protect debug logs related to the issue when opening camera card

2025-03-24 14:33:44.515 DEBUG (MainThread) [uiprotect.api] Websocket state changed: WebsocketState.CONNECTED
2025-03-24 14:33:44.518 DEBUG (MainThread) [uiprotect.api] emitting message: WSAction.ADD:ModelType.EVENT:67e1cfb7030e5703e4008cc6:['model', 'id', 'type', 'start', 'end', 'score', 'heatmap_id', 'camera_id', 'smart_detect_types', 'smart_detect_event_ids', 'thumbnail_id', 'user_id', 'timestamp', 'metadata', 'deleted_at', 'deletion_type', 'category', 'sub_category']
2025-03-24 14:33:44.518 DEBUG (MainThread) [uiprotect.utils] event WS msg: {'model': <ModelType.EVENT: 'event'>, 'id': '67e1cfb7030e5703e4008cc6', 'type': <EventType.ACCESS: 'access'>, 'start': datetime.datetime(2025, 3, 24, 21, 33, 43, 781000, tzinfo=datetime.timezone.utc), 'end': None, 'score': 0, 'heatmap_id': None, 'camera_id': None, 'smart_detect_types': [], 'smart_detect_event_ids': [], 'thumbnail_id': None, 'user_id': '66fc8cf80034a303e4001c02', 'timestamp': None, 'metadata': {'client_platform': 'web', 'reason': None, 'app_update': None, 'light_id': None, 'light_name': None, 'type': None, 'sensor_id': None, 'sensor_name': None, 'sensor_type': None, 'doorlock_id': None, 'doorlock_name': None, 'from_value': None, 'to_value': None, 'mount_type': None, 'status': None, 'alarm_type': None, 'device_id': None, 'mac': None, 'license_plate': None, 'detected_thumbnails': None, 'nfc': None, 'fingerprint': None}, 'deleted_at': None, 'deletion_type': None, 'category': None, 'sub_category': None}
2025-03-24 14:33:44.825 DEBUG (MainThread) [uiprotect.data.bootstrap] Unknown model type: automation
2025-03-24 14:33:47.514 DEBUG (MainThread) [unifi_discovery] discover: ('10.10.10.254', 46634) <= b'\x01\x00\x00\x00'
2025-03-24 14:33:47.515 DEBUG (MainThread) [unifi_discovery] discover: ('10.10.20.254', 57780) <= b'\x01\x00\x00\x00'
2025-03-24 14:33:47.515 DEBUG (MainThread) [unifi_discovery] discover: ('10.10.21.254', 60631) <= b'\x01\x00\x00\x00'
2025-03-24 14:33:53.917 DEBUG (MainThread) [unifi_discovery] discover: ('<broadcast>', 10001) => b'\x01\x00\x00\x00'
2025-03-24 14:33:53.917 DEBUG (MainThread) [unifi_discovery] discover: ('10.10.10.21', 10001) <= b'\x01\x00\x00\x00'
2025-03-24 14:33:58.015 DEBUG (MainThread) [unifi_discovery] discover: ('10.10.10.254', 46634) <= b'\x01\x00\x00\x00'
2025-03-24 14:33:58.015 DEBUG (MainThread) [unifi_discovery] discover: ('10.10.20.254', 57780) <= b'\x01\x00\x00\x00'
2025-03-24 14:33:58.016 DEBUG (MainThread) [unifi_discovery] discover: ('10.10.21.254', 60631) <= b'\x01\x00\x00\x00'
2025-03-24 14:34:04.251 DEBUG (MainThread) [unifi_discovery] discover: ('<broadcast>', 10001) => b'\x01\x00\x00\x00'
2025-03-24 14:34:04.251 DEBUG (MainThread) [unifi_discovery] discover: ('10.10.10.21', 10001) <= b'\x01\x00\x00\x00'
2025-03-24 14:34:08.515 DEBUG (MainThread) [unifi_discovery] discover: ('10.10.10.254', 46634) <= b'\x01\x00\x00\x00'
2025-03-24 14:34:08.515 DEBUG (MainThread) [unifi_discovery] discover: ('10.10.20.254', 57780) <= b'\x01\x00\x00\x00'
2025-03-24 14:34:08.515 DEBUG (MainThread) [unifi_discovery] discover: ('10.10.21.254', 60631) <= b'\x01\x00\x00\x00'
2025-03-24 14:34:15.650 DEBUG (MainThread) [homeassistant.components.unifiprotect.discovery] Found devices: [UnifiDevice(source_ip='10.10.10.254', hw_addr='f4:92:bf:81:ce:b9', ip_info=None, addr_entry=None, fw_version=None, mac_address=None, uptime=None, hostname='Matts-House', platform='UDMPRO', model=None, signature_version=None, services={<UnifiService.Protect: 1>: True}, direct_connect_domain='*.home.mwolter.io', is_sso_enabled=True, is_single_user=False), UnifiDevice(source_ip='10.10.20.254', hw_addr='f4:92:bf:81:ce:b9', ip_info=None, addr_entry=None, fw_version=None, mac_address=None, uptime=None, hostname='Matts-House', platform='UDMPRO', model=None, signature_version=None, services={<UnifiService.Protect: 1>: True}, direct_connect_domain='*.home.mwolter.io', is_sso_enabled=True, is_single_user=False), UnifiDevice(source_ip='10.10.21.254', hw_addr='f4:92:bf:81:ce:b9', ip_info=None, addr_entry=None, fw_version=None, mac_address=None, uptime=None, hostname='Matts-House', platform='UDMPRO', model=None, signature_version=None, services={<UnifiService.Protect: 1>: True}, direct_connect_domain='*.home.mwolter.io', is_sso_enabled=True, is_single_user=False)]
2025-03-24 14:34:19.631 DEBUG (MainThread) [uiprotect.api] Request url: https://uiserver.home.mwolter.io/proxy/protect/api/cameras/66fc3ec40330a303e40008c2/snapshot
2025-03-24 14:34:22.980 DEBUG (MainThread) [uiprotect.api] Request url: https://uiserver.home.mwolter.io/proxy/protect/api/cameras/66fc3ec40330a303e40008c2/snapshot
2025-03-24 14:34:22.999 INFO (MainThread) [go2rtc_client.ws.client] Connected to http://localhost:11984/
2025-03-24 14:34:23.069 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.driveway_ai_medium_resolution_channel] Error from stream worker: Error opening stream (EOF, End of file, rtsps://10.10.10.254:7441/PRIVATE)
2025-03-24 14:34:33.077 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.driveway_ai_medium_resolution_channel] Error from stream worker: Error opening stream (EOF, End of file, rtsps://10.10.10.254:7441/PRIVATE)
2025-03-24 14:34:35.019 DEBUG (MainThread) [uiprotect.api] emitting message: WSAction.UPDATE:ModelType.AIPORT:677046a30036eb03e40061b7:['paired_cameras']
2025-03-24 14:34:37.647 INFO (MainThread) [custom_components.bermuda] Having to prune 169 extra devices to make quota.
2025-03-24 14:34:39.848 DEBUG (MainThread) [uiprotect.api] emitting message: WSAction.UPDATE:ModelType.AIPORT:677046a30036eb03e40061b7:['paired_cameras']
2025-03-24 14:34:39.936 DEBUG (MainThread) [uiprotect.api] emitting message: WSAction.UPDATE:ModelType.AIPORT:677046a30036eb03e40061b7:['paired_cameras']

Found solution to issue. The picture card now properly shows the live camera feed using rtsps and port 7441.

For example, the following config in go2rtc now displays the camera’s live stream

# This file is managed by Home Assistant
# Do not edit it manually

api:
  listen: ":11984"

rtsp:
  listen: "127.0.0.1:18554"

webrtc:
  listen: ":18555/tcp"
  ice_servers: []
streams:
  camera.driveway_ai_medium_resolution_channel:
    - rtsps://10.10.10.254:7441/PRIVATE
    - ffmpeg:camera.driveway_ai_medium_resolution_channel#audio=opus#query=log_level=debug

Logged into the Unifi Dream Machine Pro terminal and ran the following

rm /data/unifi-core/config/unifi-core.key
rm /data/unifi-core/config/unifi-core.crt
systemctl restart unifi-core unifi-protect

Links to forum posts with more info
https://community.ui.com/questions/RTSPS-stream-issue/f6b7c59a-4cff-4ff9-b305-dea0e38a4be5