I hope this helps someone: I found out that the URLs generated by https://www.ispyconnect.com/man.aspx?n=dahua for my Dahua IPC-HDW5231R-ZE weren’t fully valid. However, I was able to generate a valid ?authbasic=
via the script on the page. The valid URLs should be:
Mainstream
ffmpeg:
camera:
- platform: ffmpeg
name: Camera
input: -rtsp_transport tcp -i rtsp://USER:PASS@IPADDRESS/cam/realmonitor?channel=1&subtype=0&authbasic=GENERATEDCODE
Substream #2
ffmpeg:
camera:
- platform: ffmpeg
name: Camera
input: -rtsp_transport tcp -i rtsp://USER:PASS@IPADDRESS/cam/realmonitor?channel=1&subtype=2&authbasic=GENERATEDCODE
The authbasic can be generated with the following Javascript code:
var auth = btoa(cfg.username + ":" + cfg.password);
The above works like a charme without credentials modal in both VLC and Hassio.