maciej-or / hikvision_next

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

Scene Change Detection entity is now not present #98

Closed Loic691 closed 2 months ago

Loic691 commented 1 year ago

Hi Since, one or 2 two update, I have to add the check manually for the predense or not in a HDD in the camera. But after applied this modification waiting the PR, the entity Scene Change Detection is not present. I think there is no link between these 2 things.

It was OK before. Do you have any idea for this ? My HIK camera version and firmware : DS-2CD2146G2 firmware 5.7.13 The link method in the camera config is OK. and we can enable/disable the scene detection from the device itself but just the entity is now not visible in hikvision_next...

kroese commented 1 year ago

I have the same issue

maciej-or commented 2 months ago

https://github.com/maciej-or/hikvision_next/releases/tag/v1.0.16

Loic691 commented 2 months ago

Hi The issue iq already présent since more one yearq. Th e scène detection evebts and switch works with an other domotics solution. How can i help to solde it ?

maciej-or commented 2 months ago

pls attach diagnostic data of your nvr available on device page, then I could simulate your setup in test environment.

Loic691 commented 2 months ago

I have no nvr. This is the scene detection of hikvision camera Can we have diag data as on nvr ?

maciej-or commented 2 months ago

Diagnostic data is available for any device. Just go to the device page and download: image

Loic691 commented 2 months ago

Hi Thanks. I became to search on cam itself... ;-) Here's 2 diag file "isSupportSceneChangeDetection" is been supported !

config_entry-hikvision_next-01J2XCR3592AWRQ9A2YPEZKG4D.json

config_entry-unifi-b0c95d01ad53d62e9c000d9f9510d1e3.json

maciej-or commented 2 months ago

I'm afraid you did not upgrade the integration to v1.0.16, you are still on v1.0.15. Remember to restart HA after upgrade.

Loic691 commented 2 months ago

Yes because i had the bug on starting on the last stable which is correctement but not déployer on hacs...

maciej-or commented 2 months ago

right, the bug is fixed but not released yet, pls pull main branch of the integration

Loic691 commented 2 months ago

right, the bug is fixed but not released yet, pls pull main branch of the integration

Oh done And scene detection appears ;-) Thanks

PS : Is there plan into integration to get more events when available. For example type of intrusion : vehicule, person,.. and zone ? In the past I writed a plugin for another platform (jeedom) and I get these type of events.

Regards

maciej-or commented 2 months ago

Intrusion detection and region entrance, exiting are supported. As far as I know there is no intrusion type included in the alert (person or vehicle). Regarding faces and car plates recognition, my equipment does not support them so I have not enough data to implement that. If I had XML files with these alerts sent by Hikvision device, like https://github.com/maciej-or/hikvision_next/blob/main/tests/fixtures/ISAPI/EventNotificationAlert/ipc_1_fielddetection.xml I could try adding this in a test environment. I am able to simulate any device with its diagnostic data. If you would like to contribute the integration I can help and do code reviews.

Loic691 commented 2 months ago

Yes we have these information in XML. I used it with my old module in jeedom. We can have zone and type of object but yes not for all types of camera.

I can try to get time to send you XML files for each events. If i am right we have thsvobject for each event.

I have to find in my old notes the debug mode of the URL of the camera to have this. If you can refresh my memory with a simple exemple, I can send you this quickly

My camera is acusense one.

maciej-or commented 2 months ago

Any notification XML should begin from node. For adding sensors and switches I need to know if device supports an event and if it is enabled. According to the documentation there is several endpoints for that events supported: ISAPI/System/capabilities events enabled: ISAPI/Event/triggers/ diagnostic data contains 2 above more over some events have separate URL with enabled state: Human face detection:/ISAPI/Event/triggers/faceDetect/ Human face identification:/ISAPI/Event/triggers/FaceDiscern/ License plate identification:/ISAPI/Event/triggers/platLicenseRecog/

Loic691 commented 2 months ago

The following of this enhancemnt discussion is here https://github.com/maciej-or/hikvision_next/issues/191