tomasbedrich / home-assistant-hikconnect

A Home Assistant integration to communicate with Hikvision smart doorbells via Hik-Connect cloud.
40 stars 9 forks source link

Add Line Crossing and Motion Detection #18

Closed peteshoard closed 2 years ago

peteshoard commented 2 years ago

I would like to be able to be able to use line crossings and motion detections to be able to automate certain things, like the turning on of outside lights or notifications that someone has entered my property.

Thanks

pergolafabio commented 2 years ago

Don't think that those events are on hikconnect, you need to use the SDK for that, I use it too

peteshoard commented 2 years ago

Any chance you could point me at some examples or a reference? Wouldn't know where to start.

Thanks

pergolafabio commented 2 years ago

Sure, i posted all isapi/sdk info here:

https://community.home-assistant.io/t/ds-kd8003-ds-kv8113-ds-kv8213-ds-kv6113-ds-kv8413-and-integration-hikvision-hikconnect-video-intercom-doorbell/238535

the script i used and modified was 👍 https://github.com/laszlojakab/hikvision-intercom-python-demo

addon i created is here, that one i use for events like door open/call status/ motion is also possible, just change sensor

https://community.home-assistant.io/t/ds-kd8003-ds-kv8113-ds-kv8213-ds-kv6113-ds-kv8413-and-integration-hikvision-hikconnect-video-intercom-doorbell/238535/726

the dockerfile, in that zip is old, change it to below, it includes now : lbffi-dev , for some reason some users need it for call status events

FROM python:3.7-slim

RUN pip install requests RUN apt-get update && apt-get install -y libffi-dev

COPY hik.py /hik.py COPY hcnetsdk.py /hcnetsdk.py COPY lib /lib COPY run.sh /run.sh

CMD [ "/run.sh" ]

CMD [ "python3", "hik.py" ]

ENTRYPOINT ["tail", "-f", "/dev/null"]

tomasbedrich commented 2 years ago

Agree with @pergolafabio, these events are very probably not sent to Hik-Connect. If you show me such function in Hik-Connect application, I will be happy to re-open that.