mezz64 / pyHik

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

Track events not shown in triggers XML endpoint #67

Open mezz64 opened 3 years ago

mezz64 commented 3 years ago

Some newer devices don't seem to have the ISAPI triggers endpoint that returns all camera trigger options, instead only responding to the non-ISAPI endpoint which only lists basic events.

An option should be added to allow the user to pass in a manually defined dictionary of events they would like to track and process those items from the alertStream without caring if they exist in the trigger XML.

theBOFH commented 3 years ago

followed this over from "New gen Hikvision WIFI-Cam not usable with pyHik? #62" Just upgraded to HomeAssistant 0.117, thank you very much for getting the basic motion binary sensor working :-)

Very much interested in getting the other sensors working (intrusion detection and line cross). Looking into the possibility of using the human/vehicle triggers to automate outdoor lighting etc

Let me know if there is anything I can assist with on the testing front.

Seeing the same as the testing in #62 can see the triggers being posted when listening to the curl http://ip/ISAPI/Event/notification/alertStream --digest -u username:password

`

80 HTTP 1 2020-10-29T13:33:18+00:00 1 Camera 01 linedetection active linedetection alarm 1 50 527 986 543 432 human

--boundary`

keiron1992 commented 3 years ago

Following. Wish there was a way I could help :(

cllp53 commented 3 years ago

I think it would be helpful to add all the sensors available from the capability list of the "smart" alarms even though the trigger might not be set to Surveillance Center. I currently have only basic motion sensor available in HA, and it's frustrating... Thanks for considering :)

http://ip/ISAPI/Smart/capabilities

`<?xml version="1.0" encoding="UTF-8"?>

true false false false true false true true true true false false false false false false false true false false `
mezz64 commented 3 years ago

The goal will be to let the user specify, so anything that shows up in the alert stream will be valid, this should include smart events.

mbedk commented 3 years ago

Any idea when the line crossing will be available?

ruffle-b commented 3 years ago

If you upgrade your camera firmware (5.5.160 worked for me) then the Smart Events work again. Looks like there was a firmware bug.

pergolafabio commented 3 years ago

The goal will be to let the user specify, so anything that shows up in the alert stream will be valid, this should include smart events.

Hi, is this still in development?

I have an intercom device , with events about the door status... https://github.com/mezz64/pyHik/issues/77