Troubles with Generic Camera Snapshot

I feel like this could be a bug, but I’m currently trying to setup the ring-mqtt streaming using the generic camera integration (as instructed in the documentation: ring-mqtt/docs/CAMERAS.md at 3943159123e685547a673a751faf927f53bbf210 · tsightler/ring-mqtt · GitHub).

If I setup the generic camera in the configuration file (or in the UI) without the still image URL, it actually works fine, but without the still image capability. However, I really want to have the still image capability so it’s not launching a stream every time I launch the picture glance card on the dashboard.

So, when I attempt to enter in the url, as instructed, into the still image configuration, I get an error.

Here’s an example of what I’m adding to the configuration.yml (secrets replaced with non-identifying values):

camera:
  - platform: generic
    name: Doorbell Video
    still_image_url: http://192.168.10.242:8123{{ states.camera.ring_doorbell_snapshot.attributes.entity_picture }}
    stream_source: rtsp://username:[email protected]:8554/12345678910_live
    verify_ssl: false

This fails due to an ‘Unknown Error’. And when I check the log file, I see that there was an interesting problem with the processing of the still_image URL as follows:

ValueError: Port could not be cast to integer value as '8123{{ states.camera.ring_doorbell_snapshot.attributes.entity_picture }}'

For some reason, it’s not separating the port number from the template provided.

And from the documentation, it specifies NOT to put a slash after the port:

Note that the still_image_url uses the guessed hostname and/or localhost. This could work in some cases, but if SSL is enabled or the default default port has been changed, the correct URL may not be reflected here, simple use the Home Assistant base URL with the value template on the end and make sure there is no slash after the hostname or port. For example, if the Home Assistant instance is accessed directly via https://myha.mydomain.local/ then the URL would be https://myha.mydomain.local{{ states.camera.front_porch_snapshot.attributes.entity_picture }}.

Thanks in advance for any help or guidance!

OK, definitely a bug with the parsing of the URL in HA. If anyone has any guidance to provide on how to formally file a bug, that would be wonderful.

Hey did you get this fixed? Running into the same issue

It was fixed in HA back then. The RingMQTT developer helped push to get this fixed. If you are experiencing this issue, it might be a new bug and I would recommend you look at opening an issue on GitHub.