I created a 5 step procedure for automating modification of Hikvision camera image settings for dawn and dusk using
Blue Iris. I know this procedure is described elsewhere, but I wanted to provide a procedure with specific examples of the necessary configuration.
Note 1: This procedure requires the cURL command line tool and assumes you have a copy of curl.exe saved at C:\Windows\System32.
Note 2: This procedure assumes an up to date version of BI 4.
STEP 1 Hikvision Camera Image Settings XML Extract
•It will be necessary to extract the camera’s image settings in XML format. To get the XML image settings extract from your Hikvision camera, use Google Chrome and enter the following in the address bar:
Code:
http://UserName:Password@CamIPAddress:PortNumber/Image/channels/1
•When you press ENTER, a page similar to the one below will be generated. Select all of the text and copy it for use in the next step.
STEP 2 Create .xml File Using Notepad
•Start Notepad and paste the contents from the previous step into the new Notepad document.
•Select SAVE AS and save to a folder you have created for your scripts (e.g. C:\CameraScripts)
•In the Save as type field, select All files (*.*)
•In the File name field, enter a file name with the .xml extension (e.g. ImageDayCam1.xml) and press OK.
•Your Notepad document will look similar to the one below.
•You will need to create separate XML files for each of your cameras. For each camera create an XML file for daytime and nighttime image settings.
STEP 3 Create Batch Files Using Notepad
•Start Notepad and enter batch scripts similar to those shown below.
•Select SAVE AS and save to C:\CameraScripts
•In the Save as type field, select All files (*.*)
•In the File name field, enter a file name with the .bat extension (e.g. ImageDay.bat) and press OK.
•You will need to create a batch file for daytime and a batch file for nighttime.
Example Batch Script for Daytime Settings
Code:
curl -T ImageDayCam1.xml http://UserName:Password@Cam1IPAddress:PortNumber/Image/channels/1
curl -T ImageDayCam2.xml http://UserName:Password@Cam2IPAddress:PortNumber/Image/channels/1
curl -T ImageDayCam3.xml http://UserName:Password@Cam3IPAddress:PortNumber/Image/channels/1
exit
Example Batch Script for Nighttime Settings
Code:
curl -T ImageNightCam1.xml http://UserName:Password@Cam1IPAddress:PortNumber/Image/channels/1
curl -T ImageNightCam2.xml http://UserName:Password@Cam2IPAddress:PortNumber/Image/channels/1
curl -T ImageNightCam3.xml http://UserName:Password@Cam3IPAddress:PortNumber/Image/channels/1
exit
STEP 4 Configuring Blue Iris Camera PTZ/Control presets
•In Blue Iris, go to camera properties on the camera of your choice (it doesn't matter which camera). Select the PTZ/Control tab and click on the Edit presets…button.
•Configure the first preset to run the daytime batch file as shown in the image below.
•Configure the second preset to run the nighttime batch file as shown in the image below.
STEP 5 Configuring Blue Iris Camera Event Schedule
•In Blue Iris, go to camera properties (on the same camera you chose in the previous step). Select the Schedule tab and click on the Event schedule…button.
•In the Event schedule window, you need to create two PTZ Preset events – one for sunrise and one for sunset. The image below shows the Event schedule as it looks after the two events have been configured. The images on the right show how each PTZ Preset event is configured.
