Problem with generic component (Mobotix camera)

Hi all,
today after update HA Core to core-2021.3.0 my Mobotix camera doesn’t work anymore.
I received this error:
Error getting new camera image from Haustuer: Missing hostname in URL.

Have the camera live image as generic camera:

configuration.yaml

  • platform: generic
    still_image_url: !secret mobotix_bild
    name: Haustuer

secrets.yaml:
mobotix_bild: http://username:[email protected]/record/current.jpg

What is wrong in configuration?
I hope you guys can help me I tried to fix this since morning but no success.

Did you read the breaking change with regard to some camera streams?

yes, I read it. No breaking changes for generic.

Hi! How are you? The same thing happened to me with a Dahua DVR that I have configured as generic. After the 2021.3.0 update, the “still_image_url:” parameter stopped working, it doesn’t show me the snapshots anymore.

Did you find any solution?

Thanks, and sorry for my bad English.

Hello
I managed to solve it by making the following modification, adding these lines:

    stream_source: !secret cam1_stream
    still_image_url: !secret cam1_image
    authentication: digest
    username: !secret dvruser
    password: !secret dvrpass

secrets.yaml:

    cam1_stream: rtsp://192.168.0.XXX:554/streaming/channels/101
    cam1_image: http://192.168.0.XXX:8080/ISAPI/Streaming/channels/101/picture
    dvruser: USER DVR
    dvrpass: PASSWORD DVR

Hope this helps.
Hugs.

There was a change to the generic component to use a different http library as the previous one had a bug. However this new library is a bit more strict and also some configuration quirks may have been exposed.
The proper way to set up the component is slightly confusing and should probably be documented better. For still image url, the username and password should be listed separately in the yaml instead of prepended to the url. However, for stream_source, the username and password SHOULD be prepended to the url. Using the example from @rfromano

configuration.yaml:

    stream_source: !secret cam1_stream
    still_image_url: !secret cam1_image
    authentication: digest
    username: !secret dvruser
    password: !secret dvrpass

secrets.yaml:

    cam1_stream: rtsp://streamuser:[email protected]:554/streaming/channels/101
    cam1_image: http://192.168.0.XXX:8080/ISAPI/Streaming/channels/101/picture
    dvruser: USER DVR
    dvrpass: PASSWORD DVR
1 Like

I have the config exactly as you guys have it above…and it still doesn’t show stream and throws the error:

image

Check your password. It must not contain any special characters like @, ! etc.
I get work my camera after replacing the special characters in password.
I had a password: Mypassword@ and I raplaced it with Mypassword%40

mobotix_bild: http://username:password%[email protected]/record/current.jpg

I hope this helps

1 Like

That was it!
Thanks buddy :slight_smile:

Worth noting that I followed the steps above and got this error:

Just tried it adding " around the URL (which for some reason I only had configured for stream instead of still.

- platform: generic
  still_image_url: http://user:[email protected]:80/Streaming/channels/2/picture
  stream_source: "rtsp://user:[email protected]:554/Streaming/Channels/101/"
  name: Frontyard

Updated to:

- platform: generic
  still_image_url: "http://user:[email protected]:80/Streaming/channels/2/picture"
  stream_source: "rtsp://user:[email protected]:554/Streaming/Channels/101/"
  name: Frontyard

I don’t think this resolved the issue though, I dont really want to change my password on my cameras and need to update half a dozen devices :confused:

I’ve re-read the above posts and I realise you only need to swap out the characters for ascii references in the password.

https://www.w3schools.com/tags/ref_urlencode.ASP

I’ve done that and i’m giving it another shot.

This seems to have solved it with the dashboard, notification attachments TBC.

I can confirm that adding this didn’t work.

  authentication: digest
  username: xxx
  password: xxxx