Adding a unique ID for RTSP camera

Hello everyone

I’m adding a webcam with rtsp procotol, I edited the config file like this

# config/configuration.yaml
camera:
  - name: sometext
    platform: ffmpeg
    input: -rtsp_transport tcp -i rtsp://user:[email protected]:554/Streaming/Channels/102

The camera appeared in the dashboard and work well, but I can’t manage the camera in WebUI because the camera doens’t have a unique ID

I’ve read the document here This entity does not have a unique ID? - Home Assistant (home-assistant.io)

Accroading to the document:

A few selected integrations (such as template and mqtt) allow the user to define a unique ID.

Then, I tried to add unique_id value in config file like this

# config/configuration.yaml
camera:
  - name: sometext
    unique_id: somelongrandomstring
    platform: ffmpeg
    input: -rtsp_transport tcp -i rtsp://user:[email protected]:554/Streaming/Channels/102

Then get error like this

homeassistant_1  | 2023-04-19 21:06:07.881 ERROR (MainThread) [homeassistant.config] Invalid config for [camera.ffmpeg]: [unique_id] is an invalid option for [camera.ffmpeg]. Check: camera.ffmpeg->unique_id. (See /config/configuration.yaml, line 32). Please check the docs at https://www.home-assistant.io/integrations/ffmpeg

So, is there any method to manually define a unique ID to the camera?

TIA

4 Likes

Having the same issue. Can anyone help?

1 Like

dont like our chances but heres hoping.
also not happy with unique id missing errors

It’s not an error, and flagging posts for moderator attention when you want a “solution” isn’t how it works.

For RTSP cameras you can use the generic camera integration, which is done in the UI and supports unique_id. Otherwise open a feature request, or develop the required change and submit a PR.