mezz64 / pyHik

Python wrapper for Hikvision camera event stream
MIT License
180 stars 50 forks source link

Multiple detection stopped working in HA #75

Open pszafer opened 3 years ago

pszafer commented 3 years ago

Hi,

Since February I think I lost ability to control most detection in my NVR.

Could you help me what is wrong? As far as I'm aware I didn't change any setting in NVR. I moved it to another room and as far as I know I put cameras in same input port. NVR is old DS-7616NI-E2 with 4 cameras. In IVMS 4200 app I see that for each camera motion and line crossing detection is enabled.

pyHik lib fetches only 2 sensors.

2021-06-19 16:50:51 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.hikvision
2021-06-19 16:50:51 DEBUG (SyncWorker_2) [pyhik.hikvision] pyHik 0.2.8 initializing new hikvision device at: http://192.168.4.3
2021-06-19 16:50:51 DEBUG (SyncWorker_2) [pyhik.hikvision] Device info namespace: http://www.hikvision.com/ver20/XMLSchema
2021-06-19 16:50:51 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.updater
2021-06-19 16:50:51 INFO (MainThread) [homeassistant.components.http] Now listening on port 8123
2021-06-19 16:50:51 DEBUG (SyncWorker_2) [pyhik.hikvision] Device triggers namespace: http://www.hikvision.com/ver20/XMLSchema
2021-06-19 16:50:51 DEBUG (SyncWorker_2) [pyhik.hikvision] Processed 48363232-3539-3438-3434-bcad28ac15c3 as NVR Device.
2021-06-19 16:50:51 DEBUG (SyncWorker_2) [pyhik.hikvision] Found events: {'VMD': [2], 'linedetection': [2]}
2021-06-19 16:50:51 DEBUG (SyncWorker_2) [pyhik.hikvision] Initialized Dictionary: {'Motion': [[False, 2, 0, datetime.datetime(2021, 6, 19, 16, 50, 51, 961684)]], 'Line Crossing': [[False, 2, 0, datetime.datetime(2021, 6, 19, 16, 50, 51, 961689)]]}
2021-06-19 16:50:51 DEBUG (SyncWorker_2) [pyhik.hikvision] Unable to fetch motion detection.
2021-06-19 16:50:52 DEBUG (SyncWorker_2) [pyhik.hikvision] Added update callback to <bound method HikvisionBinarySensor._update_callback of <Entity Network Video Recorder Motion 2: off>> on 48363232-3539-3438-3434-bcad28ac15c3.Motion.2
2021-06-19 16:50:52 DEBUG (SyncWorker_2) [pyhik.hikvision] Added update callback to <bound method HikvisionBinarySensor._update_callback of <Entity Network Video Recorder Line Crossing 2: off>> on 48363232-3539-3438-3434-bcad28ac15c3.Line Crossing.2
2021-06-19 16:50:52 INFO (MainThread) [homeassistant.bootstrap] Home Assistant initialized in 1.53s
2021-06-19 16:50:52 INFO (MainThread) [homeassistant.core] Starting Home Assistant
2021-06-19 16:50:52 INFO (MainThread) [homeassistant.core] Timer:starting
2021-06-19 16:50:52 DEBUG (Thread-3) [pyhik.hikvision] Stream Thread Started: Network Video Recorder, 48363232-3539-3438-3434-bcad28ac15c3
2021-06-19 16:50:52 DEBUG (Thread-3) [pyhik.hikvision] Network Video Recorder Connection Successful.
2021-06-19 16:50:52 INFO (MainThread) [homeassistant.components.zeroconf] Starting Zeroconf broadcast
2021-06-19 16:51:00 DEBUG (Thread-3) [pyhik.hikvision] Device alerts namespace: http://www.hikvision.com/ver20/XMLSchema

any idea what is wrong with my setup?