Jump to content
Sign in to follow this  
RichardK

Hikvision / Swann / Lorex IP Device Management Protocol

Recommended Posts

Hikvision has a useful document here (sorry, the board won't let me use a URL tag):

http://www.hikvisioneurope.com/portal/index.php?dir=Technical%20Materials/00%20%20%20Software%20%26%20Development%20Tools/00%20%20%20Development%20Tools/00%20%20%20CGI/&file=HIKVISION%20CGI%20IPMD%20V1.5.9.pdf

 

Simple example of how to use it:

 

Retrieve shutter speed from camera. I use cURL to request the URL and the camera returns an XML block:

curl http://admin:12345@192.168.1.20/Image/channels/1/Shutter

 

Camera returns:

<?xml version="1.0" encoding="UTF-8"?>
<Shutter version="1.0" xmlns="http://www.hikvision.com/ver10/XMLSchema">
<ShutterLevel>1/12</ShutterLevel>
</Shutter>

 

To change the shutter speed from 1/12 to 1/30 I change the value and upload the text back to the camera. You could easily script this but for simplicity I just saved the previous text into a file called "shutter.xml". I edit the file to change 1/12 to 1/30 and upload the file (again using cURL). The camera changes the setting and responds with an OK status.

 

curl -T shutter.xml http://admin:12345@192.168.1.20/Image/channels/1/Shutter

Camera returns:

<?xml version="1.0" encoding="UTF-8"?>
<ResponseStatus version="1.0" xmlns="http://www.hikvision.com/ver10/XMLSchema">
<requestURL>/Image/channels/1/Shutter</requestURL>
<statusCode>1</statusCode>
<statusString>OK</statusString>
</ResponseStatus>

 

This will work on a Mac or on Linux. I believe there is a version of cURL for Windows, or you could use any other tool that allows you to do gets and puts to a web server. And of course you could script this to occur at various times of the day, for example with cron on Linux. It appears that most / all camera settings are accessible through this method.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×