Hi
I’m playing around with the API on my Hikvision IP camera.
Reading this thread here I have just been able to send curl commands from my Windows laptop, to the camera to turn on or off the motion detection and that worked.
However to do this I had to create two XML files, one for on and one for off.
MotionDetectionOn.xml
<MotionDetection xmlns="http://www.hikvision.com/ver20/XMLSchema" version="2.0">
<enabled>true</enabled>
<MotionDetectionLayout version="2.0">
</MotionDetectionLayout>
</MotionDetection>
MotionDetectionOff.xml
<MotionDetection xmlns="http://www.hikvision.com/ver20/XMLSchema" version="2.0">
<enabled>false</enabled>
<MotionDetectionLayout version="2.0">
</MotionDetectionLayout>
</MotionDetection>
Curl command for motion detection on:
curl -T MotionDetectionOn.xml http://admin:password@192.168.1.15/ISAPI/System/Video/inputs/channels/1/motionDetection
Curl command for motion detection off:
curl -T MotionDetectionOff.xml http://admin:password@192.168.1.15/ISAPI/System/Video/inputs/channels/1/motionDetection
I know how to send Curl commands from Vera in a scene for example but I don’t know about also using xml payload files.
Ideally I don’t want to even have to use the xml files and just have a single line curl command that turns on or off the motion detection on the camera, but searching on Google I haven’t seen anyway to do that yet.
I guess I could just upload the xml files to Vera but its not ideal.
Searching for curl on Vera there are two locations however.
Any suggestions ?
Thanks