Hikvision camera recording

Hello to all, i have manged to include multiple cameras in Vera, also managed to add motion and pir detection on the camera. But i’m not able to make recording to work. Has anybody managed to record Hikvision cameras on to vera system? I also tried Bosch camera and recording works out of the box.

Given the Vera box’s limited storage capacity, one would never intentionally record video to Vera. Instead, you’d either route your camera stream to a PC running BlueIris (for example) for Windows, or a NAS device (e.g. Synology DiskStation) capable of realtime recording. Then again, lots of modern cameras have on-board storage in the form of SD cards. (Is that what you are attempting to trigger?)

As to how or whether Vera could control those operations, I assume it’s possible (someone else will certainly chime in shortly), but I don’t know firsthand. I do know that there’s a BlueIris plug-in for Vera.

1 Like

I know that vera is not built to replace the recording, but since there is option i would like that one recording which will happen once in a month or a year when i’m away and there is movement or event in my vera system to be recorded on vera and beside my VMS where i have recordings from every motion event. This way i can get to the recording immediately instead to compare times and search for the actual event on my VMS. What is the point to have all this sensors and iot devices connected together if you can not use them when are needed most. An the option is there.

Ah, I understand. Having NEVER successfully gotten a camera to work in connection with my own Vera, I was unaware that “Record” was even an option.

Just be aware that the free memory inside most Vera units can be stated in “tens of megabytes” while the average color video file – even a very short one – can occupy hundreds of megabytes. I don’t really see how storing it locally will make much sense, but you mustn’t let my assumptions discourage you.

I might suggest an alternative, namely that you instruct the camera to record the short burst you want and then email it to yourself (via SMTP) for later review. That’s how I have my home’s 4-camera DVR set up, so that certain motion detection settings cause a brief video snippet to be emailed.

(I then have an automated Google Script copy those video attachments into a folder in Google Drive, which also deletes the oldest copies.)

GOOD LUCK! I’m sure someone else with Vera+camera+video experience will jump in now…

  • Libra

P.S. Meanwhile, please also see UI7 motion triggered video recording
Hikvision DS-2CD2120F-I

Most especially, check out this previous thread:

Hello to all,

Can somebody help me with some lua code? i’ve managed to get the API for Hikvision products and there is option to trigger manual recording on the camera with HTTP POST Request.

i tried the command with Postman and for some reason it works with PUT not POST. i just use http://ip_adress_of_camera/ISAPI/ContentMgmt/record/control/manual/start/tracks/101 and in authorization field i put the basic auth - user and pass for the camera and it starts and stops recording on a respective commands. I have a trouble how to implement this in lua code.

Thanks in advance.

A post request example

local http = require("socket.http")
  http.TIMEOUT = 5
  result, status = http.request("https://some_url", "device=gt1&priority=normal&payload=launch")   


How did you integrate the cameras motion detection in to Vera?

I edited hikvision_configuration_mios.lua file to include models that i have, which models do you have?

Yes but the issue is that when i tried it with postman POST command did not work and PUT command worked, i dont know how to include the authorization to a PUT command

have you tried

That will work for GET command i guess but for PUT no.

Don’t know if this might help?

See here for how I send Post commands to Kodi media center with username and password from Vera scenes.

Have you tried
a header field in the form of Authorization: Basic <credentials> , where credentials is the base64 encoding of id and password joined by a single colon :

I think i need that but dont know how to do it :slight_smile:

have a look here

So i found the solution

for start of manual recording os.execute("curl -s -X PUT -H 'Content-Type: application/xml' -d http://IP_Adress/ISAPI/ContentMgmt/record/control/manual/start/tracks/101")

for stop of manual recording os.execute("curl -s -X PUT -H 'Content-Type: application/xml' -d http://IP_Address/ISAPI/ContentMgmt/record/control/manual/stop/tracks/101")

When using this on IP camera with SD card it will record on SD Card

if you try to use this on DVR/NVR 101 is channel 1, 201 is channel 2, 301 is channel 3 etc…

I hope that somebody will find this useful.

edit: its not working :frowning: i will continue to investigate


After couple of try and errors here is the final code

For start recording
os.execute(“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 recording
os.execute(“curl -v -X PUT -u user:pass -H ‘Content-Type: application/json’ http://ip_address/ISAPI/ContentMgmt/record/control/manual/start/tracks/101”)

1 Like

Glad you got it working.

So can you elaborate on adding a Hikvision camera in to Vera?

I know Vera doesn’t support Rtsp streams.

And I know how to add generic IP cameras into Vera using their http mjpeg or jpg snapshot URL etc.

But what I don’t really know, is how the motion detection on the IP cam is added and used in Vera? How do you use that motion detection as a trigger in Vera?

Did you use some Hikvision plugin for Vera to add the camera that also adds a virtual motion sensor?


I’m using the Hikvision Alpha plugin in the store and i’m adding camera via the wizard.

i also edit the hikvision_configuration_mios.lua

here is my file which is tested on the following cameras:

HWC-P120-D/W - this is HiWatch sub brand of Hikvision

hikvision_configuration_mios.zip (987 Bytes)

also this i believe was made available with 7.30 firmware

Best regards

1 Like

Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules