-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not receiving events from NVR5xxx-I #168
Comments
I'm having the same issue. Other things that happens on my setup is that:
No matter for wich camara I disable / enable smart motion detecion, the one that is disabled is channel 0 (Camara 1) I don't have experience to attache more info, but please let me know if I can give more details. Any help appretiated, thanks. |
This is the log while I'm having smart motion events but seems not to be on ha
|
Hi @mooton85 |
Sounds like a different issue to mine to be honest, I get nothing at all. I have noticed something in the log which I missed initially as I do have a doorbell/VTO attached and thought this was a false error as it works fine.....
However, the IP address listed is the NVR5-I not the doorbell, so it maybe this is related to the problem, if the integration is detecting the NVR5-I as a VTO/Doorbell and failing to subscribe to push (other functions work fine). When I add the NVR5-4KS2 this error is not present. |
I think you might be onto something with the doorbell. This is the IP address of my NVR, not the doorbell. The doorbell works fine and I receive events from it without issue directly (192.168.1.21). However I receive NO events at all from the NVR for any of the events that happen. My NVR is a DHI-NVR5208-8P-4KS2E model. |
@rroller is there any logging or access I can give you to help troubleshoot this problem. More then happy to work with you to figure out what is going on. |
Sorry just haven't had any free time to dig in. Hopefully soon |
Not a problem. Let me know if I can provide anything to help out. |
@rroller I found a line of code that is causing the issue for me at least. My NVR is a DHI-NVR5208-8P-4KS2E and this was causing it to be detected as a doorbell. Not sure what other systems start with DHI, but for me at least I was able to get it working by simply removing the DHI check as per the blow sample. This is from line 504 in init.py
|
same problem here with dhi-nvr2108hs-i. removing dhi detection solved the problem for me too . |
@dracon80 I've only just got round to trying this and confirm that it fixed my issue too. Thanks for the info as it was driving me mad and I would have never found that. Strange that only my -I unit was affected as pretty much any branded Dahua recorder starts with DHI. |
I have been troubleshooting this for weeks with no events flowing. It was working fine before for many months until maybe 1 month ago. Not sure why this turned up as an issue now when I think this lib has had no changes. But I can confirm editing out the m.startswith("DHI") restores events flowing. My cams/nvr is N85DL6Z cam, N54B3P2 NVR. I have no doorbell. The cams all appear fine in home assistant, but the events for motion (or anthing it seemed) stopped flowing maybe 1 month ago and all my automations didn't work. This was the error that was showing up, same as above and all events stopped flowing until this fix was applied. Now this error no longer appears and events flow. [custom_components.dahua] Connection to VTO failed will try to connect in 30 seconds, error: [Errno 111] Connect call failed ('{edit}', 5000), My suspicion is that a recent NVR firmware and camera firmwware updates (I did both) altered the name it returned and used by this library. So maybe before it didn't start with DHI, but did now. |
If anyone has both an NVR and VTO like me, then you're better off renaming it to "m.startswith("DHI-VTO") otherwise removing it completely fixes the NVR but introduces the issue on the VTO. |
{Putting this comment back in but using my personal account; this comment was just before mooton85 last comment before}....Circling back on this. Recent update on this line in the init.py still has an issue for folks with no doorbell, but have certain types of NVR. Suggest striking the "m.startswith("DHI")" or making it more specific like m.startswith("DHI-VTO"). Right now the line as is with DHI will quietly have all events fail for people using this but have no doorbell. My NVR is model N54B3P. It apparently returns DHI in the name but there is no doorbell. The logs ends up with notes around VTO failed to connect and no events flow, silently. def is_doorbell(self) -> bool: |
I have exactly the same problem with my NVR: DHI-NVR5216-16P-4KS2E. I don't see any event in HA using the standard custom_integration. When removing the DHI check, events are working. |
Thanks, this solved it for me. I have a DHI-NVR5216-16P-4KS2E NVR. |
Same issue with my DHI-NVR5208-8P-4KS2E NVR. I changed this in
to:
And after a restart the NVR was no longer detected as a doorbell and stopped generating errors about connection to VTO. Thanks dracon80 for the solution. |
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:
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 (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.
The text was updated successfully, but these errors were encountered: