Control hikvision cam via HA

Hi

I have a Hikvision NVR (DS-7616NI-K2) with several Hikvision cameras( DS-2CD2347G2-LU) connected to it.

I have a Rpi4 that runs my HomeAssistant for lights presence etc.
I automated my presence detection ( Home/away) in HA via our mobile phones.

Cameras are currently set to motion detection 24/7.
Ideally, cameras in our garden only record at the NVR and only generate notifications in the hikvision app when we are away from home.

Currently we always get notifications, so even if we trigger the motion detection ourselves. I’m trying to make this smarter.

I found Hikvision intergration ‘hikvisioncam’ for HA that should be able to send commands from HA to your camera to control your camera. For example switch pir detection on or off based on presence status in HA.

At the page for hikvision Cam I can see how have a I can see how to configure config.yaml etc. But not how to create an automation to control the cam. What commands to send?

Does anybody know how I can make the hikvision switch via automation?

Thanks for advice.

I have the same Hikvision. What i have done is installed frigate.
And i have 1 input to see if my alarm system is armed/disarmed

And i also do a perimiter security,when person is detected after the alarm is armed.

It seems like the hikvisioncam integration (source code) just adds a single standard switch for motion detection, so you should be able to use the standard switch.turn_on and switch.turn_off services.
You can improve the hikvisioncam documentation yourself, see the “Help us improve our documentation” box at the bottom of the page.

Hi all,

Thanks for the feedback. My original idea was to send a command to my Hikvision NVR to switch notifications on or off in the hikcameras or NVR based on our presence. The Hikvision app would then only record motion and send motion notifications in case nobody is home. I did not succeed to send such a command from HA to the Hik NVR.

Instead, I integrated the cameras to HA via ONVIF. I have 9 cams, Frigate makes my RPI4 really slow. BTW I don´t want to invest in extra (google dongle) for improving this performance.

Via HA I let the cameras take snapshots when motion is detected and send notifications via HA App.
If I want to playback the recorded clip I need to go to the Hikvision app. In the Hikvision App, I switched off all notifications, such that HA, based on presence, will be the only one sending notifications.

One downside wrt my original plan, the HikCams will record motion (of ourselves) when we are at home in our garden. If I could have HA to switch recording/notifications I could have prevented this. The current setup is still very OK for me, the most important was to prevent notifications (of our own motion) while being home! Thanks!!

1 Like