Create an alert when the Hikvision binary sensors change state

Hi Everyone,

I am just starting with Home Assistant.
I have multiple hikvision cameras, and I have been able to add them to HomeAssistant (using the Hikvision Binary Sensor component). I have the events like line crosssing and face detection enabled on the camera, and have verified that these reflect correctly in the HomeAssistant UI

What I would like to do do now, is to create an alert when the LineCrossing or faceDetection events fire. I have the basic automation done, but I would also like to add a snapshot to the alert.

Is there any way of doing this ?

I know that the HikVision binary sensors dont expose any video, and I would appreciate any help on how I can proceed further.

Thanks in advance,

I personally used the hikvision’s built-in application to email me a snapshot (actually sends 3 pics) for line crossing. I decided not to be emailed for motion detection as I’d be spammed.
(there are enough times I get an email because some pigeon crossed the bloody line :smiley: )
To get the snapshot you could use FFMPEG. Check this post:
You’d then need to set an automation to triggers upon motion detected, fire the FFMPEG command, wait for the file to be generated (a delay command maybe? or better still a wait_template with a file sensor) then generate an email and attach that file.
I found the hikvision app easier to do :slight_smile:

So, here is what I have working so far -

  1. Added Hikvision devices as binary sensors, to get the sensors
  2. Added the same devices as generic cameras, with a still image URL, so that I can call the camera.snapshot process to take a picture for me.

I will try the automation pieces later, and update back. Hope to have it running with iOS push notifications soon