Does it work in Lovelace without stream: enabled? If yes , then config is correct, if it doesnāt work with stream in your config, then maybe camera is just not supportedā¦
Took the stream out of my config and it doesnāt work. So I guess I am out of luck. I just thought that if I had got an ip camera it would have been enough to get set up in home assistant. Thanks for your help anyway.
You may need more details added in your config.
Do you need authentication?
SSL?
Check the generic cam docs again and look at all the options.
When I set my cams up I had to do trial and error to see what HA needed to see the streams.
Just because it works in vlc doesnāt mean you have the whole config right in HA.
I tried username, password, authentication, verify ssl and still no result. I played around with the different selections and I still just get the spiral loading.
I use all four of those to get mine to work.
Did you try both digest and basic authentication? I just remembered that one of my cams wouldnāt work with digest. Had to use basic for that one. Probably an older firmware.
Iām trying to set a pair of Dahua cameras to show in HA but I have no joy. Iām getting 401 unauthorised, I tried playing with authentication and verify_ssl but no matter what combination I tried Iām getting the same message. If I use the the rtsp link in VLC the stream is perfect.
Thanks for the pointers Fabio. I have commented the username and password in my configuration and tried all options with authentication and ssl but getting the same error.
The error from the log file can be found below (I redacted the username and password from the below error log).
Could it be that my password contains special characters thatās causing the problem
2019-11-26 07:36:40 ERROR (stream_worker) [libav.rtsp] method OPTIONS failed: 401 Unauthorized
Exception in thread stream_worker:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/src/homeassistant/homeassistant/components/stream/worker.py", line 49, in stream_worker
container = av.open(stream.source, options=stream.options)
File "av/container/core.pyx", line 275, in av.container.core.open
File "av/container/core.pyx", line 227, in av.container.core.Container.__cinit__
File "av/container/core.pyx", line 129, in av.container.core.ContainerProxy.__init__
File "av/container/core.pyx", line 195, in av.container.core.ContainerProxy.err_check
File "av/utils.pyx", line 105, in av.utils.err_check
av.AVError: [Errno 825242872] Server returned 401 Unauthorized (authorization failed): 'rtsp://username:[email protected]:554/cam/realmonitor?channel=1&subtype=0' (
16: rtsp)