maciej-or / hikvision_next

Home Assistant integration for Hikvision NVRs and IP cameras
105 stars 19 forks source link

Sensor Activity Missed #182

Open vcarron-source opened 3 months ago

vcarron-source commented 3 months ago

I've noticed that smart events are missed if triggered within say 30 seconds of each other. I have FTP upload on the camera and can see that the camera recognises every event and captures an image for the smart event however the binary sensor in home assistant misses the second event.

Is this by design or can it be changed, I don't know if it relates to the frequency of the scan interval?

Thanks!

Model DS-2CD2387G2H-LISU/SL

maciej-or commented 3 months ago

There is no scanning. HA receives requests sent by NVR. Are your events in supported list? https://github.com/maciej-or/hikvision_next?tab=readme-ov-file#supported-events for example face or car plates are not supported

vcarron-source commented 3 months ago

Yep, and they trigger, though not every time, seems the binary sensor doesn't register events with 30 seconds of the first trigger. The camera catches every event fine, no NVR just cameras straight to HA.

maciej-or commented 3 months ago

Camera can send event notifications as well but probably binary sensor cannot be triggered if its state is on, that might happen in your case. So far the integration sets state on and sensor is cleared itself. TBH I don't know how long it's on. It needs tests.