maciej-or / hikvision_next

Home Assistant integration for Hikvision NVRs and IP cameras
112 stars 23 forks source link

Delayed notifications of motion #18

Closed tne7laa closed 1 year ago

tne7laa commented 1 year ago

I have setup this with NVR DS-7608NI-K2 successfully and can see all 8 camera's with their entities. After making an automation it gives notifications but many minutes after motion is triggered.

maciej-or commented 1 year ago

What automations do you mean? Please check Logbook of camera if events are delayed.

tne7laa commented 1 year ago

Hi. 2 screen shots (these are in Dutch, sorry).

Looks of it is about 2 minutes delayed.

smartypantsuk commented 1 year ago

There is some delay in my end too, not 2 minutes though. But I had some delay with another integration I was using so wonder whether the delay is with hikvision equipment??

tne7laa commented 1 year ago

I don't know how to test this. Only notification I can send from NVR is via email. These emails come after the recording itself (with pictures or not). Or is there a way to get direct notifications from NVR, maybe via push?

smartypantsuk commented 1 year ago

I don't know how to test this. Only notification I can send from NVR is via email. These emails come after the recording itself (with pictures or not). Or is there a way to get direct notifications from NVR, maybe via push?

Hikvision only supports push type notifications via the hik-connect app. You could install that and try it. You need to enable hik-connect service in nvr and install it on phone or tablet

maciej-or commented 1 year ago

@tne7laa I asked rather for logbook of camera device, it'd proof if delay is on NVR or automation side, sth like that

image

I see your NVR has no ethernet inputs for cameras so bandwidth might be crowded a bit if all 8 send something.

@smartypantsuk For push notifications I use HomeAssistant app on phone and PC, they come immediately, even before hik connect. But I have all cameras connected using ethernet cable. For managing notifications from many cameras I recommend Alarmo add on, it's a great addition to this integration.

smartypantsuk commented 1 year ago

@tne7laa I asked rather for logbook of camera device, it'd proof if delay is on NVR or automation side, sth like that

image

I see your NVR has no ethernet inputs for cameras so bandwidth might be crowded a bit if all 8 send something.

@smartypantsuk For push notifications I use HomeAssistant app on phone and PC, they come immediately, even before hik connect. But I have all cameras connected using ethernet cable. For managing notifications from many cameras I recommend Alarmo add on, it's a great addition to this integration.

I'll look at alarmo add on. All my cameras are connected to nvr via ethernet. I don't use hik connect for notifications, only viewing cameras.

Currently testing using HA pushover integration to get direct alerts, but I think they are virtually instant once the alerts appear in HA logbook. I'll try through the HA app though

tne7laa commented 1 year ago

Hi. My NVR does work with Ethernet cable and all cameras are connected with ethernet to network.

I just setup Hik-Connect on NVR and iOS App. I did not do this because I want to leave my NVR locally and not exposed to internet (treats). After I setup Hik-connect I did get flooded with notifications from all cameras. "Notify Surveillance Center" was enabled in each camera in settings. I never did know what this does. Now I know. :-) I enabled only 1 camera and now I get instantly notifications. Also in HA! So Hik-Connect should be enabled mandatory for this I think? (For your manual?)

I don't understand why I get multiple loggings of the motion.

Scherm­afbeelding 2023-04-13 om 15 27 54

I have to think about leaving Hik-Connect enabled. I don't want to be hacked...

smartypantsuk commented 1 year ago

Hi. My NVR does work with Ethernet cable and all cameras are connected with ethernet to network.

I just setup Hik-Connect on NVR and iOS App. I did not do this because I want to leave my NVR locally and not exposed to internet (treats). After I setup Hik-connect I did get flooded with notifications from all cameras. "Notify Surveillance Center" was enabled in each camera in settings. I never did know what this does. Now I know. :-) I enabled only 1 camera and now I get instantly notifications. Also in HA! So Hik-Connect should be enabled mandatory for this I think? (For your manual?)

I don't understand why I get multiple loggings of the motion. Scherm­afbeelding 2023-04-13 om 15 27 54

I have to think about leaving Hik-Connect enabled. I don't want to be hacked...

You do not need hik-connect for this integration to work. You DO need to have "Notify Surveillance Center" enabled on all events you want to notify Home Assistant about.

tne7laa commented 1 year ago

You do not need hik-connect for this integration to work. You DO need to have "Notify Surveillance Center" enabled on all events you want to notify Home Assistant about.

That's strange. I had done this before I enabled hik-connect but the notifications came after about 2 minutes (like the title says and started this post). I will try to disable hik-connect and look if notifications still come directly.

smartypantsuk commented 1 year ago

Let us know how you get on doing that

tne7laa commented 1 year ago

I've disabled hik-connect now and get no notifications in hik-connect app. That's ok because I won't use use it (for now). Strangely I do get instant updates from HA when Line crossing/Motion is activated. So seems to be resolved now. Don't know why it it working now. Maybe after enable hik-connect? So, case closed so far. Thanks for helping!

smartypantsuk commented 1 year ago

@maciej-or I have noticed that if I enabled pushover notifications and HA app notifications to my phone, pushover notifications come in quicker than the HA app notifications. There isn't much in it, a few seconds perhaps.

maciej-or commented 1 year ago

cool, let's summarise, enabling and hik-connect reduced delays? maybe nvr restart did that? Notifications from HA app work for me very well and they allow to disable hik-connect if you don't need snapshot images related to event and recording preview. Hik Alarm Server sends snapshots as well but only from stand alone camera, not from NVR, (in my case) I guess it's firmware issue and I'm waiting when it'll be improved then I could add images to this integration's notifications too.

tne7laa commented 1 year ago

enabling and hik-connect reduced delays?

It looks that way but not sure why. All I know is that before I enabled it I had a delay of about 2 minutes. But know I have disabled hik-connect on NVR again and, at this time, I don't have delays.

maybe nvr restart did that?

No. Only thing I did was enabled hik-connect (registered and enabled my NVR in hik-connect website).