How to trigger my Hikvision camera to record after HUE motion sensor detects motion?

Hello this is my first post on this forum.

I installed home-assistant core (2020.12.0) on a Ubuntu 20.04 Proxmox container. It works. I am amazed since then of all the possibilities of HA what an great piece of software.

I created my first simple automation after the first week fiddling around in HA and it even works haha I never thought i would pickup this level already this fast.

Now i have kind of impossible thing i want to try, maybe someone can help.

I have a Hikvision camera hooked up to HA i also have a Philips HUE lighting systeem hooked up with several in and outdoor motion sensors.

Since my Hikvision outdoor camera does not have a PIR sensor and my HUE outdoor sensor does have PIR i figured maybe i can use the HUE motion sensor to start the Camera to start to record.

I added a guest user with right to view live stream and the right to start a remote record.

What is the next step? How do i make HA to start a record after motion is detected. In HA i see the HUE motion detections that part works. The camera is also hooked up alright because i see the camera VCA detections also. The camera records onto a 64gb sd card inside the camera.

The hikvision camera detects motion based on what happens in the view specialy at night it doesn;t pick up motion that well. The HUE motion sensor works a lot better in the dark so it would be great if i could use the HUE motion detection to start the camera to record.

Thank you for reading.

I was using following on Vera Hub
ā€œcurl -v -X PUT -u user:pass -H ā€˜Content-Type: application/jsonā€™ http://ip_address/ISAPI/ContentMgmt/record/control/manual/start/tracks/101ā€ For start record
ā€œcurl -v -X PUT -u user:pass -H ā€˜Content-Type: application/jsonā€™ http://ip_address/ISAPI/ContentMgmt/record/control/manual/start/tracks/101ā€ For stop record

Basically this are post rest requests you can adapt them to HA .
In HA i record the cameras directly on home assistant disk

1 Like

P.S. Not all models support http requests for recording

That looks promising. Iā€™am going to figure out if my camera can do this. Now i have a direction how this might work. Thank you :+1:

Hi @Miki_Krstevski tonight i tested what you advised and it works right away the first try, great!

Do you or someone else can tell me how i go from here to the next step? Now i know how to remotely start and stop the camera recording. I have the HUE motion sensor in HA how do i start the video recording, the start command wen the HUE sensor detects motion?

Never mind its working now.
I added this in configuration.yaml

shell_command:
  cam2_record_start: "curl -v -X PUT -u user:pass -H 'Content-Type: application/json' http://ip_adress/ISAPI/ContentMgmt/record/control/manual/start/tracks/101"
  cam2_record_stop: "curl -v -X PUT -u user:pass -H 'Content-Type: application/json' http://ip_address/ISAPI/ContentMgmt/record/control/manual/stop/tracks/101"

After that i created 2 automations one for: cam2_record_start
And one for: cam2_record_stop

2 Likes