mchome
(Dan)
June 3, 2022, 5:02pm
1
I have a Dahua NVR and was using this HACs lib to integrate.
Cameras N85DL6Z cam NVR model is 54B3P2.
It was working fine for 6 months. But suddenly the events for intrusion alerts/motion stopped working. Trip wire as well. I do see the NVR making the intrusion alerts. But when I look in HA there is no indication of an event flowing. The Dahua HACS above has not changed version in months. I did upgrade the software firmware on my NVR, but also tried reverting it.
I tried in HA to listen to events like described in the Dahua HACs lib: listen for ‘dahua_event_received’ events.
Though the camers show up fine in HA, and i can see the videos and turn things on and off, these motion events dont seem to show up in HA. Any suggestions on how I further troubleshoot. I tried setting debug level logs for the custom component.dahua but it’s as if it never saw these events, though the NVR is clearly triggered and capturing events fine in it’s software.
mchome
(Dan)
June 9, 2022, 2:55am
2
Seems someone found the issue and pointed ot how to fix.
opened 04:33PM - 23 Feb 22 UTC
<!-- Before you open a new issue, search through the existing issues to see if o… thers have had the same problem.
Issues not containing the minimum requirements will be closed:
- Issues without a description (using the header is not good enough) will be closed.
- Issues without debug logging will be closed.
- Issues without configuration will be closed
-->
## Version
Latest
## Describe the bug
When using the NVR5-I series, no events are received by the event handler. I have tested three models of NVR two of which are "-I" series and one which isn't. The one that isn't and is just a standard "4KS2" model works fine, I can receive all events from the unit.
**Units Tested:**
NVR5216-8P-I | System Version | V4.002.0000000.0, Build Date: 27-07-2021|No Events Received
-- | -- | -- | --
</body>
**NVR5216-16P-I** | System Version | V4.002.0000000.0, Build Date: 27-07-2021|No Events Received
-- | -- | -- | --
**NVR5416-16P-4KS2** | System Version | V4.001.0000007.1, Build Date: 27-08-2021|Event Received Ok
-- | -- | -- | --
</body>
</html>
Adding either of the two NVR5-I units listed above seems to work in every other aspect as I can view the streams, trigger switches (such as IR on/off for example) and also enable/disable disarming. It just seems to be the events that do not come through.
As a test I added both the NVR5-4KS2 and the NVR5-I to HA and then enabled event listening within developer tools, which resulted in the below capture for the NVR5-4KS2 when triggering alarm input 1.
Event 42 fired 15:47:
{
"event_type": "dahua_event_received",
"data": {
"name": "NVR5_4KS2",
"Code": "AlarmLocal",
"action": "Start",
"index": "0",
"DeviceName": "NVR5_4KS2"
},
"origin": "LOCAL",
"time_fired": "2022-02-23T15:47:49.245925+00:00",
"context": {
"id": "8e9a1ccb243e5756f95a4ab731b52172",
"parent_id": null,
"user_id": null
}
}
If I perform this same test on the NVR5-I units I get nothing received at all and I have also tried multiple event types.
To check whether the API was working correctly on the 5-I units I ran [this script](https://gist.github.com/heisvoid/602ad1e989f21c05b767e5f9683e4bce) (I slightly modified the url to include "All" events/codes) from Ubuntu which gave me the following output when trigger local alarm input 1......
**NVR5-4KS2**
Code=AlarmLocal;action=Start;index=0
Code=AlarmLocal;action=Stop;index=0
**NVR5-I**
Code=AlarmLocal;action=Start;index=0
Code=AlarmLocal;action=Stop;index=0
So it looks like the NVR5-I units are working just the same as the NVR5-4KS2 as far as the API goes, just not in HA for some reason.
Not sure where to go from here but hoping you can provide some pointers on anything to check or any additional info I can provide?
I've enabled the debug log but nothing has appeared with regards to this from what I can see.