hikvision_next
hikvision_next copied to clipboard
some cameras not getting motion detection binary sensors
Hi, I was having problems and narrowed it down to this
As you can see from the logs - some cameras get motion detection binary sensors and some dont
What would cause this to happen?
One camera that isnt' getting it is very clearly setup for motion detection.
one thing I am suspicious of as being related is this hivision NVR supports digital and analog cameras. ->A1-16 are analog and D1-D8 are digital = 24 cameras. 17 to 24 below are getting motion detection. I believe 17-24 is = D1-D8. The motion detection "notifications" from hikvision to home assistant is coming across is 5 instead of 17+5 or 23 where the motion detection is enabled. Motion detection is enabled on D5. The analog cameras are disabled but the integration is still picking them up and registering them.
Any ideas how to fix it?
2023-11-15 13:16:52.685 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_17_motiondetection 2023-11-15 13:16:52.685 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_17_videoloss 2023-11-15 13:16:52.686 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_18_motiondetection 2023-11-15 13:16:52.686 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_18_videoloss 2023-11-15 13:16:52.686 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_19_motiondetection 2023-11-15 13:16:52.687 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_19_videoloss 2023-11-15 13:16:52.687 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_20_motiondetection 2023-11-15 13:16:52.687 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_20_videoloss 2023-11-15 13:16:52.688 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_21_motiondetection 2023-11-15 13:16:52.688 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_21_videoloss 2023-11-15 13:16:52.691 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_22_motiondetection 2023-11-15 13:16:52.691 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_22_videoloss 2023-11-15 13:16:52.691 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_23_motiondetection 2023-11-15 13:16:52.692 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_23_videoloss 2023-11-15 13:16:52.692 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_24_motiondetection 2023-11-15 13:16:52.692 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_24_videoloss 2023-11-15 13:16:52.693 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_1_videoloss 2023-11-15 13:16:52.693 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_2_videoloss 2023-11-15 13:16:52.694 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_3_videoloss 2023-11-15 13:16:52.694 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_4_videoloss 2023-11-15 13:16:52.694 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_5_videoloss 2023-11-15 13:16:52.695 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_6_videoloss 2023-11-15 13:16:52.695 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_7_videoloss 2023-11-15 13:16:52.695 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_8_videoloss 2023-11-15 13:16:52.698 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_9_videoloss 2023-11-15 13:16:52.699 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_10_videoloss 2023-11-15 13:16:52.699 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_11_videoloss 2023-11-15 13:16:52.699 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_12_videoloss 2023-11-15 13:16:52.700 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_13_videoloss 2023-11-15 13:16:52.700 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_14_videoloss 2023-11-15 13:16:52.700 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_15_videoloss 2023-11-15 13:16:52.701 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_16_videoloss 2023-11-15 13:16:52.701 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_1_io 2023-11-15 13:16:52.701 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_2_io 2023-11-15 13:16:52.702 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_3_io 2023-11-15 13:16:52.702 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_4_io 2023-11-15 13:16:52.702 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_5_io 2023-11-15 13:16:52.703 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_6_io 2023-11-15 13:16:52.703 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_7_io 2023-11-15 13:16:52.703 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_8_io 2023-11-15 13:16:52.706 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_9_io 2023-11-15 13:16:52.706 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_10_io 2023-11-15 13:16:52.707 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_11_io 2023-11-15 13:16:52.707 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_12_io 2023-11-15 13:16:52.707 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_13_io 2023-11-15 13:16:52.708 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_14_io 2023-11-15 13:16:52.708 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_15_io 2023-11-15 13:16:52.708 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_16_io 2023-11-15 13:16:52.708 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_17_io 2023-11-15 13:16:52.709 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_18_io 2023-11-15 13:16:52.709 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_19_io 2023-11-15 13:16:52.709 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_20_io 2023-11-15 13:16:52.709 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_21_io 2023-11-15 13:16:52.710 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_22_io 2023-11-15 13:16:52.710 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_23_io 2023-11-15 13:16:52.710 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_24_io 2023-11-15 13:16:52.710 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_25_io 2023-11-15 13:16:52.711 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_26_io 2023-11-15 13:16:52.713 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_27_io 2023-11-15 13:16:52.713 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_28_io 2023-11-15 13:16:52.714 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_29_io 2023-11-15 13:16:52.714 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_30_io 2023-11-15 13:16:52.714 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_31_io 2023-11-15 13:16:52.714 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.hikvision_next entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_32_io
i think the issue is that the analog cameras were explicitly disabled in hikvision
Hi,
Analog cameras don't do any detection by design, it can be done by NVR if it supports that. Digital cameras can do detection or it can be handled by NVR, it depends on model and settings.
I agree that NVR sends wrong digital camera indexes but so far offset is 32 not 16 for tested models. Please share another log as described here: https://github.com/maciej-or/hikvision_next#reporting-issues also diagnostic data would be valuable by solving this issue. You can get it from Device context menu:
Remember to trigger motion to have details in log starting from
--- Incoming event notification --- line
If you disable some cameras on NVR you need to reload device (using the same context menu) to update changes on Home Assistant side.
hi. i have this model -> DS-7216HUHI-K2. it has 16 analog channels and 8 configured IP cameras. i only use the IP cameras. the issue is that IP camera has this stream entity: camera.ds_7216huhi_k21620210629ccwrg27945840wcvu_2002 this still photo entity: http://192.168.50.52/ISAPI/ContentMgmt/StreamingProxy/channels/2001/picture but this is the motion detected entity: binary_sensor.ds_7216huhi_k21620210629ccwrg27945840wcvu_4_motiondetection
20 (camera index)-16 (analog cameras) = 4 (motion detection) index.
i figured it out - it's not a problem affecting me anymore. but just a reference for other people that maybe were expecting the motion detection index to match the stream index
thanks!