INSTAR 720p IP Camera CGI Application Guide
INSTAR 720p IP Camera CGI Application Guide
IP Camera CGI Introduction
CGI listed in this file which is provided for your INSTAR IP camera, is an interface based on the HTTP protocol and the client application (e.g. a webpage in your web browsers or other applications). You can make various operations on the device by this set of CGI commands.
- CGI authentication: to access below CGI commands you need to authenticate your user level. Different CGI commands need different authority: visitor, operator or admin. The authentication is handled over the http protocol by attaching the user name and password directly to the CGI parameter. Example:
/cgi-bin/hi3510/cleanlog.cgi?usr=admin&pwd=instar
- All the CGI commands support GET and POST operation - except upgrade.cgi and restore.cgi, which can only be used in a POST operation.
GET Example:
<form name="form2" method="get" action="cgi-bin/hi3510/cleanlog.cgi">
<input name="cururl" type="hidden" >
<input name="name" type="hidden" value="access"></form>
POST Example:
<form name="form5" method="post" target="retframe" enctype="multipart/form-data"action="cgi-bin/hi3510/upgrade.cgi" onSubmit="return upgrade()">
<input type="file" name="setting_file">
<input type="submit" value=" submit"> </form>
CGI Return:
Depending on the returned info, the returns can be divided into two cases:
- GET CGI of device status and parameter, if successful,will return plain txt which includes the device status or parameter. The format is specified as javascript and every status or parameter as a variable:
var bps_1="2048";
var fps_1="25";
var gop_1="50";
var brmode_1="1";
var imagegrade_1="1";
var width_1="704";
var height_1="576";
If the GET fails, it will return:“[Error]GET video attribution error! errcode is 0xa10e6008”
. - Set device parameter will return plain txt including the result of the operation. If successful, the return will be
HTTP/1.0 200 OK
. If the operation fails an error message will be returned, like:[Error][Data-Length:91] unrecognized or incomplete command line..
- CGI commands can be typed into your web browsers address line directly for testing:
Software Menu
Netzwerk Menu
System Menu
Multimedia Menu
Alarm Menu
Komplette CGI Liste
720p WebUI
List of the most needed CGI commands
Both ways to authenticate are valid - e.g. for user = admin and password = instar:
- http://admin:instar@IP ...
- ... ?usr=admin&pwd=instar
Both are used interchangeable in this documentation!
Video & Snapshot | |
---|---|
rtsp://admin:instar@IP-Address:RTSP-Port/11 VLC Stream (High Resolution) | |
rtsp://admin:instar@IP-Address:RTSP-Port/12 VLC Stream (Medium Resolution) | |
rtsp://admin:instar@IP-Address:RTSP-Port/13 VLC Stream (Low Resolution) | |
http://IP-Address:Port/tmpfs/snap.jpg?usr=admin&pwd=instar Snapshot (720p) | |
http://IP-Address:Port/tmpfs/auto.jpg?usr=admin&pwd=instar Snapshot (352p) | |
http://IP-Address:Port/tmpfs/auto2.jpg?usr=admin&pwd=instar Snapshot (176p) | |
http://IP-Address:Port/mjpegstream.cgi?-chn=11&-usr=admin&-pwd=instar MJPEG Stream 11 | |
http://IP-Address:Port/mjpegstream.cgi?-chn=12&-usr=admin&-pwd=instar MJPEG Stream 12 | |
http://IP-Address:Port/mjpegstream.cgi?-chn=13&-usr=admin&-pwd=instar MJPEG Stream 13 |
also note the additional SDK documentation for accessing video / audio
Pan & Tilt | |
---|---|
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=right Moves continuously right | |
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=left Moves continuously left | |
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=up Moves continuously up | |
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=down Moves continuously down | |
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=stop Stops moving camera-head | |
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=1&-act=right Moves one step right | |
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=1&-act=left Moves one step left | |
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=1&-act=up Moves one step up | |
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=1&-act=down Moves one step down | |
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=home Go to Center Position | |
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=hscan Scan horizontal | |
http://IP-Address:Port/cgi-bin/hi3510/ptzctrl.cgi?-step=0&-act=vscan Scan vertical | |
http://IP-Address:Port/cgi-bin/hi3510/preset.cgi?-act=set&-status=1&-number=[0-7] Set a position | |
http://IP-Address:Port/cgi-bin/hi3510/preset.cgi?-act=set&-status=0&-number=[0-7] Unset a position | |
http://IP-Address:Port/cgi-bin/hi3510/preset.cgi?-act=goto&-status=1&-number=[0-7] goto to a set position |
Image | |
---|---|
http://IP-Address:Port/cgi-bin/hi3510/param.cgi?cmd=setimageattr Sets the Image Parameter |
You can set the following parameters:
- brightness :: [0 - 255] the bigger the value the brighter the image
- saturation :: [0 - 255] the bigger the value the more saturation the image has
- contrast :: [0 - 255] the bigger the value the more contrast the image has
- hue :: [0 - 127] the bigger the value the more hue the image has
- flip :: (on , off) flips the image
- mirror :: (on , off) flips the image
- scene :: (auto , indoor , outdoor) sets the white balance mode
Example:
http://IP-Address:Port/cgi-bin/hi3510/param.cgi?cmd=setimageattr&-brightness=0&-saturation=0&-contrast=0&-hue=0&-flip=off&-mirror=off&-scene=auto
WLAN | |
---|---|
http://IP-Address:Port/cgi-bin/hi3510/param.cgi?cmd=setwirelessattr Reset the Parameter Values |
Example:
http://IP-Address:Port/cgi-bin/hi3510/param.cgi?cmd=setwirelessattr&-wf_ssid=SSID&-wf_enable=0&-wf_auth=2&-wf_key=1234&-wf_enc=1&-wf_mode=0
IR-LED | |
---|---|
http://192.168.178.87/cgi-bin/hi3510/param.cgi?cmd=setinfrared&-infraredstat=auto Sets IR LED's to auto mode | |
http://192.168.178.87/cgi-bin/hi3510/param.cgi?cmd=setinfrared&-infraredstat=open Sets IR LED's always active :: only IN-6011 | |
http://192.168.178.87/cgi-bin/hi3510/param.cgi?cmd=setinfrared&-infraredstat=close Sets IR LED's always inactive |
ALARM | |
---|---|
http://admin:instar@192.168.xxx.xxx/cgi-bin/hi3510/param.cgi?cmd=pushhostalarm trigger an alarm on your camera | |
http://admin:instar@192.168.xxx.xxx/cgi-bin/hi3510/param.cgi?cmd=setmdattr&-enable=1&-name=1 enables the md area 1 | |
http://admin:instar@192.168.xxx.xxx/cgi-bin/hi3510/param.cgi?cmd=setmdattr&-enable=0&-name=1 disables the md area 1 | |
http://192.168.x.x/cgi-bin/hi3510/param.cgi?cmd=setioattr&-io_enable=1&-io_flag=1 enable / disable external alarm in to trigger recording |
Example:
http://admin:instar@192.168.xxx.xxx/cgi-bin/hi3510/param.cgi?cmd=setmdattr&-enable=0&-name=1&cmd=setmdattr&-enable=0&-name=2&cmd=setmdattr&-enable=0&-name=3&cmd=setmdattr&-enable=0&-name=4
Camera Model
Installing the wrong Firmware can overwrite your camera Identification. Use the following commands to reset your camera model:
Set your Camera Model | |
---|---|
http://192.168.178.133:83/param.cgi?cmd=get_instar_guest&-index=47 Get set camera model | |
http://192.168.178.133:83/param.cgi?cmd=set_instar_guest&-index=47&-value=6014 Set your camera model |
Set PoE or WiFi Model: | |
---|---|
http://192.168.178.133:83/param.cgi?cmd=get_instar_guest&-index=48 Get PoE variable :: PoE (true) or WLAN (false) | |
http://192.168.178.133:83//param.cgi?cmd=set_instar_guest&-index=48&-value=false If PoE is true, the WiFi menu will not be displayed! |