core icon indicating copy to clipboard operation
core copied to clipboard

Warning Raised for Disabled RTSPS on ONVIF Cameras Which Do Not Support RTSPS

Open Garywoo opened this issue 1 year ago • 1 comments

The problem

The ability to add third-party cameras via ONVIF was added to UniFi Protect in version 5.0.33.

I added a Yi Cam running custom firmware that supports ONVIF to my instance of Protect, and ever since, the UniFi Protect integration has been raising the below warning for repair in Home Assistant:

RTSPS is disabled on the camera Yi Cam. RTSPS is required to live stream your camera within Home Assistant. If you do not enable RTSPS, it may create an additional load on your UniFi Protect NVR as any live video players will default to rapidly pulling snapshots from the camera.

You may manually enable RTSPS on your selected camera quality channel or Home Assistant can automatically enable the highest quality channel for you. Confirm this repair once you have enabled the RTSPS channel or if you want Home Assistant to enable the highest quality automatically.

The only button available on this warning is Submit. there is no Ignore button.

When I click submit, I see the message:

Success! The issue is repaired!

However after a while, or after a reboot, the warning returns.

UniFi Protect does not currently offer RTSPS streams for third-party ONVIF cameras. I believe this is the issue, as the integration is recognising the existence of camera without an RTSPS stream, but not recognising that RTSPS streaming is not possible for the camera.

Here's the settings of the camera as they appear in the UniFi Protect app, showing the lack of an Advanced section, which normally holds the RTSPS settings: image

What version of Home Assistant Core has the issue?

core-2024.10.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

UniFi Protect

Link to integration documentation on our website

https://www.home-assistant.io/integrations/unifiprotect

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

Garywoo avatar Oct 05 '24 00:10 Garywoo

I have the same problem

Robbe-B avatar Nov 08 '24 06:11 Robbe-B

Hello, Same for me, I use this integration only to get cpu/ram/disk information (not for video). How can I disable this warning ?

Thanks in advance

zoic21 avatar Nov 12 '24 10:11 zoic21

Could someone (or even multiple people) perhaps generate example data as described here? https://uiprotect.readthedocs.io/en/latest/dev/#linting-and-testing under "Generating Test Data"

RaHehl avatar Nov 22 '24 22:11 RaHehl

@zoic21 @Robbe-B @Garywoo I've already started working on a fix, but it would still be very helpful if you could provide an example using the camera object from Bootstrap. I got myself an ONVIF camera to test this, but it seems to provide RTSP streams. If you want the fix to be tested with real data, I'll need your support with that.

RaHehl avatar Dec 03 '24 08:12 RaHehl

@RaHehl, I can test your changes if you send me the PR.

Robbe-B avatar Dec 03 '24 09:12 Robbe-B

@Robbe-B https://github.com/RaHehl/home-assistant-core/tree/unifiprotect-fix-rtsp-repair-for-thirdparty

RaHehl avatar Dec 03 '24 21:12 RaHehl

Did we get this working? Can't see any video from onvif camera in unifi app in HA. No RTSP from camera in unifi.

Teeseeone avatar Dec 14 '24 14:12 Teeseeone

You need to be a bit more specific. In general, it works, but ONVIF is not always implemented the same way.

RaHehl avatar Dec 14 '24 14:12 RaHehl