ONVIF and DAHUA NVR

Hey Folks,
I cannot get my DAHUA NVR being recognized by ONVIF integration.

I can add separately each camera connected to the NVR, but not the NVR itself (ONVIF is enabled)… the main difference in the network portion compared to each single camera, is the fact that the HTTPS is enabled in the NVR. It says “unknown error occurred”…

Any help really appreciated, Cheers!

I believe it is the https. I have a dahua xvr (dvr+nvr) and even when you do get it into onvif it starts to create additional instances. I had 22 devices or so at one point. I’ve also seen this behavior with a straight nvr.

The Ip cameras though seem to be fine in onvif though. The only thing that adding the nvr to onvif gets you is last_reboot and processor_usage sensor. You can also use this to get all camera events and rtsp for the streams.

Edit: to clarify dahua to mqtt can be used on the nvr itself, if your goal is to have a single endpoint. However you’ll need to drop https for access on the nvr with this as well.

Thank you @Mikefila! yes my goal is to have a unique endpoint… I will try your suggestions and see.
I might come back to you with further questions :sweat_smile:

Cheers!

Sure, this post should answer any questions. If not just ask.

In case anyone is looking for this now, Dahua cameras will not be detected by ONVIF (Tested in Home Assistant, Blue Iris and a couple of specific NVR’s) if HTTPS is enabled. You have to disable HTTPS and also delete all HTTPS certificates. I had to factory reset my HDW3849H’s to remove all traces of HTTPS before ONVIF would work again

Dahua has it’s own integration now that fully supports https for sensors and streams.

Same issue here - HA doesn’t detect Dahua using ONVIF - however I have never had certs on the cameras as they are brand new out of the box.

If you want Dahua cameras in Home Assistant, there is a custom component in HACS that works well,. I have been using it and it seems to bring in the same entities as ONVIF would.
Might be worth giving that a try.
Also make sure, with Dahua, that you have an ONVIF user with ADMIN privilege if you want to bring it into Home Assistant.

Try the custom integration in HACS called Dahua - Dahua Camera and Doorbell Home Assistant Integration. I believe it is the same one linked to by @Mikefila

Thanks - saw that add on.

Actually got this to work - just had the wrong port. Need to use 80 or 443 (if using certs) for the onvif port. And yes, setting up a dedicated onvif user with least privileges is highly recommended.

Yes, Dahua use HTTP / HTTPS ports for initial ONVIF setup. Makes it easier in some ways, but have to remember it if you are use to using other devices and the different port :slightly_smiling_face:

Has anyone found if Dahua support a still image URL?

Been a while since I played with Dahua. Yes, they do have a still image support.
Not sure if it needs an NVR or not though.
There is a discussion on the domotics forum.
https://www.domoticz.com/forum/viewtopic.php?t=10028

Thx - looks like http://username:password@ipaddress/cgi-bin/snapshot.cgi?1 works

2 Likes

Hi All,

Just recently moved my Dahua NVR to another room and it was integrated via Onvif.
HA is still happy to find the NVR, but for some reasons this time HA only has detected 1 camera instead of the 6 that I have.
I’ve deleted the integration and tried again but it kept detecting only 1 camera connected.

Everything as in hardware wise are still the same and the only diff would be the cameras are now connected to different Coax ports. (as I didn’t jot them down which cam connected to which coax)

Just wondering if anyone would know what I might have missed. Cheers

Hi,
I have a NVR16-4KS2 but unfortunately I’m able to see only one of the 9 dahwa cameras I have installed.
Thanks for any support you are able to provide.