Dahua XVR into Home Assistant

Oldskooler

n3wb
Jan 5, 2025
5
1
Serbia
Hi to all!

I have XVR5108HS-I3 with connected 5 analog cameras and 2 IP cameras attached.
I wanted to import analog cameras into Home Assistant, so I installed HACS and Dahua integration.
I have successfully added IP cameras into HA by calling their IP addresses, but when I enter the IP address of the XVR, I can't see any analog cameras streams.
For example, if I try to activate motion detection, I get an error:
Failed to perform the action switch/turn_on. 500, message='Internal Server Error', url='https://192.168.0.13/cgi-bin/configManager.cgi?action=setConfig&MotionDetect%5B1%5D.Enable=true&MotionDetect%5B1%5D.DetectVersion=V3.0'

Also, I tried to open analog cameras via VLC using RTSP, but also without success, getting error message:
Your input can't be opened:
VLC is unable to open the MRL 'rtsp:/admin:admin@192.168.0.13:554/cam/realmonitor?channel=1&subtype=0'. Check the log for details.

with log details:
live555 error: Failed to connect with rtsp:/192.168.0.13:554/cam/realmonitor?channel=1&subtype=0
satip error: read error: No error
satip error: Failed to setup RTSP session
main error: read error: No error

main error: read error: No error

Does anyone have some tips what could i try?
Thank you everyone in advance...
 
rtsp:/<Username>:<Password>@<IP Address>:<Port>/cam/realmonitor?channel=1&subtype=0

channel: Channel, 1-8; subtype: Stream Type, Main Stream 0, Sub Stream 1.

So I enter and even removed the user name and password area of the format and enter and prompts me for user and pass so I enter and get stream..

So in my case.. rtsp:/10.0.0.99:554/cam/realmonitor?channel=1&subtype=0 as you already know the double / is needed in place after RTSP..
 

Attachments

  • Screenshot (3892).png
    Screenshot (3892).png
    2.1 MB · Views: 3
  • Like
Reactions: Oldskooler
Unfortunately, I also tried your variant, but the problem is the same. I can't figure out if the problem is with VLC player settings, or if something needs to be adjusted in XVR...
rtsp:/<Username>:<Password>@<IP Address>:<Port>/cam/realmonitor?channel=1&subtype=0

channel: Channel, 1-8; subtype: Stream Type, Main Stream 0, Sub Stream 1.

So I enter and even removed the user name and password area of the format and enter and prompts me for user and pass so I enter and get stream..

So in my case.. rtsp:/10.0.0.99:554/cam/realmonitor?channel=1&subtype=0 as you already know the double / is needed in place after RTSP..
 
Try and Reset the XVR back to factory and I know this can be troublesome but might be needed in a case like this.. Outside of that only thing I can think of is that maybe your RTSP feed port ID has changed some how.. Before reset double check the XVR Network area for connection and make sure that you are using the right RTSP feed port ID.. If it is 554 as it was form factory then I guess do a Factory Reset.. Next and only other issue that it could be is a Network Firewall block?
 
Try and Reset the XVR back to factory and I know this can be troublesome but might be needed in a case like this.. Outside of that only thing I can think of is that maybe your RTSP feed port ID has changed some how.. Before reset double check the XVR Network area for connection and make sure that you are using the right RTSP feed port ID.. If it is 554 as it was form factory then I guess do a Factory Reset.. Next and only other issue that it could be is a Network Firewall block?
I'm trying to leave factory reset to be last thing to do...
I checked, RTSP is at 554 and firewall is off.
I'm confused how can I see cameras over DMSS, is it using other protocol?
I tried VLC on Android phone also, and no luck.
 
Depending on how you setup your DMSS it is connected a few different ways all of them different then using RTSP..

How are you trying to open in VLC? You using the Media, Open Network Stream area or some other way of trying to access the stream?
 
Depending on how you setup your DMSS it is connected a few different ways all of them different then using RTSP..

How are you trying to open in VLC? You using the Media, Open Network Stream area or some other way of trying to access the stream?
Yes, I'm using that path.
I also checked, RTSP over TLS is activated in XVR, in Settings/Security (if that matters).
Tried to deactivate it, activate again and reboot XVR, but nothing changed...
I saw that there is a lot of options turned on in Security tab (firewall is off) so maybe some of those options blocking RTPS streaming?
 
I would try turning off the TLS for RTSP and see if that helps.
THANK YOU VERY VERY MUCH!
It works now. I thought that maybe some security features are blocking, but I never would have thought this was a problem.
Now i can continue trying to integrate everything into Home Assistant, as this was first big barrier.
One more time - thank you very much for your time and help, I really appreciate it.
Until next time, wish you all the best!
 
  • Like
Reactions: Revo2Maxx