Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable SRTP for unifiprotect RTSPS stream #129852

Merged
merged 2 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion homeassistant/components/unifiprotect/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ def __init__(
def _async_set_stream_source(self) -> None:
channel = self.channel
enable_stream = not self._disable_stream and channel.is_rtsp_enabled
rtsp_url = channel.rtsps_url if self._secure else channel.rtsp_url
# SRTP disabled because go2rtc does not support it
# https://github.com/AlexxIT/go2rtc/#source-rtsp
rtsp_url = channel.rtsps_no_srtp_url if self._secure else channel.rtsp_url
source = rtsp_url if enable_stream else None
self._attr_supported_features = _ENABLE_FEATURE if source else _DISABLE_FEATURE
self._stream_source = source
Expand Down
2 changes: 1 addition & 1 deletion tests/components/unifiprotect/test_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ async def validate_rtsps_camera_state(
"""Validate a camera's state."""
channel = camera_obj.channels[channel_id]

assert await async_get_stream_source(hass, entity_id) == channel.rtsps_url
assert await async_get_stream_source(hass, entity_id) == channel.rtsps_no_srtp_url
validate_common_camera_state(hass, channel, entity_id, features)


Expand Down
Loading