Foscam IPCamera CGI User Guide
Foscam IPCamera CGI User Guide
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
Contents
General description ........................................................................................................................ 1
AV Function ..................................................................................................................................... 2
getImageSetting...................................................................................................................... 2
setBrightness .......................................................................................................................... 2
setContrast .............................................................................................................................. 2
setHue ...................................................................................................................................... 3
setSaturation ........................................................................................................................... 3
setSharpness .......................................................................................................................... 3
resetImageSetting .................................................................................................................. 4
getMirrorAndFlipSetting ......................................................................................................... 4
mirrorVideo .............................................................................................................................. 4
flipVideo ................................................................................................................................... 5
setPwrFreq .............................................................................................................................. 5
getVideoStreamParam........................................................................................................... 5
setVideoStreamParam ........................................................................................................... 6
getMainVideoStreamType ..................................................................................................... 6
getSubVideoStreamType....................................................................................................... 6
setMainVideoStreamType ..................................................................................................... 7
setSubVideoStreamType ....................................................................................................... 7
GetMJStream .......................................................................................................................... 8
getOSDSetting ........................................................................................................................ 8
setOSDSetting ........................................................................................................................ 8
getOsdMaskArea .................................................................................................................... 9
setOsdMaskArea .................................................................................................................... 9
getMotionDetectConfig .......................................................................................................... 9
setMotionDetectConfig ........................................................................................................ 10
getSnapConfig ...................................................................................................................... 12
setSnapConfig ...................................................................................................................... 12
snapPicture ........................................................................................................................... 13
snapPicture2 ......................................................................................................................... 13
getRecordList ........................................................................................................................ 13
getAlarmRecordConfig ........................................................................................................ 14
setAlarmRecordConfig ........................................................................................................ 14
setIOAlarmConfig ................................................................................................................. 14
getIOAlarmConfig ................................................................................................................. 15
clearIOAlarmOutput ............................................................................................................. 15
getMultiDevList ..................................................................................................................... 16
getMultiDevDetailInfo ........................................................................................................... 16
addMultiDev .......................................................................................................................... 16
delMultiDev ............................................................................................................................ 17
User account ................................................................................................................................. 17
addAccount ........................................................................................................................... 17
delAccount ............................................................................................................................. 18
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
changePassword .................................................................................................................. 18
changeUserName ................................................................................................................ 18
logIn ........................................................................................................................................ 19
logOut ..................................................................................................................................... 19
getSessionList ....................................................................................................................... 20
getUserList ............................................................................................................................ 20
usrBeatHeart ........................................................................................................................... 20
PTZ Control ................................................................................................................................... 21
ptzMoveUp ............................................................................................................................ 21
ptzMoveDown ....................................................................................................................... 21
ptzMoveLeft ........................................................................................................................... 21
ptzMoveRight ........................................................................................................................ 22
ptzMoveTopLeft .................................................................................................................... 22
ptzMoveTopRight .................................................................................................................. 22
ptzMoveBottomLeft .............................................................................................................. 22
ptzMoveBottomRight ............................................................................................................ 23
ptzStopRun ............................................................................................................................ 23
ptzReset ................................................................................................................................. 23
getPTZSpeed ........................................................................................................................ 24
setPTZSpeed ........................................................................................................................ 24
getPTZPresetPointList ......................................................................................................... 24
ptzAddPresetPoint................................................................................................................ 25
ptzDeletePresetPoint ........................................................................................................... 25
ptzGotoPresetPoint .............................................................................................................. 25
ptzGetCruiseMapList ........................................................................................................... 26
ptzGetCruiseMapInfo ........................................................................................................... 26
ptzSetCruiseMap .................................................................................................................. 26
ptzDelCruiseMap .................................................................................................................. 27
ptzStartCruise........................................................................................................................ 27
ptzStopCruise ........................................................................................................................ 27
zoomIn ................................................................................................................................... 27
zoomOut ................................................................................................................................ 28
zoomStop ............................................................................................................................... 28
getZoomSpeed ..................................................................................................................... 28
setZoomSpeed ...................................................................................................................... 29
setPTZSelfTestMode ............................................................................................................ 29
getPTZSelfTestMode ........................................................................................................... 29
setPTZPrePointForSelfTest ................................................................................................ 30
getPTZPrePointForSelfTest ................................................................................................ 30
set485Info .............................................................................................................................. 30
get485Info .............................................................................................................................. 31
Network .......................................................................................................................................... 31
getIPInfo ................................................................................................................................. 31
setIpInfo ................................................................................................................................. 32
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
refreshWifiList ....................................................................................................................... 32
getWifiList .............................................................................................................................. 32
setWifiSetting ........................................................................................................................ 33
getWifiConfig ......................................................................................................................... 34
getPortInfo ............................................................................................................................. 35
setPortInfo ............................................................................................................................. 35
getUPnPConfig ..................................................................................................................... 36
setUPnPConfig ..................................................................................................................... 36
getDDNSConfig .................................................................................................................... 36
setDDNSConfig .................................................................................................................... 37
setFtpConfig .......................................................................................................................... 37
getFtpConfig .......................................................................................................................... 38
testFtpServer ......................................................................................................................... 38
getSMTPConfig .................................................................................................................... 38
setSMTPConfig ..................................................................................................................... 39
smtpTest ................................................................................................................................. 40
Device manage ............................................................................................................................. 40
setSystemTime ..................................................................................................................... 40
getSystemTime ..................................................................................................................... 41
openInfraLed ......................................................................................................................... 42
closeInfraLed ......................................................................................................................... 42
getInfraLedConfig ................................................................................................................. 43
setInfraLedConfig ................................................................................................................. 43
getDevState ........................................................................................................................... 43
getDevName ......................................................................................................................... 44
setDevName ......................................................................................................................... 45
getDevInfo ............................................................................................................................. 45
System ........................................................................................................................................... 46
rebootSystem ........................................................................................................................ 46
restoreToFactorySetting ...................................................................................................... 46
exportConfig .......................................................................................................................... 46
ImportConfig .......................................................................................................................... 47
FwUpgrade ............................................................................................................................ 47
MISC .............................................................................................................................................. 48
getFirewallConfig .................................................................................................................. 48
setFirewallConfig .................................................................................................................. 48
getLog .................................................................................................................................... 48
Copyright@ Shenzhen Foscam Intelligent Technology Limited
History
Add the following CGI command to set PT
startup position:
1) setPTZSelfTestMode
2) getPTZSelfTestMode
3) setPTZPrePointForSelfTest
4) getPTZPrePointForSelfTest
1. Add a snap CGI(snapPicture2) which
retrun jpeg image data directly but a
image url
2. Add MotionJpeg stream support
Check and Modify CGI command
document
Foscam IPCamera CGI User Guide
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
CGI request string format error
Username or password error
General description
Our device can only support authentication by pass user name or password attached
at CGI request string currentlly.
For example:
http://192.168.1.2/cgi-bin/CGIProxy.fcgi&usr=admin&pwd=123&cmd=ABC
We only support GET and POST method. Only importConfig and fwUpgrade can
support POST method.
The cgi request string must be encode in url format. URL encode rule:
The following chars will not be encoded:
[A~Z] [a~z] [0~9] + @ * /
The other chars will be encoded into hex format.
For example:
http://192.168.1.6:88/cgi-bin/CGIProxy.fcgi?usr=admin&pwd=&cmd=getIPInfo
will be encode to:
http://192.168.1.6:88/cgi-bin/CGIProxy.fcgi?usr%3Dadmin%26pwd%3D%26cmd%3DgetIPInfo
cgi execute result
1) We orgnize the cgi execute result as xml format, for example:
<CGI_Result>
<result>0</result>
<isDHCP>1</isDHCP>
<ip>192.168.1.8</ip>
<gate>0.0.0.0</gate>
<mask>255.255.255.0</mask>
<dns1>0.0.0.0</dns1>
<dns2>0.0.0.0</dns2>
</CGI_Result>
<result></result> means the common execute result
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
Get color attribute of video
/cgi-bin/CGIProxy.fcgi?cmd=getImageSetting
/cgi-bin/CGIProxy.fcgi?cmd=getImageSetting&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setBrightness
/cgi-bin/CGIProxy.fcgi?cmd=setBrightness&brightness=50&usr=admin&
pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setContrast
AV Function
getImageSetting
setBrightness
setContrast
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=setContrast&contrast=50&usr=admin&pwd
=
/cgi-bin/CGIProxy.fcgi?cmd=setHue
/cgi-bin/CGIProxy.fcgi?cmd=setHue&hue=50&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setSaturation
/cgi-bin/CGIProxy.fcgi?cmd=setSaturation&saturation=50&usr=admin&
pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setSharpness
/cgi-bin/CGIProxy.fcgi?cmd=setSharpness&sharpness=50&usr=admin&
pwd=
setHue
setSaturation
setSharpness
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
Reset color parameters to default value
/cgi-bin/CGIProxy.fcgi?cmd=resetImageSetting
/cgi-bin/CGIProxy.fcgi?cmd=resetImageSetting&usr=admin&pwd=
Get mirror and flip attribute of video
/cgi-bin/CGIProxy.fcgi?cmd=getMirrorAndFlipSetting
/cgi-bin/CGIProxy.fcgi?cmd=getMirrorAndFlipSetting&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=mirrorVideo
/cgi-bin/CGIProxy.fcgi?cmd=mirrorVideo&usr=admin&pwd=
resetImageSetting
getMirrorAndFlipSetting
mirrorVideo
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=flipVideo
/cgi-bin/CGIProxy.fcgi?cmd=flipVideo&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setPwrFreq
/cgi-bin/CGIProxy.fcgi?cmd=setPwrFreq&freq=0&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=getVideoStreamParam
Resolution of stream type N
Bit rate of stream type N (20480~2097152)
Frame rate of stream type N
P frames between I frame of stream type N
/cgi-bin/CGIProxy.fcgi?cmd=getVideoStreamParam&usr=admin&pwd=
flipVideo
setPwrFreq
getVideoStreamParam
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
Set the video stream param of stream N
/cgi-bin/CGIProxy.fcgi?cmd=setVideoStreamParam
Resolution of stream type N
Bit rate of stream type N (20480~2097152)
Frame rate of stream type N
P frames between I frame of stream type N
The suggest value is: X * frameRate
/cgi-bin/CGIProxy.fcgi?cmd=setVideoStreamParam&streamType=0&res
olution=0&bitRate=2097152&frameRate=30&GOP=30&isVBR=0&usr=a
dmin&pwd=
Get the stream type of main stream
/cgi-bin/CGIProxy.fcgi?cmd=getMainVideoStreamType
/cgi-bin/CGIProxy.fcgi?cmd=getMainVideoStreamType&usr=admin&pw
d=
Get the stream type of sub stream
/cgi-bin/CGIProxy.fcgi?cmd=getSubVideoStreamType
setVideoStreamParam
getMainVideoStreamType
getSubVideoStreamType
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=getSubVideoStreamType&usr=admin&pwd
=
Set the stream type of main stream
/cgi-bin/CGIProxy.fcgi?cmd=setMainVideoStreamType
/cgi-bin/CGIProxy.fcgi?cmd=setMainVideoStreamType&streamType=0&usr=admi
n&pwd=
Set the stream format of sub stream
/cgi-bin/CGIProxy.fcgi?cmd=setSubVideoStream 统一
Our device can only support 2 streams:Main stream for PC access and Sub
stream for mobile access, but someone need a MJ stream to embed their camera
into a webpage, in this case, we should set sub stream format to Motion Jpeg,
and then you can get MJ stream by command:
/cgi-bin/CGIStream.cgi?cmd=GetMJStream, but when you login as a sub stream
user, the stream data will be same as main stream.
/cgi-bin/CGIProxy.fcgi?cmd=setSubVideoStreamType&format=0&usr=admin&pw
d=
setMainVideoStreamType
setSubVideoStreamType
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIStream.cgi?cmd=GetMJStream
1) Motion jpeg stream data is returned from http server by a serverpush mode
2) MJ stream is VGA resolution @ 15fps
/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=getOSDSetting
Time stamp will display on screen or not
Camera name will display on screen or not
OSD display position, currently can only be 0
/cgi-bin/CGIProxy.fcgi?cmd=getOSDSetting&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setOSDSetting
Time stamp will display on screen or not
Camera name will display on screen or not
OSD display position, currently can only be 0
/cgi-bin/CGIProxy.fcgi?cmd=setOSDSetting&isEnableTimeStamp=1&isEnable
DevName=1&dispPos=0&isEnableOSDMask=0&usr=admin&pwd=
GetMJStream
getOSDSetting
setOSDSetting
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=getOsdMaskArea
The top left X position of mask N
The top left Y position of mask N
The bottom right X position of mask N
The bottom right Y position of mask N
Our device can only support 4 mask areas
/cgi-bin/CGIProxy.fcgi?cmd=getOsdMaskArea&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setOsdMaskArea
The top left X position of mask N
The top left Y position of mask N
The bottom right X position of mask N
The bottom right Y position of mask N
Our device can only support 4 mask areas
/cgi-bin/CGIProxy.fcgi?cmd=setOsdMaskArea&x1_0=100&y1_0=100&x2_0=2
00&y2_0=200&x1_1=0&y1_1=0&x2_1=0&y2_1=0&x1_2=0&y1_2=0&x2_2=0
&y2_2=0&x1_3=0&y1_3=0&x2_3=0&y2_3=0&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig
Is enable motion detect alarm
Motion alarm linkage
( bit3 | bit2 | bit1 | bit0 )
getOsdMaskArea
setOsdMaskArea
getMotionDetectConfig
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
The interval time to snap picture again
Motion detect
sensitivity
The time of which motion detect alaram
can trigger again when a motion
detection has happened.
The motion alaram schedule of one week,
N = 0(Monday) ~6(Sunday)
For detail, see *1 bellow
The area info of row N
For detail, see *2 bellow
·Video region is divided into 10*10 sub areasideo region is divided into 10*10
sub areas
·The min unit of schedule is half an hour
/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig
Is enable motion detect alarm
Motion alarm linkage
( bit3 | bit2 | bit1 | bit0 )
The interval time to snap picture again
Motion detect
sensitivity
The time of which motion detect alaram
setMotionDetectConfig
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
can trigger again when a motion
detection has happened.
The motion alaram schedule of one week,
N = 0(Monday) ~6(Sunday)
For detail, see *1 bellow
The area info of row N
For detail, see *2 bellow
·Video region is divided into 10*10 sub areasideo region is divided into 10*10
sub areas
·The min unit of schedule is half an hour
/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&linkage=16&
snapInterval=2& sensitivity=1&triggerInterval=5 &schedule0=1024&schedule1
=1024&schedule2=1024&schedule3=1024&schedule4=1024&schedule5=102
4&schedule6=1024&area0=1024&area1=1024&area2=1024&area3=1024&ar
ea4=1024&area5=1024&area6=1024&area7=1024&area7=1024&area8=1024
&area9=1024&usr=admin&pwd=
*1 schedule bitmap
Each grid of a row presents half of an hour of one day. For example, 40 presents 20:00
~20:30.
The bit 40 set to “1” means the motion detection is effective between 20:00 to 20:30
*2 area bitmap
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=getSnapSetting
/cgi-bin/CGIProxy.fcgi?cmd=getSnapConfig&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setSnapSetting
/cgi-bin/CGIProxy.fcgi?cmd=setSnapConfig&usr=admin&pwd=&snapPicQuali
ty=1&saveLocation=2
The video region is divided into 10*10 sub areas, bit0 above present the first area, when
this bit is set to “1”, it means motion detection is effective on this area.
getSnapConfig
setSnapConfig
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=snapPicture
We will return a html script directly:
<html><body><img src ="../snapPic/20121121-215939.jpg "/ ></body></html>
Picture resolution is the same as main stream resolutionnapPicture
/cgi-bin/CGIProxy.fcgi?cmd=snapPicture&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2
This command will return jpeg image data directly
/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=getRecordList
N(0-9), Record information
/cgi-bin/CGIProxy.fcgi?cmd=getRecordList&usr=admin&pwd=
snapPicture
snapPicture2
getRecordList
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=getAlarmRecordConfig
/cgi-bin/CGIProxy.fcgi?cmd=getAlarmRecordConfig&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setAlarmRecordConfig
Set result(0-success,-1-error)
/cgi-bin/CGIProxy.fcgi?cmd=setAlarmRecordConfig&usr=admin&pwd=&isEnab
lePreRecord=1&preRecordSecs=5&alarmRecordSecs=30
/cgi-bin/CGIProxy.fcgi?cmd=setIOAlarmConfig
getAlarmRecordConfig
setAlarmRecordConfig
setIOAlarmConfig
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
Interval for snap picture
Interval for trigger alarm again
Set result(0-success,-1-error)
/cgi-bin/CGIProxy.fcgi?cmd=setIOAlarmConfig&usr=admin&pwd=&isEnable=1
&linkage=16&snapInterval=2 &alarmLevel=1 &triggerInterval=5& schedule0=10
24&schedule1=1024&schedule2=1024&schedule3=1024&schedule4=1024&s
chedule5=1024&schedule6=1024
/cgi-bin/CGIProxy.fcgi?cmd=getIOAlarmConfig
Interval for snap picture
Interval for trigger alarm again
/cgi-bin/CGIProxy.fcgi?cmd=getIOAlarmConfig&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=clearIOAlarmOutput
getIOAlarmConfig
clearIOAlarmOutput
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=clearIOAlarmOutput&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=getMultiDevList
N(0-8), device information
/cgi-bin/CGIProxy.fcgi?cmd=getMultiDevList&usr=admin&pwd=
Get multi device information
/cgi-bin/CGIProxy.fcgi?cmd=getMultiDevDetailInfo
/cgi-bin/CGIProxy.fcgi?cmd=getMultiDevDetailInfo&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=addMultiDev
getMultiDevList
getMultiDevDetailInfo
addMultiDev
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
Add result(0-success,-1-error)
/cgi-bin/CGIProxy.fcgi?cmd=addMultiDev&usr=admin&pwd=&chnnl =2&product
Type=H264& ip=192.168.1.3& port=88& mediaPort=88& userName=admin&pass
Word=&devName=FI9805W
/cgi-bin/CGIProxy.fcgi?cmd=delMultiDev
Delete result(0-success,-1-error)
/cgi-bin/CGIProxy.fcgi?cmd=delMultiDev&usr=admin&pwd=&chnnl =2
/cgi-bin/CGIProxy.fcgi?cmd=addAccount
delMultiDev
User account
addAccount
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=addAccount&usrName=test&usrPwd=test&privile
ge=0& usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=delAccount
/cgi-bin/CGIProxy.fcgi?cmd=delAccount&usrName=test&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=changePassword
The user you want to change password
Admin can change every user’s password, visitor and operator can only
change their own password
/cgi-bin/CGIProxy.fcgi?cmd=changePassword&usrName=admin&oldPwd=&ne
wPwd=test&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=changeUserName
The user you want to change name
delAccount
changePassword
changeUserName
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Admin can change every user’s name, visitor and operator can only change
their own name
/cgi-bin/CGIProxy.fcgi?cmd=changeUserName&usrName=admin&
newUsrName=newname&usr=admin&pwd=
logIn
/cgi-bin/CGIProxy.fcgi?cmd= logIn
An id use to distinguish different users,can be set to
current cpu tick
/cgi-bin/CGIProxy.fcgi?cmd=logIn&usrName=admin&ip=192.168.1.12 &p
wd=&groupId=673982479 &usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=logOut
An id use to distinguish different users,can be set to
Foscam IPCamera CGI User Guide
logOut
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=logOut&usrName=admin&ip=192.168.1.12&grou
pId=673982479 &usr=admin&pwd=
Get current session list of the camera
/cgi-bin/CGIProxy.fcgi?cmd=getSessionList
/cgi-bin/CGIProxy.fcgi?cmd=getSessionList&usr=admin&pwd=
Get user account list of the camera
/cgi-bin/CGIProxy.fcgi?cmd=getUserList
/cgi-bin/CGIProxy.fcgi?cmd=getUserList&usr=admin&pwd=
user checks connection with camera
/cgi-bin/CGIProxy.fcgi?cmd=usrBeatHeart
getSessionList
getUserList
usrBeatHeart
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
An id use to distinguish different users,can be set to
current cpu tick
checkResult(0-success,-1-error)
/cgi-bin/CGIProxy.fcgi?cmd=usrBeatHeart&usrName=admin&ip=192.168.1.13
&groupId=673982479&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveUp
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveUp&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveDown
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveDown&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveLeft
PTZ Control
ptzMoveUp
ptzMoveDown
ptzMoveLeft
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveLeft&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveRight
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveRight&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveTopLeft
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveTopLeft&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveTopRight
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveTopRight&usr=admin&pwd=
ptzMoveRight
ptzMoveTopLeft
ptzMoveTopRight
ptzMoveBottomLeft
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveBottomLeft
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveBottomLeft&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveBottomRight
/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveBottomRight&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=ptzStopRun
/cgi-bin/CGIProxy.fcgi?cmd=ptzStopRun&usr=admin&pwd=
Reset PT to default position
/cgi-bin/CGIProxy.fcgi?cmd=ptzReset
/cgi-bin/CGIProxy.fcgi?cmd=ptzReset&usr=admin&pwd=
ptzMoveBottomRight
ptzStopRun
ptzReset
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=getPTZSpeed
/cgi-bin/CGIProxy.fcgi?cmd=getPTZSpeed&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setPTZSpeed
/cgi-bin/CGIProxy.fcgi?cmd=setPTZSpeed&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=getPTZPresetPointList
Current preset point count
getPTZSpeed
setPTZSpeed
getPTZPresetPointList
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
Our device can support at most 16 preset point
We have 4 point default:LeftMost\RightMost\TopMost\BottomMost
/cgi-bin/CGIProxy.fcgi?cmd=getPTZPresetPointList&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=ptzAddPresetPoint
The preset point position is current PT position
/cgi-bin/CGIProxy.fcgi?cmd=ptzAddPresetPoint&name=test&usr=admin&pwd
=
Delete preset point by name
/cgi-bin/CGIProxy.fcgi?cmd=ptzDeletePresetPoint
/cgi-bin/CGIProxy.fcgi?cmd=ptzDeletePresetPoint&name=test&usr=admin&p
wd=
/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint
/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=test&usr=admin&pwd
=
ptzAddPresetPoint
ptzDeletePresetPoint
ptzGotoPresetPoint
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=ptzGetCruiseMapList
Current cruise map point count
Our device can support at most 8 cruise map
We have 2 maps default:Horizental/Vertical
/cgi-bin/CGIProxy.fcgi?cmd=ptzGetCruiseMapList&usr=admin&pwd=
Get the detail info of a cruise map by name
/cgi-bin/CGIProxy.fcgi?cmd=ptzGetCruiseMapInfo
The preset point name of this cruise map
Our device can support at most 8 preset point one cruise map
/cgi-bin/CGIProxy.fcgi?cmd=ptzGetCruiseMapInfo&name=Horizental&usr=ad
min&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=ptzSetCruiseMap
The name of preset point N
Our device can support at most 8 preset point one cruise map
/cgi-bin/CGIProxy.fcgi?cmd=ptzSetCruiseMap&name=test&point0=test0&point
1=test1&point2=test2&point3=test3&point4=test4&point5=test5&point6=&poin
ptzGetCruiseMapList
ptzGetCruiseMapInfo
ptzSetCruiseMap
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=ptzDelCruiseMap
/cgi-bin/CGIProxy.fcgi?cmd=ptzDelCruiseMap&name=test&usr=admin&pwd=
Start a specificate cruise
/cgi-bin/CGIProxy.fcgi?cmd=ptzStartCruise
/cgi-bin/CGIProxy.fcgi?cmd=ptzStartCruise&mapName =test&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=ptzStopCruise
/cgi-bin/CGIProxy.fcgi?cmd=ptzStopCruise&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=zoomIn
ptzDelCruiseMap
ptzStartCruise
ptzStopCruise
zoomIn
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
Only supported by the device has zoom lens
/cgi-bin/CGIProxy.fcgi?cmd=zoomIn&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=zoomOut
Only supported by the device has zoom lens
/cgi-bin/CGIProxy.fcgi?cmd=zoomOut&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=zoomStop
Only supported by the device has zoom lens
/cgi-bin/CGIProxy.fcgi?cmd=zoomStop&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=getZoomSpeed
Only supported by the device has zoom lens
/cgi-bin/CGIProxy.fcgi?cmd=getZoomSpeed&usr=admin&pwd=
zoomOut
zoomStop
getZoomSpeed
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=setZoomSpeed
Only supported by the device has zoom lens
/cgi-bin/CGIProxy.fcgi?cmd=setZoomSpeed&usr=admin&pwd=&speed=1
Set the selftest mode of PTZ
/cgi-bin/CGIProxy.fcgi?cmd= setPTZSelfTestMode
After normal selftest, then goto
presetpoint-appointed
Only supported by ipc that can enable ptz-selftest
/cgi-bin/CGIProxy.fcgi?usr=admin&pwd=&cmd=setPTZSelfTestMode&mod
e=2
Get the selftest mode of PTZ
/cgi-bin/CGIProxy.fcgi?cmd= getPTZSelfTestMode
After normal selftest, then goto
presetpoint-appointed
setZoomSpeed
setPTZSelfTestMode
getPTZSelfTestMode
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
Only supported by ipc that can enable ptz-selftest
/cgi-bin/CGIProxy.fcgi?usr=admin&pwd=&cmd=getPTZSelfTestMode
Set presetpoint for selftest of PTZ
/cgi-bin/CGIProxy.fcgi?cmd= setPTZPrePointForSelfTest
Only supported by ipc that can enable ptz-selftest-2
/cgi-bin/CGIProxy.fcgi?usr=admin&pwd=&cmd=setPTZPrePointForSelfTes
t&name=TopMost
Get the presetpoint for selftest of PTZ
/cgi-bin/CGIProxy.fcgi?cmd= getPTZPrePointForSelfTest
Only supported by ipc that can enable ptz-selftest
/cgi-bin/CGIProxy.fcgi?usr=admin&pwd=&cmd=getPTZPrePointForSelfTes
t
/cgi-bin/CGIProxy.fcgi?cmd=set485Info
setPTZPrePointForSelfTest
getPTZPrePointForSelfTest
set485Info
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
Only supported by ipc that can enable 485
/cgi-bin/CGIProxy.fcgi?usr=admin&pwd=&cmd=set485Info&rs485Protocol
=0&rs485Addr=1&rs485Baud=1200&rs485DataBit=7&rs485StopBit=1&rs4
85Check=0
/cgi-bin/CGIProxy.fcgi?cmd=get485Info
Only supported by ipc that can enable 485
/cgi-bin/CGIProxy.fcgi?usr=admin&pwd=&cmd=get485Info
/cgi-bin/CGIProxy.fcgi?cmd=getIPInfo
Obtain ip from dhcp server or not
ip address(Can only support ipv4 yet)
gateway(“0.0.0.0” when use dhcp)
The first dns server addr(“0.0.0.0” when use dhcp)
The second dns server addr(“0.0.0.0” when use dhcp)
/cgi-bin/CGIProxy.fcgi?cmd=getIPInfo&usr=admin&pwd=
get485Info
Network
getIPInfo
Copyright@ Shenzhen Foscam Intelligent Technology Limited
setIpInfo
/cgi-bin/CGIProxy.fcgi?cmd=setIpInfo
Obtain ip from dhcp server or not
ip address(Can only support ipv4 yet)
The first dns server addr
The second dns server addr
System will reboot automatically to take effect after call this CGI command
/cgi-bin/CGIProxy.fcgi?cmd=setIpInfo&isDHCP=0&ip=192.168.1.88&gate=192
.168.1.1&mask=255.255.255.0&dns1=192.168.1.1&dns2=192.168.1.1&usr=a
dmin&pwd=
Start scan the aps around
/cgi-bin/CGIProxy.fcgi?cmd=refreshWifiList
This operation may takes a while, about 20 seconds or above, the other
operation on this device will be blocked during the period.
/cgi-bin/CGIProxy.fcgi?cmd=refreshWifiList&usr=admin&pwd=
Get the aps around after refreshWifiList
/cgi-bin/CGIProxy.fcgi?cmd=getWifiList
The start NO of the ap list you want to get.
For example:The are 30 aps around you, you want to look at the
last ten aps, then startNo=20
Foscam IPCamera CGI User Guide
refreshWifiList
getWifiList
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
The detail info of ap N
Format:
ssid+mac+quality+isEncryp
t+encrypType
Only 10 aps will be returned one time
/cgi-bin/CGIProxy.fcgi?cmd=getWifiList&startNo=0&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setWifiSetting
setWifiSetting
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
Camera will not connect to AP unless you enject your cable
/cgi-bin/CGIProxy.fcgi?cmd=setWifiSetting&isEnable=1&isUseWifi=1&ssid=fosta
r_soft&netType=0&encryptType=4&psk=software&authMode=0&keyFormat=0&d
efaultKey=1&key1=&key2=&key3=&key4=&key1Len=64&key2Len=64&key3Len
=64&key4Len=64&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=getWifiConfig
getWifiConfig
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
Camera will not connect to AP unless you enject your cable
/cgi-bin/CGIProxy.fcgi?cmd=getWifiConfig&usr=admin&pwd=
Get http port and media port of camera
/cgi-bin/CGIProxy.fcgi?cmd=getPortInfo
http port(default value is 88)
https port(default value is 443)
media port(default value is 88)
You can call this CGI command without usr or pwd section
/cgi-bin/CGIProxy.fcgi?cmd=getPortInfo&usr=admin&pwd=
Set http port and media port of camera
/cgi-bin/CGIProxy.fcgi?cmd=getPortInfo
http port(default value is 88)
media port(default value is 88)
https port(default value is 443)
Re login is needed after call this CGI command
/cgi-bin/CGIProxy.fcgi?cmd=setPortInfo&webPort=88&mediaPort=88&httpsPo
rt=443&usr=admin&pwd=
getPortInfo
setPortInfo
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=getUPnPConfig
/cgi-bin/CGIProxy.fcgi?cmd=getUPnPConfig&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setUPnPConfig
/cgi-bin/CGIProxy.fcgi?cmd=setUPnPConfig&isEnable=1&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=getDDNSConfig
getUPnPConfig
setUPnPConfig
getDDNSConfig
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=getDDNSConfig&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setDDNSConfig
This command can only be used to set the third party ddns
/cgi-bin/CGIProxy.fcgi?cmd=setDDNSConfig&isEnable=1&hostName=test.dyn
dns.org&ddnsServer=4&user=test&password=test&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setFtpConfig
FTP server address, you can contain sub directory in it
/cgi-bin/CGIProxy.fcgi?cmd=setFtpConfig&ftpAddr=ftp://192.168.1.2/sbuDir&ft
pPort=21&mode=0&userName=test&password=test&usr=admin&pwd=
setDDNSConfig
setFtpConfig
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=getFtpConfig
FTP server address, you can contain sub directory in it
/cgi-bin/CGIProxy.fcgi?cmd=getFtpConfig&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=testFtpServer
FTP server address, you can contain sub directory in it
/cgi-bin/CGIProxy.fcgi?cmd=testFtpServer&ftpAddr=ftp://192.168.1.2/sbuDir&ft
pPort=21&mode=0&userName=test&password=test&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=getSMTPConfig
getFtpConfig
testFtpServer
getSMTPConfig
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
is enable camera send mail?
Need auth user account or not
Use “,” between 2 senders, for exapler:
aaa@123.com,bbb@456.com
/cgi-bin/CGIProxy.fcgi?cmd=getSMTPConfig&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setSMTPConfig
is enable camera send mail?
Need auth user account or not
Use “,” between 2 senders, for exapler:
aaa@123.com,bbb@456.com
/cgi-bin/CGIProxy.fcgi?cmd=setSMTPConfig&isEnable=1&server=smtp.gmail.
com&port=587&isNeedAuth=1&user=test&password=test&send=test@gmail.c
setSMTPConfig
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
om&reciever=aa@123.com,bb@456.com&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=smtpTest
Need auth user account or not
You must call setSMTPConfig firstly.
We will send a test mail to all recievers
/cgi-bin/CGIProxy.fcgi?cmd=smtpTest&smtpServer =smtp.gmail.com&port=587
&isNeedAuth=1&user=test&password=test&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setSystemTime
ntp server addr
Support ntp server:
time.nist.gov time.kriss.re.kr time.windows.com
time.nuri.net
smtpTest
Device manage
setSystemTime
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
The seconds between local time and GMT time.
For example: timeZone=3600 presents GMT-01:00
timeZone=-3600 presents GMT+01:00
Daylight saving time (0-disable,1-enable)
This command can only be used to set the third party ddns
/cgi-bin/CGIProxy.fcgi?cmd=setSystemTime&timeSource=1&ntpServer=&date
Format=0&timeFormat=0&timeZone=0&isDst=0&dst=0&year=2012&mon=1&
day=6&hour=9&minute=35&sec=0&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=getSystemTime
ntp server addr
Support ntp server:
time.nist.gov time.kriss.re.kr time.windows.com
time.nuri.net
getSystemTime
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
The seconds between local time and GMT time.
For example: timeZone=3600 presents GMT-01:00
timeZone=-3600 presents GMT+01:00
Daylight saving time (0-disable,1-enable)
This command can only be used to set the third party ddns
/cgi-bin/CGIProxy.fcgi?cmd=getSystemTime&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=openInfraLed
/cgi-bin/CGIProxy.fcgi?cmd=openInfraLed&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=closeInfraLed
/cgi-bin/CGIProxy.fcgi?cmd=closeInfraLed&usr=admin&pwd=
openInfraLed
closeInfraLed
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=getInfraLedConfig
/cgi-bin/CGIProxy.fcgi?cmd=getInfraLedConfig&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setInfraLedConfig&mode=0
/cgi-bin/CGIProxy.fcgi?cmd=setInfraLedConfig&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=getDevState
getInfraLedConfig
setInfraLedConfig
getDevState
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
Free space of sd card by unit of k
Total space of sd card by unit of k
The ssid of the ap which has been connected
/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=getDevName
/cgi-bin/CGIProxy.fcgi?cmd=getDevName&usr=admin&pwd=
getDevName
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=setDevName
/cgi-bin/CGIProxy.fcgi?cmd=setDevName&devName=test&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=getDevInfo
/cgi-bin/CGIProxy.fcgi?cmd=getDevInfo&usr=admin&pwd=
setDevName
getDevInfo
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=rebootSystem
/cgi-bin/CGIProxy.fcgi?cmd=rebootSystem&usr=admin&pwd=
Restore to factory setting
/cgi-bin/CGIProxy.fcgi?cmd=restoreToFactorySetting
/cgi-bin/CGIProxy.fcgi?cmd= restoreToFactorySetting&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=exportConfig
After call this command, you can get the config file by visit the following addr:
/configs/export/configs.bin
/cgi-bin/CGIProxy.fcgi?cmd=exportConfig&usr=admin&pwd=
System
rebootSystem
restoreToFactorySetting
exportConfig
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=importConfig&usr=admin&pwd=
System will reboot automatically after this operation
<form name="form5" method="post" target="retframe" enctype="multipart/form-data"
action="cgi-bin/ CGIProxy.fcgi?cmd=importConfig&usr=admin&pwd=" >
<input type="file" name="setting_file" >
<input type="submit" value="import" >
</form>
/cgi-bin/CGIProxy.fcgi?cmd=fwUpgrade&usr=admin&pwd=
System will reboot automatically after this operation.
This action may takes about 120s when upgrade app firmware, takes about
60s when upgrade system firmware
<form name="form5" method="post" target="retframe" enctype="multipart/form-data"
action="cgi-bin/ CGIProxy.fcgi?cmd=fwUpgrade&usr=admin&pwd=" >
<input type="file" name="fw_file" >
<input type="submit" value="upgrade" >
</form>
ImportConfig
FwUpgrade
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=getFirewallConfig
Only allow the ip list to access
The ip address(Network address) of list N
/cgi-bin/CGIProxy.fcgi?cmd=getFirewallConfig&usr=admin&pwd=
/cgi-bin/CGIProxy.fcgi?cmd=setFirewallConfig
Only allow the ip list to access
The ip address(Network address) of list N
/cgi-bin/CGIProxy.fcgi?cmd=setFirewallConfig&isEnable=1&rule=0&ipList0=0
&ipList1=0&ipList2=0&ipList3=0&ipList4=0&ipList5=0&ipList6=0&ipList7=0&us
r=admin&pwd=
MISC
getFirewallConfig
setFirewallConfig
getLog
Copyright@ Shenzhen Foscam Intelligent Technology Limited
Foscam IPCamera CGI User Guide
/cgi-bin/CGIProxy.fcgi?cmd=getLog
Where you want to start get log
How many logs you want to get, must less then 20
log information, consist by
time+user+ip+logID
We can have 1000 record of log at most.
We can get 10 log at most one time
/cgi-bin/CGIProxy.fcgi?cmd=getLog&offset=0&count=20&usr=admin&pwd=
*logID:
0:System power on
1:Detect motion alarm
2:user login
3:user logout
4:user off line
Copyright@ Shenzhen Foscam Intelligent Technology Limited