Dahua NVR link

This is not something I have seen. There has been 7 updates in the last year. At face value, it seems active.

It figures I’ve been working on a node red flow for last few weeks to directly interact with it. I was planning on making it plug and play for anyone who used rroller’s integration. Need to rethink that now.

I have been able to separate individual ivs rules on one camera and use them as additional sensors not supported by the integration. The events that are not supported, with onvif, it could be that the coding is just not in the integration but the event may still be coming through the event bus. Is this something you looked into?

Are you familiar with listening to the event bus? If the event is there I can help you pull it out to a sensor.

Yes, if you look at the Gitbub page you might think that the addon is being maintained. :slightly_smiling_face: Unfortunately, that’s not the case. :slightly_frowning_face:
It’s very simple: If a developer hasn’t responded to users’ questions, problems and errors for months, then that means to me that the addon is “dead”. It doesn’t matter why the developer stops responding and doesn’t do anything. It is like it is.

I’ve been using Dahua cameras for about 10 years now and Home Assistant for about 3 years. During that time I tried out a lot of things with Home Assistant and my Dahua cameras and it was always necessary to change the way they were integrated there. Partly because there were changes to Home Assistant, or due to a new firmware or API from Dahua.

Yes, the rroller addon was great at the beginning and I used it for a long time, but for about 6 months I’ve only been using it for my Amcrest AD110, even if there is an error with it that other users with other cameras also have. rroller has been aware of this error since 2022, but he has never responded to user inquiries regarding the error/problem.

As far as the detection types of the cameras are concerned, I have only been using IVS (Line and Field Detection) for a long time and not MD or SMD. Field detection works very well for me here and that is completely enough for me. I don’t use the AI features of the cameras or my NVR at all because that’s not possible in the area to be monitored and I don’t just want to know whether there are people or vehicles in the area, but also, for example, which animals (cats, Dogs, etc.) roam around here. :laughing:

At the moment, what the Onvif integration offers is enough for me. Currently I haven’t integrated the NVR into Home Assistant at all, just all cameras individually via Onvif. If I integrate my 8-port NVR into Home Assistant via Onvif, I have around 60 entities available and these entities have everything I need.

I just looked at your site GitHub - Mikefila/HaNr-event-bus-flow: Using node red with home assistant event bus. If something is further developed, that’s of course always good, :+1:but at the moment I don’t know what advantage it would bring me if there was a single sensor in Home Assistant for each IVS rule. I monitor my property and my house with the cameras and for each direction and therefore each area that is monitored on my property there is only one IVS rule (field detection) for the entire area.

If there were now several IVS rules for an area and then an extra sensor for each, that would be an additional benefit that users could possibly use, but for me that doesn’t help. Even if I can’t use it, the idea is good and might be interesting for other users. So definitely keep going. :slightly_smiling_face:

BTW 1: Don’t you have the problem that the Dahua addon constantly logs into the cameras and NVR and thus also spams the log of the camera and the NVR (NVR Firmware from 2022 an camera firmware from 2021)?

BTW 2: Yes, there are also occasional problems with the Onvif integration after Home Assistant updates, but at the moment it works pretty well and stable for me with my NVR and cameras. But if you’ve been using Home Assistant for a while, you know that things can look completely different next month. :laughing:

Edit: Example SD49225XA-HNR with Onvif Integration

NVR2108-I with Onvif Integration
Note: All sensors cannot be seen there now because I only briefly re-integrated the NVR into Home Assistant for this screenshot and the sensors only appear there when they have been triggered. All sub-channels have not yet been activated.

What I am suggesting is to add that one single event that onvif does not pick up. Leave everything else as is.

Home assistant lets you create a sensor from an event. If that event exists you could add to your configuration.

template:
  - trigger:
      platform: event
      event_type: missing_onvif_event
    binary_sensor:
      - name: Event not covered by onvif
        auto_off: 5
        state: "true"

This would give you a binary sensor for the event.

If you go to dev tools, events. There is a side panel titled active listeners. Is there any reference to onvif?

I’m still not sure if I understand exactly what you’re talking about, :slightly_smiling_face: but I did a few more tests with a camera (not the NVR). You probably want to pass on the individual event name as a trigger.

Dahua cameras allow the naming of ivs rules. These names are sent with the event. The Dahua intgration combines all ivs rules from a single camera together.
→ Using a conditinal statement (see rule 1 in camerafunc.js) allows us to target specific keywords found in the event data.

Two IVS rules for the same area but with different names
NVR_IVS_Regeln

There is a binary sensor for every IVS rule

Only Field Detection 2 and Field Detection 3 but not the name IVS_Hof_1 or IVS_Hof_2

I think I now understand what you want or what you are currently implementing, but - as I already said - because I only work with one IVS rule for each area to be monitored, that doesn’t help me. I have never taken a closer look at which events are available with which name or not. It’s enough for me if it’s triggered by an IVS rule.

I haven’t looked into the topic of events in depth yet. For example, if I create an automation, it is enough for me if I can then select the sensor as the trigger. In the case with the two IVS rules, either binary_sensor.dahua_hof_field_detection_2 or binary_sensor.dahua_hof_field_detection_3
And I can also see in the logbook whether the sensor binary_sensor.dahua_hof_field_detection_2 or the sensor binary_sensor.dahua_hof_field_detection_3 has triggered.

No there are no active listeners for Onvif.
HA_Ereignisse

And channel is 0, next added camera 1, next camera 2, next camera 3…

But i couldnt get to use my smart motion detection via my NVR so now i bought a POE injector so my NVR is connected via local internet instead of directly inside. Using my smart motion detection does work from my camera’s who arent connected directly in the NVR. (I use vehicle/person detection as motion detection to activate my lights outside when it’s after sunset)