Foscam-ipcamera-cgi--guide-allplatforms-2015.11.06.pdf 2a4z42

  • ed by: Pietro Danesi
  • 0
  • 0
  • February 2022
  • PDF

This document was ed by and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this report form. Report 3l3c15


Overview 3z723u

& View Foscam-ipcamera-cgi--guide-allplatforms-2015.11.06.pdf as PDF for free.

More details 2i4a6q

  • Words: 12,724
  • Pages: 115
Note: please change the ip\port\usr\pwd to youself; C. Rename your .txt to .html, such as

“MJ.html”.

D. Open you r.html by Firefox, and enjoy your MJStream-video; Example

/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=&pwd=

getOSDSetting Function

Get OSD config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getOSDSetting

Param

None

Return

isEnableTimeStamp

Time stamp will display on screen or not

isEnableDevName

Camera name will display on screen or not

dispPos isEnableOSDMask

OSD display position, currently can only be 0 Is OSD mask effective

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getOSDSetting&usr=&pwd=

setOSDSetting Function

Set OSD config

Copyright@ Shenzhen Foscam Intelligent Technology Limited

22

Foscam IPCamera CGI Guide

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setOSDSetting

Param

isEnableTimeStamp

Time stamp will display on screen or not

isEnableDevName

Camera name will display on screen or not

dispPos

OSD display position, currently can only be 0

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setOSDSetting&isEnableTimeStamp=1&isEnableD evName=1&dispPos=0&isEnableOSDMask=0&usr=&pwd=

getOsdMaskArea Function

Get OSD mask area info

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getOsdMaskArea

Param

None

Return

x1_N

The top left X position of mask N

y1_N

The top left Y position of mask N

x2_N

The bottom right X position of mask N

y2_N

The bottom right Y position of mask N

Note

Our device can only 4 mask areas

Example

/cgi-bin/CGIProxy.fcgi?cmd=getOsdMaskArea&usr=&pwd=

setOsdMaskArea Function

Set OSD mask area info

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setOsdMaskArea

param

x1_N

The top left X position of mask N

y1_N

The top left Y position of mask N

x2_N

The bottom right X position of mask N

y2_N

The bottom right Y position of mask N

Resturn

None

Note

Our device can only 4 mask areas

Example

/cgi-bin/CGIProxy.fcgi?cmd=setOsdMaskArea&x1_0=100&y1_0=100&x2_0=20 0&y2_0=200&x1_1=0&y1_1=0&x2_1=0&y2_1=0&x1_2=0&y1_2=0&x2_2=0&y 2_2=0&x1_3=0&y1_3=0&x2_3=0&y2_3=0&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

23

Foscam IPCamera CGI Guide

getOSDMask Function

Get OSD mask status

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getOSDMask

Param

None

Return

isEnableTimeStamp

Time stamp will display on screen or not

isEnableDevName

Camera name will display on screen or not

dispPos isEnableOSDMask

OSD display position, currently can only be 0 Is OSD mask effective

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getOSDMask&usr=&pwd=

setOSDMask Function

Set OSD mask status

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setOSDMask

Param

isEnableOSDMask

Return

None

0-Disable, 1-Enable

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setOSDMask&isEnableOSDMask=1&usr=&p wd=

getMotionDetectConfig Function

Get motion detect config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig

Param

None

Return

isEnable

Is enable motion detect alarm

linkage

Motion alarm linkage

bit0:Ring

( bit3 | bit2 | bit1 | bit0 )

bit1:Send mail bit2:Snap picture bit3:Record

snapInterval

The interval time to snap picture again

sensitivity

Motion

detect

Copyright@ Shenzhen Foscam Intelligent Technology Limited

0 : Low 24

Foscam IPCamera CGI Guide sensitivity

1: Normal 2: High 3: Lower 4: Lowest

triggerInterval

The time of which motion detect alaram can trigger again when a motion detection has happened.P.s.The true value of triggerInterval time is the value of the cgi get add 5s.

isMovAlarmEnable

Is enable motion alarm detect

isPirAlarmEnable

Is enable ive Infrared alarm detect

scheduleN

The motion alaram schedule of one week, N = 0(Monday) ~6(Sunday) For detail, see *1 bellow

areaN

The area info of row N For detail, see *2 bellow

Note

·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, scheduleN value range

2 N - 1 (N[0-48]) N .areaN value 2 - 1 (N[0-10]) Example

/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig&usr=&pwd=

setMotionDetectConfig Function

Set motion detect config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig

Param

isEnable

Is enable motion detect alarm

linkage

Motion alarm linkage

bit0:Ring

( bit3 | bit2 | bit1 | bit0 )

bit1:Send mail bit2:Snap picture bit3:Record

snapInterval

The interval time to snap picture again

sensitivity

Motion

detect

sensitivity

0 : Low 1: Normal 2: High 3: Lower 4: Lowest

Copyright@ Shenzhen Foscam Intelligent Technology Limited

25

Foscam IPCamera CGI Guide triggerInterval

The time of which motion detect alaram can trigger again when a motion detection has happened.P.s.The true value of triggerInterval time is the value of the cgi set add 5s.

isMovAlarmEnable

isPirAlarmEnable

scheduleN

0

Disable

1

Enable

0

Disable

1

Enable

The motion alaram schedule of one week, N = 0(Monday) ~6(Sunday) For detail, see *1 bellow

areaN

The area info of row N For detail, see *2 bellow

Return

None

Note

·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, scheduleN value range

2 N - 1 (N[0-48]) N .areaN value 2 - 1 (N[0-10]) Example

/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&linkage=16&s

napInterval=2&sensitivity=1&triggerInterval=5&isMovAlarmEnable=1&isPirAla rmEnable=1&schedule0=1023&schedule1=1023&schedule2=1023&schedule3 =1023&schedule4=1023&schedule5=1023&schedule6=1023&area0=1023&are a1=1023&area2=1023&area3=1023&area4=1023&area5=1023&area6=1023& area7=1023&area7=1023&area8=1023&area9=1023&usr=&pwd=

*1 schedule bitmap 0

1

2

3

4

5

6

7

Monday Tuesday



Wednesday Thursday Wednesday Tuesday Friday Saturday Sunday

Copyright@ Shenzhen Foscam Intelligent Technology Limited

26

40

41

42

43

44

45

46

47

Foscam IPCamera CGI Guide

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 bit0

bit1

bit2

bit3

bit4

bit5

bit6

bit7

bit8

bit9

area0 area1 area2 area3 area4 area5 area6 area7 area8 area9

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.

setLocalAlarmRecordConfig Function

Set local alarm-record config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setLocalAlarmRecordConfig

Param

isEnableLocalAlar mRecord

0

Disable

1

Enable

localAlarmRecordS ecs

Recording time

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setLocalAlarmRecordConfig&isEnableLocalAlarmR

ecord=1&localAlarmRecordSecs=30&usr=&pwd=

getLocalAlarmRecordConfig Function

Get local alarm-record config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getLocalAlarmRecordConfig

Param

None

Copyright@ Shenzhen Foscam Intelligent Technology Limited

27

Foscam IPCamera CGI Guide

Return

isEnableLocalAlar mRecord

0

Disable

1

Enable

localAlarmRecordS ecs

Recording time

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getLocalAlarmRecordConfig&usr=&pwd=

getSnapConfig Function

Get snap config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getSnapConfig

Param

None

Return

snapPicQuality

saveLocation

0

Low quality

1

Normal quality

2

High quality

0

Save to sd card

1

Not in use now

2

to FTP

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getSnapConfig&usr=&pwd=

setSnapConfig Function

Set snap config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setSnapConfig

Param

snapQuality

saveLocation

Return

0

Low quality

1

Normal quality

2

High quality

0

Save to sd card

1

Not in use now

2

to FTP

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setSnapConfig&snapQuality=1&saveLocation=2& usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

28

Foscam IPCamera CGI Guide

getScheduleSnapConfig Function

Get schedule snap config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getScheduleSnapConfig

Param

None

Return

isEnable

Is enable motion detect alarm

snapInterval

The interval time to snap picture again

scheduleN

The motion alaram schedule of one week, N = 0(Monday) ~6(Sunday) For detail, see *1 bellow

Note

·The min unit of schedule is half an hour, scheduleN value range

2 N - 1 (N[0-48]) Example

/cgi-bin/CGIProxy.fcgi?cmd=getScheduleSnapConfig&usr=&pwd=

setScheduleSnapConfig Function

Set schedule snap config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setScheduleSnapConfig

Param

isEnable

Is enable snap

snapInterval

The interval time to snap picture again

scheduleN

The motion alaram schedule of one week, N = 0(Monday) ~6(Sunday) For detail, see *1 bellow

Return

None

Note

·The min unit of schedule is half an hour, scheduleN value range

2 N - 1 (N[0-48]) Example

/cgi-bin/CGIProxy.fcgi?cmd=setScheduleSnapConfig&isEnable=1&snapInterva

l=2&schedule0=1023&schedule1=1023&schedule2=1023&schedule3=1023&sc hedule4=1023&schedule5=1023&schedule6=1023&usr=&pwd=

*1 schedule bitmap 0

1

2

3

4

5

6

7

Monday Tuesday

… Copyright@ Shenzhen Foscam Intelligent Technology Limited

Wednesday Thursday

29

40

41

42

43

44

45

46

47

Foscam IPCamera CGI Guide

Wednesday Tuesday Friday Saturday Sunday

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 snap is effective between 20:00 to 20:30

snapPicture Function

Manual snap picture

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=snapPicture

Param

None

Return

We will return a html script directly:

Note

Picture resolution is the same as main stream resolutionnapPicture

Example

/cgi-bin/CGIProxy.fcgi?cmd=snapPicture&usr=&pwd=

snapPicture2 Function

Manual snap picture

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2

Param

None

Return

Jpeg image data

Note

This command will return jpeg image data directly

Example

/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=&pwd=

getRecordList Function

Get record list

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getRecordList

Param

recordPath

Record path

startTime

Start time for research

Copyright@ Shenzhen Foscam Intelligent Technology Limited

30

Foscam IPCamera CGI Guide

Return

endTime

End time for research

recordType

Recort type

startNo

Start no

totalCnt

Total record count

curCnt

Current record count

recordN

N(0-9), Record information

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getRecordList&usr=&pwd=

getRecordList2 Function

Get record list

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getRecordList2

Param

recordPath

Record path

startTime

Start time for research

endTime

End time for research

recordType

Recort type

startNo

Start no

totalCnt

Total record count

curCnt

Current record count

recordN

N(0-9), Record information

Return

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getRecordList2&usr=&pwd=

reloadRecordindex Function

Synchronization of record index for Play

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=reloadRecordindex

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=reloadRecordindex&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

31

Foscam IPCamera CGI Guide

getAlarmRecordConfig Function

Get alarm record config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getAlarmRecordConfig

Param

None

Return

isEnablePreRecord

Preview record state

preRecordSecs

Preview record time

alarmRecordSecs

Alarm record time

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getAlarmRecordConfig&usr=&pwd=

setAlarmRecordConfig Function

Set alarm record config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setAlarmRecordConfig

Param

isEnablePreRecord

Preview record state

preRecordSecs

Preview record time

alarmRecordSecs

Alarm record time

Return

Set result(0-success,-1-error)

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setAlarmRecordConfig&usr=&pwd=&isEnabl

ePreRecord=1&preRecordSecs=5&alarmRecordSecs=30

getRecordPath Function

Get record path for storage

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getRecordPath

Param

None

Return

path

0-SD card,2-FTP server

free

The free capacity of storage device

total

The total capacity of storage device

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getRecordPath&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

32

Foscam IPCamera CGI Guide

setRecordPath Function

Set record path for storage

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setRecordPath

Param

path

0-SD card,2-FTP server 3-SD card and cloud

Return

setResult

0

success

-1

Sd card is not exist

-2

Share direction is not set

-3

Not enough space

-4

Param error

-5

Param recording

free

The free capacity of storage device

total

The total capacity of storage device

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setRecordPath&usr=&pwd=&path=2

getScheduleRecordConfig Function

Get config for schedule recording

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getScheduleRecordConfig

Param

None

Return

isEnable

Schedule-Record enable status, 0-disable,1-enable

recordLevel

Level for drop frame,0-30/30,1-24/30,2-15/30,3-8/30, 4-4/30,5-1/30;

spaceFullMode

The process method when SD card is full,0-cover the oldest video and continue record,1-stop record

isEnableAudio

Is recording include audio? 0-no,1-yes

scheduleN

The motion alaram schedule of one week, N = 0(Monday) ~6(Sunday) For detail, see *1 bellow

Note

·The min unit of schedule is half an hour, scheduleN value range

2 N - 1 (N[0-48]) Example

/cgi-bin/CGIProxy.fcgi?cmd=getScheduleRecordConfig&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

33

Foscam IPCamera CGI Guide

setScheduleRecordConfig Function

Set schedule recordconfig

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setScheduleRecordConfig

Param

isEnable

Schedule-Record enable status, 0-disable,1-enable

recordLevel

Level for drop frame,0-30/30,1-24/30,2-15/30,3-8/30, 4-4/30,5-1/30;

spaceFullMode

The process method when SD card is full,0-cover the oldest video and continue record,1-stop record

isEnableAudio

Is recording include audio? 0-no,1-yes

scheduleN

The motion alaram schedule of one week, N = 0(Monday) ~6(Sunday) For detail, see *1 bellow

Return

None

Note

·The min unit of schedule is half an hour, scheduleN value range

2 N - 1 (N[0-48]) Example

/cgi-bin/CGIProxy.fcgi?cmd=setScheduleRecordConfig&isEnable=1&recordLev

el=0&spaceFullMode=0&isEnableAudio=0&schedule0=1023&schedule1=1023& schedule2=1023&schedule3=1023&schedule4=1023&schedule5=1023&sched ule6=1023&usr=&pwd=

*1 schedule bitmap 0

1

2

3

4

5

6

7

40

41

42

43

44

45

46

47

Monday Tuesday



Wednesday Thursday Wednesday Tuesday Friday Saturday Sunday

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 snap is effective between 20:00 to 20:30

Copyright@ Shenzhen Foscam Intelligent Technology Limited

34

Foscam IPCamera CGI Guide

setIOAlarmConfig Function

Set IO alarm config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setIOAlarmConfig

Param

isEnable

Enable state

linkage

IO alarm linkage

bit0:Ring bit1:Send mail bit2:Snap picture bit3:Record

alarmLevel

Alarm level,0-Low,1-high,trigger alarm

snapInterval

Interval for snap picture

triggerInterval

Interval for trigger alarm again,P.s.The true value of triggerInterval time is the value of the cgi set add 5s.

scheduleN

Return

N(0-6), alarm schedule

Set result(0-success,-1-error)

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setIOAlarmConfig&usr=&pwd=&isEnable=1 &linkage=16&snapInterval=2&alarmLevel=1&triggerInterval=5&schedule0=102 4&schedule1=1024&schedule2=1024&schedule3=1024&schedule4=1024&sch edule5=1024&schedule6=1024

getIOAlarmConfig Function

Get IO alarm config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getIOAlarmConfig

Param

None

Return

isEnable

Enable state

linkage

IO alarm linkage

bit0:Ring bit1:Send mail bit2:Snap picture bit3:Record

alarmLevel

Alarm level

snapInterval

Interval for snap picture

triggerInterval

Interval for trigger alarm again , P.s.The true value of triggerInterval time is the value of the cgi get add 5s.

Copyright@ Shenzhen Foscam Intelligent Technology Limited

35

Foscam IPCamera CGI Guide scheduleN

N(0-6), alarm schedule

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getIOAlarmConfig&usr=&pwd=

clearIOAlarmOutput Function

Clean IO alarm output

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=clearIOAlarmOutput

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=clearIOAlarmOutput&usr=&pwd=

setAudioAlarmConfig Function

Set Audio alarm config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setAudioAlarmConfig

Param

isEnable

Enable state

linkage

Audio alarm linkage

bit0:Ring bit1:Send mail bit2:Snap picture bit3:Record

Return

sensitivity

0=low 1=middle 2=high

snapInterval

Interval for snap picture

triggerInterval

Interval for trigger alarm again

scheduleN

N(0-6), alarm schedule

Set result(0-success,-1-error)

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setAudioAlarmConfig&usr=&pwd=&isEnable =1&linkage=16&snapInterval=2&sensitivity=1&triggerInterval=5&schedule0=1 024&schedule1=1024&schedule2=1024&schedule3=1024&schedule4=1024&s chedule5=1024&schedule6=1024

Copyright@ Shenzhen Foscam Intelligent Technology Limited

36

Foscam IPCamera CGI Guide

getAudioAlarmConfig Function

Get Audio alarm config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getAudioAlarmConfig

Param

None

Return

isEnable

Enable state

linkage

IO alarm linkage

bit0:Ring bit1:Send mail bit2:Snap picture bit3:Record

sensitivity

0=low 1=middle 2=high

snapInterval

Interval for snap picture

triggerInterval

Interval for trigger alarm again

scheduleN

N(0-6), alarm schedule

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getIOAlarmConfig&usr=&pwd=

setPCAudioAlarmCfg Function

Set audio alarm config for PC(web live video)

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setPCAudioAlarmCfg

Param

isEnablePCAudioAl

Enable state

arm

Return

Set result(0-success,-1-error)

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setPCAudioAlarmCfg&usr=&pwd=&isEnable PCAudioAlarm=1

getPCAudioAlarmCfg Function

Get audio alarm config for PC(web live video)

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getPCAudioAlarmCfg

Param

None

Return

isEnablePCAudioAl

Enable state

Copyright@ Shenzhen Foscam Intelligent Technology Limited

37

Foscam IPCamera CGI Guide arm

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getPCAudioAlarmCfg&usr=&pwd=

getMultiDevList Function

Get multi device list

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getMultiDevList

Param

None

Return

devN

N(0-8), device information

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getMultiDevList&usr=&pwd=

getMultiDevDetailInfo Function

Get multi device information

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getMultiDevDetailInfo

Param

chnnl

Channel no

Return

productType

Device type

ip

Device IP

port

Web port

mediaPort

Media port

Name

name





devName

Device name

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getMultiDevDetailInfo&usr=&pwd=

addMultiDev Function

Add multiy device

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=addMultiDev

Param

chnnl

Channel no

productType

Device type

Copyright@ Shenzhen Foscam Intelligent Technology Limited

38

Foscam IPCamera CGI Guide

Return

ip

Device Ip

port

Web port

mediaPort

Media port

Name

name





devName

Device name

Add result(0-success,-1-error)

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=addMultiDev&usr=&pwd=&chnnl=2&product

Type=H264&ip=192.168.1.3&port=88&mediaPort=88&Name=& Word=&devName=FI9805W

delMultiDev Function

Delete multiy device

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=delMultiDev

Param

chnnl

Return

Delete result(0-success,-1-error)

Channel no

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=delMultiDev&usr=&pwd=&chnnl=2

setDeFrameLevel Function

Set status to enhance night vision definition

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setDeFrameLevel

Param

level

0 -Disable the status of enhance 1 -Enable the status of enhance

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setDeFrameLevel&level=0&usr=&pwd=

getDeFrameLevel Function

Get status of enhance the night vision definition

privilege



Copyright@ Shenzhen Foscam Intelligent Technology Limited

39

Foscam IPCamera CGI Guide

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getDeframeLevel

Param

None

Return

level

0 -Disable the status of enhance 1 -Enable the status of enhance

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getDeframeLevel&usr=&pwd=

add Function

Add

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=add

Param

usrName

name

usrPwd



privilege

0

Visitor

1

Operator

2



Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=add&usrName=test&usrPwd=test&privileg e=0& usr=&pwd=

del Function

Delete

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=del

Param

usrName

Return

None

name

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=del&usrName=test&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

40

Foscam IPCamera CGI Guide

get Function

Get

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=get

Param

usrName

Return

None

name

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=get&usrName=test&usr=&pwd=

change Function

Change

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=change

Param

usrName

The you want to change

oldPwd

old

newPwd

new

Return

None

Note

can change every ’s , visitor and operator can only change their own

Example

/cgi-bin/CGIProxy.fcgi?cmd=change&usrName=&oldPwd=&ne wPwd=test&usr=&pwd=

changeName Function

Change name

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=changeName

Param

usrName

The you want to change name

newUsrName

The new name

Return

None

Note

can change every ’s name, visitor and operator can only change their own name

Example

/cgi-bin/CGIProxy.fcgi?cmd=changeName&usrName=&

Copyright@ Shenzhen Foscam Intelligent Technology Limited

41

Foscam IPCamera CGI Guide newUsrName=newname&usr=&pwd=

changeNameAndPwdTogether Function

Change name and together

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=changeNameAndPwdTogether

Param

usrName

The you want to change name

newUsrName

New name

oldPwd

old

newPwd

new

Return

None

Note

can change every ’s name, visitor and operator can only change their own name

Example

/cgi-bin/CGIProxy.fcgi?cmd=changeNameAndPwdTogether&usrName=ad min&newUsrName=newname&oldPwd=&newPwd=newpwd&usr=&pwd=

Function

to camera

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=

Param

usrName

name

remoteIp

Access IP

groupId

An id use to distinguish different s,can be set to current u tick

Return

pwd



Result

0

success

-1

Parameter check error

-2

Exceed max

-3

not exist

-4

not found

-5

error

-6

IP repetition

-7

Access deny

-8

Already

Copyright@ Shenzhen Foscam Intelligent Technology Limited

42

Foscam IPCamera CGI Guide privilege

0

Visitor

1

Operator

2



Note Example

/cgi-bin/CGIProxy.fcgi?cmd=&usrName=&remoteIp=192.168.1.12& groupId=673982479&pwd=&usr=&pwd=

Function

log out to camera

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=

Param

usrName

name

ip

Access IP

groupId

An id use to distinguish different s,can be set to current u tick

Return

Result

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=&usrName=&ip=192.168.1.12&groupI d=673982479&usr=&pwd=

getSessionList Function

Get current session list of the camera

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getSessionList

Param

None

Return

usrCnt

session count

usrN

name of session N

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getSessionList&usr=&pwd=

getList Function

Get list of the camera

privilege



Copyright@ Shenzhen Foscam Intelligent Technology Limited

43

Foscam IPCamera CGI Guide

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getList

Param

None

Return

usrCnt

count

usrN

name of accnount N

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getList&usr=&pwd=

usrBeatHeart Function

checks connection with camera

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=usrBeatHeart

Param

usrName

name

remoteIp

Access IP

groupId

An id use to distinguish different s,can be set to current u tick

Return

checkResult(0-success,-1-error)

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=usrBeatHeart&usrName=&ip=192.168.1.13 &groupId=673982479&usr=&pwd=

PTZ Control ptzMoveUp Function

Move up

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveUp

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveUp&usr=&pwd=

ptzMoveDown Function

Move down

Copyright@ Shenzhen Foscam Intelligent Technology Limited

44

Foscam IPCamera CGI Guide

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveDown

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveDown&usr=&pwd=

ptzMoveLeft Function

Move to left

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveLeft

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveLeft&usr=&pwd=

ptzMoveRight Function

Move to right

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveRight

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveRight&usr=&pwd=

ptzMoveTopLeft Function

Move to top left

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveTopLeft

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveTopLeft&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

45

Foscam IPCamera CGI Guide

ptzMoveTopRight Function

Move to top right

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveTopRight

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveTopRight&usr=&pwd=

ptzMoveBottomLeft Function

Move to bottom left

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveBottomLeft

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveBottomLeft&usr=&pwd=

ptzMoveBottomRight Function

Move to bottom right

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveBottomRight

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzMoveBottomRight&usr=&pwd=

ptzStopRun Function

Stop run PT

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzStopRun

Param

None

Copyright@ Shenzhen Foscam Intelligent Technology Limited

46

Foscam IPCamera CGI Guide

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzStopRun&usr=&pwd=

ptzReset Function

Reset PT to default position

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzReset

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzReset&usr=&pwd=

getPTZSpeed Function

Get the speed of PT

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getPTZSpeed

Param

None

Return

speed

0

Very slow

1

Slow

2

Normal speed

3

Fast

4

Very fast

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getPTZSpeed&usr=&pwd=

setPTZSpeed Function

Set the speed of PT

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=setPTZSpeed

Param

speed

0

Very slow

1

Slow

2

Normal speed

3

Fast

Copyright@ Shenzhen Foscam Intelligent Technology Limited

47

Foscam IPCamera CGI Guide 4

Return

Very fast

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setPTZSpeed&speed=2&usr=&pwd=

getPTZPresetPointList Function

Get all preset point

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getPTZPresetPointList

Param

None

Return

cnt

Current preset point count

pointN

The name of point N

Note

Our device can at most 16 preset point We have 4 point default:LeftMost\RightMost\TopMost\BottomMost

Example

/cgi-bin/CGIProxy.fcgi?cmd=getPTZPresetPointList&usr=&pwd=

ptzAddPresetPoint Function

Add preset point

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzAddPresetPoint

Param

name

Return

None

Note

The preset point position is current PT position

Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzAddPresetPoint&name=test&usr=&pwd

Preset point name

=

ptzDeletePresetPoint Function

Delete preset point by name

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzDeletePresetPoint

Param

name

Return

None

Preset point name

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzDeletePresetPoint&name=test&usr=&p

Copyright@ Shenzhen Foscam Intelligent Technology Limited

48

Foscam IPCamera CGI Guide wd=

ptzGotoPresetPoint Function

Goto preset position

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint

Param

name

Return

None

Preset point name

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzGotoPresetPoint&name=test&usr=&pwd =

ptzGetCruiseMapList Function

Get all cruise map list

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzGetCruiseMapList

Param

None

Return

cnt

Current cruise map point count

mapN

The name of map N

Note

Our device can at most 8 cruise map We have 2 maps default:Horizental/Vertical

Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzGetCruiseMapList&usr=&pwd=

ptzGetCruiseMapInfo Function

Get the detail info of a cruise map by name

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzGetCruiseMapInfo

Param

name

Name of the cruise map

Return

getResult

0

Success

-1

Fail

pointN

The preset point name of this cruise map

Note

Our device can at most 8 preset point one cruise map

Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzGetCruiseMapInfo&name=Horizental&usr=ad

Copyright@ Shenzhen Foscam Intelligent Technology Limited

49

Foscam IPCamera CGI Guide min&pwd=

ptzSetCruiseMap Function

Add a cruise map

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzSetCruiseMap

Param

name

Name of the cruise map

pointN

The name of preset point N

Return

None

Note

Our device can at most 8 preset point one cruise map

Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzSetCruiseMap&name=test&point0=test0&point 1=test1&point2=test2&point3=test3&point4=test4&point5=test5&point6=&poin t7=&usr=&pwd=

ptzDelCruiseMap Function

Delete a cruise map

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzDelCruiseMap

Param

name

Return

None

Name of the cruise map

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzDelCruiseMap&name=test&usr=&pwd=

ptzStartCruise Function

Start a specificate cruise

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzStartCruise

Param

mapName

Return

None

Name of the cruise map

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzStartCruise&mapName=test&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

50

Foscam IPCamera CGI Guide

ptzStopCruise Function

Start current cruise

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=ptzStopCruise

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=ptzStopCruise&usr=&pwd=

setCruiseTime Function

Set time for continue cruise

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=setCruiseTime

Param

time

Return

None

Time for continue cruise

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setCruiseTime&time=5&usr=&pwd=

getCruiseTime Function

Set time for continue cruise

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getCuriseTime

Param Return

time

Time for continue cruise

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getCuriseTime&usr=&pwd=

setCruiseTimeCustomed Function

Set time for continue cruise by costomer

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=setCruiseTimeCustomed

Param

time

Customed time for continue cruise

Copyright@ Shenzhen Foscam Intelligent Technology Limited

51

Foscam IPCamera CGI Guide customed

Return

Customed enable state-0-no,1-yes

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setCruiseTimeCustomed&time=5&customed=1&u sr=&pwd=

getCruiseTimeCustomed Function

Set time for continue cruise by costomer

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getCruiseTimeCustomed

Param Return

time

Customed time for continue cruise

customed

Customed enable state-0-no,1-yes

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getCruiseTimeCustomed&usr=&pwd=

setCruiseLoopCnt Function

Set counts for continue cruise

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=setCruiseLoopCnt

Param

count

Return

None

Counts for continue cruise

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setCruiseLoopCnt&count=5&usr=&pwd=

getCruiseLoopCnt Function

Set counts for continue cruise

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getCruiseLoopCnt

Param Return

count

Counts for continue cruise

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getCruiseLoopCnt&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

52

Foscam IPCamera CGI Guide

setCruiseCtrlMode Function

Set control mode for continue cruise, by time or count

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=setCruiseCtrlMode

Param

mode

Return

None

Control mode-0:by time,1:by loop count

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setCruiseCtrlMode&mode=0&usr=&pwd=

getCruiseCtrlMode Function

Get control mode for continue cruise, by time or count

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getCruiseCtrlMode

Param Return

mode

Control mode-0:by time,1:by loop count

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getCruiseCtrlMode&usr=&pwd=

setCruisePrePointLingerTime Function

Set linger time for cruise,when pt arrive prepoint

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=setCruisePrepointLingerTime

Param

name

Cruise map name

timeN

Time for each prepoint

Return

None

Note

N:[0-7],max number of prepoints in cruise

Example

/cgi-bin/CGIProxy.fcgi?cmd=setCruisePrePointLingerTime&name=123&time0= 0&time1=1&time2=2&time3=3&time4=4&time5=5&time6=6&time7=7&usr=ad min&pwd=

getCruisePrePointLingerTime Function

Set linger time for cruise,when pt arrive prepoint

privilege

operator

Copyright@ Shenzhen Foscam Intelligent Technology Limited

53

Foscam IPCamera CGI Guide

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getCruisePrepointLingerTime

Param

name

Cruise map name

Return

timeN

Time for each prepoint

Note

N:[0-7],max number of prepoints in cruise

Example

/cgi-bin/CGIProxy.fcgi?cmd=getCruisePrePointLingerTime&name=123&usr=a dmin&pwd=

zoomIn Function

Zoom in

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=zoomIn

Param

None

Return

None

Note

Only ed by the device has zoom lens

Example

/cgi-bin/CGIProxy.fcgi?cmd=zoomIn&usr=&pwd=

zoomOut Function

Zoom out

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=zoomOut

Param

None

Return

None

Note

Only ed by the device has zoom lens

Example

/cgi-bin/CGIProxy.fcgi?cmd=zoomOut&usr=&pwd=

zoomStop Function

Stop zoom run

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=zoomStop

Param

None

Return

None

Note

Only ed by the device has zoom lens

Example

/cgi-bin/CGIProxy.fcgi?cmd=zoomStop&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

54

Foscam IPCamera CGI Guide

getZoomSpeed Function

Get the speed of Zoom

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getZoomSpeed

Param

None

Return

speed

0

Slow

1

Normal

2

Fast

Note

Only ed by the device has zoom lens

Example

/cgi-bin/CGIProxy.fcgi?cmd=getZoomSpeed&usr=&pwd=

setZoomSpeed Function

Set the speed of PTZ

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=setZoomSpeed

Param

speed

0

Slow

1

Normal

2

Fast

Return

None

Note

Only ed by the device has zoom lens

Example

/cgi-bin/CGIProxy.fcgi?cmd=setZoomSpeed&usr=&pwd=&speed=1

setPTZSelfTestMode Function

Set the selftest mode of PTZ

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd= setPTZSelfTestMode

Param

mode

0

No selftest

1

Normal selftest

2

After

normal

selftest,

then

goto

presetpoint-appointed Return

None

Note

Only ed by ipc that can enable ptz-selftest

Example

/cgi-bin/CGIProxy.fcgi?usr=&pwd=&cmd=setPTZSelfTestMode&mod e=2

Copyright@ Shenzhen Foscam Intelligent Technology Limited

55

Foscam IPCamera CGI Guide

getPTZSelfTestMode Function

Get the selftest mode of PTZ

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd= getPTZSelfTestMode

Param

None

Return

mode

0

No selftest

1

Normal selftest

2

After

normal

selftest,

then

goto

presetpoint-appointed Return

None

Note

Only ed by ipc that can enable ptz-selftest

Example

/cgi-bin/CGIProxy.fcgi?usr=&pwd=&cmd=getPTZSelfTestMode

setPTZPrePointForSelfTest Function

Set presetpoint for selftest of PTZ

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd= setPTZPrePointForSelfTest

Param

name

Return

None

Note

Only ed by ipc that can enable ptz-selftest-2

Example

/cgi-bin/CGIProxy.fcgi?usr=&pwd=&cmd=setPTZPrePointForSelfTes

Preset point name

t&name=TopMost

getPTZPrePointForSelfTest Function

Get the presetpoint for selftest of PTZ

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd= getPTZPrePointForSelfTest

Param

None

Return

name

Note

Only ed by ipc that can enable ptz-selftest

Example

/cgi-bin/CGIProxy.fcgi?usr=&pwd=&cmd=getPTZPrePointForSelfTes

Preset point name

t

Copyright@ Shenzhen Foscam Intelligent Technology Limited

56

Foscam IPCamera CGI Guide

set485Info Function

Set informations of 485

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=set485Info

Param

rs485Protocol

Protocol

rs485Addr

Address

rs485Baud

Baud rate

rs485DataBit

DataBit

rs485StopBit

StopBit

rs485Check

Parity

Return

None

Note

Only ed by ipc that can enable 485

Example

/cgi-bin/CGIProxy.fcgi?usr=&pwd=&cmd=set485Info&rs485Protocol =0&rs485Addr=1&rs485Baud=1200&rs485DataBit=7&rs485StopBit=1&rs 485Check=0

get485Info Function

Get informations of 485

privilege

operator

Usage

/cgi-bin/CGIProxy.fcgi?cmd=get485Info

Param

None

Return

rs485Protocol

Protocol

rs485Addr

Address

rs485Baud

Baud rate

rs485DataBit

DataBit

rs485StopBit

StopBit

rs485Check

Parity

Note

Only ed by ipc that can enable 485

Example

/cgi-bin/CGIProxy.fcgi?usr=&pwd=&cmd=get485Info

Copyright@ Shenzhen Foscam Intelligent Technology Limited

57

Foscam IPCamera CGI Guide

Network getIPInfo Function

Get IP Info

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getIPInfo

Param

None

Return

isDH

Obtain ip from dh server or not

ip

ip address(Can only ipv4 yet)

gate

gateway(“0.0.0.0” when use dh)

mask

subnet mask

dns1

The first dns server addr(“0.0.0.0” when use dh)

dns2

The second dns server addr(“0.0.0.0” when use dh)

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getIPInfo&usr=&pwd=

setIpInfo Function

Set IP Info

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setIpInfo

Param

isDH

Obtain ip from dh server or not

ip

ip address(Can only ipv4 yet)

gate

gateway

mask

subnet mask

dns1

The first dns server addr

dns2

The second dns server addr

Return

None

Note

System will reboot automatically to take effect after call this CGI command

Example

/cgi-bin/CGIProxy.fcgi?cmd=setIpInfo&isDH=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=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

58

Foscam IPCamera CGI Guide

refreshWifiList Function

Start scan the aps around

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=refreshWifiList

Param

None

Return

None

Note

This operation may takes a while, about 20 seconds or above, the other operation on this device will be blocked during the period.

Example

/cgi-bin/CGIProxy.fcgi?cmd=refreshWifiList&usr=&pwd=

getWifiList Function

Get the aps around after refreshWifiList

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getWifiList

Param

startNo

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

Return

totalCnt

Total count of aps

curCnt

Current aps count

apN

The detail info of ap N

ssid

AP name

Format:

mac

AP’s mac address

ssid+mac+quality+isEncryp

quality

Signal quality(0~100)

t+encrypType

isEncrypt

Encrypt or not

encrypType

0

Open mode

1

WEP

2

WPA

3

WPA2

4

WPA/WPA2

Note

Only 10 aps will be returned one time

Example

/cgi-bin/CGIProxy.fcgi?cmd=getWifiList&startNo=0&usr=&pwd=

setWifiSetting Function

Set wifi config

Copyright@ Shenzhen Foscam Intelligent Technology Limited

59

Foscam IPCamera CGI Guide

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setWifiSetting

Param

isEnable

Enable state

isUseWifi

Use wifi or not

ssid

AP name

netType

0

Infra net

1

Ad-hoc

0

Open mode

1

WEP

2

WPA

3

WPA2

4

WPA/WPA2

encryptType

Not ed yet

psk

The psk of WPA WPA2

authMode

0

Open mode

1

Shared key

2

Auto mode

0

ASIC

1

Hex

keyFormat

defaultKey

1~4

key1 key2 key3 key4 key1Len

64 or 128

key2Len

64 or 128

key3Len

64 or 128

key4Len

64 or 128

isNewFormat

1

Use in new version when you need encrypt wifi .if you are old platform you need not use it. Eg: using this param ,if your is “123&”,you must use “49,50,51,38” instead it .(Each character must use ASCCI code conversion, and separated by commas characters)

Return

None

Note

Camera will not connect to AP unless you enject your cable

Example

/cgi-bin/CGIProxy.fcgi?cmd=setWifiSetting&isEnable=1&isUseWifi=1&ssid=fosta r_soft&netType=0&encryptType=4&psk=41,48,38&authMode=0&keyFormat=0&d

Copyright@ Shenzhen Foscam Intelligent Technology Limited

60

Foscam IPCamera CGI Guide efaultKey=1&key1=&key2=&key3=&key4=&key1Len=64&key2Len=64&key3Len =64&key4Len=64&usr=&pwd=

getWifiConfig Function

Get wifi config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getWifiConfig

Param

None

Return

isEnable

Enable state

isUseWifi

Use wifi or not

isConnecte

Connected state

d connected

Connedted ap

AP ssid

AP name

encryptTyp

0

Open mode

e

1

WEP

2

WPA

3

WPA2

4

WPA/WPA2

psk

The psk of WPA WPA2

authMode

0

Open mode

1

Shared key

2

Auto mode

0

ASIC

1

Hex

keyFormat

defaultKey

1~4

key1 key2 key3 key4

Return

key1Len

64 or 128

key2Len

64 or 128

key3Len

64 or 128

key4Len

64 or 128

None

Copyright@ Shenzhen Foscam Intelligent Technology Limited

61

Foscam IPCamera CGI Guide

Note

Camera will not connect to AP unless you enject your cable

Example

/cgi-bin/CGIProxy.fcgi?cmd=getWifiConfig&usr=&pwd=

getPortInfo Function

Get ports of camera

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getPortInfo

Param

None

Return

webPort

http port(default value is 88)

httpsPort

https port(default value is 443)

mediaPort

media port(default value is 88)

onvifPort

Onvif Port(default value is 888)

Note

.You can call this CGI command without usr or pwd section .onvifPort param only for onvif camera, the camra which does not has onvif

function does not have this param Example

/cgi-bin/CGIProxy.fcgi?cmd=getPortInfo&usr=&pwd=

setPortInfo Function

Set ports of camera

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getPortInfo

Param

webPort

http port(default value is 88)

mediaPort

media port(default value is 88)

httpsPort

https port(default value is 443)

onvifPort

Onvif Port(default value is 888)

Return

None

Note

.Re is needed after call this CGI command .onvifPort param only for onvif camera, the camra which does not has onvif

function does not have this param Example

/cgi-bin/CGIProxy.fcgi?cmd=setPortInfo&webPort=88&mediaPort=88&httpsPo rt=443&onvifPort=888&usr=&pwd=

getUPnPConfig Function

Get UpnP config

Copyright@ Shenzhen Foscam Intelligent Technology Limited

62

Foscam IPCamera CGI Guide

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getUPnPConfig

Param

None

Return

isEnable

is Enable UpnP function

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getUPnPConfig&usr=&pwd=

setUPnPConfig Function

Set UpnP config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setUPnPConfig

Param

isEnable

Return

None

is Enable UpnP function

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setUPnPConfig&isEnable=1&usr=&pwd=

getDDNSConfig Function

Get DDNS config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getDDNSConfig

Param

None

Return

isEnable

is Enable DDNS update

hostName

DDNS domain

ddnsServer

0

Factory DDNS

1

Oray

2

3322

3

no-ip

4

dyndns



name





factoryDDNS

factory ddns

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getDDNSConfig&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

63

Foscam IPCamera CGI Guide

setDDNSConfig Function

Set DDNS config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setDDNSConfig

Param

isEnable

is Enable DDNS update

hostName

DDNS domain

ddnsServer

0

Factory DDNS

1

Oray

2

3322

3

no-ip

4

dyndns



name





Return

None

Note

This command can only be used to set the third party ddns

Example

/cgi-bin/CGIProxy.fcgi?cmd=setDDNSConfig&isEnable=1&hostName=test.dyn dns.org&ddnsServer=4&=test&=test&usr=&pwd=

setFtpConfig Function

Set FTP config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setFtpConfig

Param

ftpAddr

FTP server address, you can contain sub directory in it

ftpPort

FTP port

mode

0

PASV mode

1

PORT mode

Return

Name

name





None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setFtpConfig&ftpAddr=ftp://192.168.1.2/sbuDir&ft pPort=21&mode=0&Name=test&=test&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

64

Foscam IPCamera CGI Guide

getFtpConfig Function

Get FTP config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getFtpConfig

Param

None

Param

ftpAddr

FTP server address, you can contain sub directory in it

ftpPort

FTP port

mode

0

PASV mode

1

PORT mode

Name

name





Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getFtpConfig&usr=&pwd=

testFtpServer Function

Test FTP server

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=testFtpServer

Param

ftpAddr

FTP server address, you can contain sub directory in it

ftpPort

FTP port

mode

0

PASV mode

1

PORT mode

Return

fptName

name

ftp



testResult

0

Success

-1

Fail

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=testFtpServer&ftpAddr=ftp://192.168.1.2/sbuDir&f tpPort=21&mode=0&fptName=test&ftp=test&usr=&pwd=

getSMTPConfig Function

Get mail config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getSMTPConfig

Copyright@ Shenzhen Foscam Intelligent Technology Limited

65

Foscam IPCamera CGI Guide

Param

None

Return

isEnable

is enable camera send mail?

server

SMTP server address

port

smtp port

isNeedAuth

Need auth or not

tls

0

None

1

TLS

2

STARTTLS



name





sender reciever

Use “,” between 2 senders, for exapler: [email protected]

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getSMTPConfig&usr=&pwd=

setSMTPConfig Function

Get mail config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setSMTPConfig

Param

isEnable

is enable camera send mail?

server

SMTP server address

port

smtp port

isNeedAuth

Need auth or not

tls

0

None

1

TLS

2

STARTTLS



name





sender reciever

Use “,” between 2 senders, for exapler: [email protected]

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setSMTPConfig&isEnable=1&server=smtp.gmail. com&port=587&isNeedAuth=1&=test&=test&[email protected]

Copyright@ Shenzhen Foscam Intelligent Technology Limited

66

Foscam IPCamera CGI Guide [email protected]&usr=&pwd=

smtpTest Function

Test mail setting

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=smtpTest

Param

smtpServer

SMTP server address

port

smtp port

isNeedAuth

Need auth or not

tls

0

None

1

TLS

2

STARTTLS

Return Note



name





sender

Send Email address

testResult

0

Success

-1

Fail

You must call setSMTPConfig firstly. We will send a test mail to all recievers

Example

/cgi-bin/CGIProxy.fcgi?cmd=smtpTest&smtpServer=smtp.gmail.com&port=587 [email protected]&usr=ad min&pwd=

setP2PEnable Function

Set p2p status

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setP2PEnable

enable Return

0

Disable

1

Enable

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setP2PEnable&enable=1&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

67

Foscam IPCamera CGI Guide

getP2PEnable Function

Get p2p status

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getP2PEnable

Param

None

enable

0

Disable

1

Enable

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getP2PEnable&usr=&pwd=

setP2PPort Function

Set p2p port

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setP2PPort

port Return

P2P port number

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setP2PPort&port=12345&usr=&pwd=

getP2PPort Function

Get p2p port

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getP2PPort

Param

None

Return

port

P2P port number

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getP2PPort&usr=&pwd=

getP2PInfo Function

Get p2p UID

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getP2PInfo

Copyright@ Shenzhen Foscam Intelligent Technology Limited

68

Foscam IPCamera CGI Guide

Param

None

Return

uid

P2P UID

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getP2PInfo&usr=&pwd=

getPPPoEConfig Function

Get PPPoE config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getPPPoEConfig

Param

None

Return

isEnable

is Enable PPPoE function

Name

Name





Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getPPPoEConfig&usr=&pwd=

setPPPoEConfig Function

Set PPPoE config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setPPPoEConfig

Param

isEnable

is Enable PPPoE function

Name

Name





Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setPPPoEConfig&isEnable=1&Name=usr&p assword=pwd&usr=&pwd=

Device manage setSystemTime Function

Set system time

privilege



Copyright@ Shenzhen Foscam Intelligent Technology Limited

69

Foscam IPCamera CGI Guide

Usage

/cgi-bin/CGIProxy.fcgi?cmd=setSystemTime

Param

timeSource

ntpServer

0

Get time from NTP server

1

Set time manually

ntp server addr ntp server: time.nist.gov

time.kriss.re.kr

time.windows.com

time.nuri.net dateFormat

timeFormat

timeZone

0

YYYY-MM-DD

1

DD/MM/YYYY

2

MM/DD/YYYY

0

12 hours

1

24 hours

The seconds between local time and GMT time. For example: timeZone=3600 presents GMT-01:00 timeZone=-3600 presents GMT+01:00

isDst

Daylight saving time (0-disable,1-enable)

dst

Not in use currently

year mon day hour minute sec

Return

None

Note

This command can only be used to set the third party ddns

Example

/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=&pwd=

getSystemTime Function

Get system time

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getSystemTime

Param

None

Return

timeSource

0

Get time from NTP server

1

Set time manually

Copyright@ Shenzhen Foscam Intelligent Technology Limited

70

Foscam IPCamera CGI Guide ntpServer

ntp server addr ntp server: time.nist.gov

time.kriss.re.kr

time.windows.com

time.nuri.net dateFormat

timeFormat

timeZone

0

YYYY-MM-DD

1

DD/MM/YYYY

2

MM/DD/YYYY

0

12 hours

1

24 hours

The seconds between local time and GMT time. For example: timeZone=3600 presents GMT-01:00 timeZone=-3600 presents GMT+01:00

isDst

Daylight saving time (0-disable,1-enable)

dst

Not in use currently

year mon day hour minute sec

Note

This command can only be used to set the third party ddns

Example

/cgi-bin/CGIProxy.fcgi?cmd=getSystemTime&usr=&pwd=

openInfraLed Function

Force open infra led

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=openInfraLed

Param

None

Return

ctrlResult

0

Success

-1

Fail

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=openInfraLed&usr=&pwd=

closeInfraLed Function

Force close infra led

Copyright@ Shenzhen Foscam Intelligent Technology Limited

71

Foscam IPCamera CGI Guide

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=closeInfraLed

Param

None

Return

ctrlResult

0

Success

-1

Fail

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=closeInfraLed&usr=&pwd=

getInfraLedConfig Function

Get infra led config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getInfraLedConfig

Param

None

Return

mode

0

Auto mode

1

Manual mode

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getInfraLedConfig&usr=&pwd=

setInfraLedConfig Function

Set infra led config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setInfraLedConfig&mode=0

Param

mode

Return

0

Auto mode

1

Manual mode

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setInfraLedConfig&mode=&usr=&pwd=

getScheduleInfraLedConfig Function

Get config for infra led switch schedule

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getScheduleInfraLedConfig

Param

None

Return

startHourN

Start hour

Copyright@ Shenzhen Foscam Intelligent Technology Limited

72

Foscam IPCamera CGI Guide startMinN

Start Minitue

endHourN

End hour

endMinN

End minitue

Note

N:[0-2],the number of infra led switch schedule

Example

/cgi-bin/CGIProxy.fcgi?cmd=getScheduleInfraLedConfig&usr=&pwd=

setScheduleInfraLedConfig Function

Set config for infra led switch schedule

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setScheduleInfraLedConfig&mode=0

Param

startHourN

Start hour

startMinN

Start Minitue

endHourN

End hour

endMinN

End minitue

Return

None

Note

N:[0-2],the number of infra led switch schedule

Example

/cgi-bin/CGIProxy.fcgi?cmd=setInfraLedConfig&mode=&usr=&pwd=

getDevState Function

Get all device state

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getDevState

Param

None

Return

IOAlarm

0

Disabled

1

No alaram

2

Detect alarm

motionDetectAlar

0

Disabled

am

1

No alarm

2

Detect alarm

0

Disabled

1

No alarm

2

Detect alarm

0

Not in recording

1

Recording

0

No sd card

soundAlarm

record sdState

Copyright@ Shenzhen Foscam Intelligent Technology Limited

73

Foscam IPCamera CGI Guide 1

Sd card ok

2

Sd card read only

sdFreeSpace

Free space of sd card by unit of k

sdTotalSpace

Total space of sd card by unit of k

ntpState

0

Disabled

1

Update success

2

Update fail

0

Disabled

1

Update success

2

Update fail

ddnspState

url

DDNS url

upnpState

0

Disabled

1

Update success

2

Update fail

0

No wifi connected

1

Connected

isWifiConnected

wifiConnectedAP

The ssid of the ap which has been connected

infraLedState

0

OFF

1

ON

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=&pwd=

getDevName Function

Get camera name

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getDevName

Param

None

Return

devName

Camera name

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getDevName&usr=&pwd=

setDevName Function

Set camera name

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setDevName

Copyright@ Shenzhen Foscam Intelligent Technology Limited

74

Foscam IPCamera CGI Guide

Param

devName

Return

None

Camera name

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setDevName&devName=test&usr=&pwd=

getDevInfo Function

Get camera information

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getDevInfo

Param

None

Return

productNam e

Camera model

serialNo

Serial no

devName

Camera name

mac

Mac address

year mon day hour min sec timeZone

Time zone

firmwareVer

Firmware version

hardwareVer

Hardware version

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getDevInfo&usr=&pwd=

getProductModel Function

Get camera model number

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductModel

Param

None

Return

model

Camera model number

Copyright@ Shenzhen Foscam Intelligent Technology Limited

75

Foscam IPCamera CGI Guide

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductModel&usr=&pwd=

getProductModelName Function

Get camera model name

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductModelName

Param

None

Return

modelName

Camera model name

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductModelName&usr=&pwd=

getProductLanguage Function

Get camera main language

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductLanguage

Param

None

Return

language

Camera main language

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductLanguage&usr=&pwd=

getProductSensorType Function

Get camera sensor type number

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductSensorType

Param

None

Return

sensorType

Camera sensor type number

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductSensorType&usr=&pwd=

getProductWifiType Function

Get camera wifi type number

Copyright@ Shenzhen Foscam Intelligent Technology Limited

76

Foscam IPCamera CGI Guide

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductWifiType

Param

None

Return

wifiType

Camera wifi type number

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductWifiType&usr=&pwd=

getProductSdFlag Function

Whether camera sd card

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductSdFlag

Param

None

Return

sdFlag

Camera flag to sd card-0:no,1:yes

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductSdFlag&usr=&pwd=

getProductOutdoorFlag Function

Whether camera is outdoor machine

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductOutdoorFlag

Param

None

Return

outdoorFlag

Whether camera is outdoor machine-0:no,1:yes

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductOutdoorFlag&usr=&pwd=

getProductPtFlag Function

Whether camera is pt machine

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductPtFlag

Param

None

Return

ptFlag

Whether camera is pt machine-0:no,1:yes

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductPtFlag&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

77

Foscam IPCamera CGI Guide

getProductZoomFlag Function

Whether camera is zoom machine

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductZoomFlag

Param

None

Return

zoomFlag

Whether camera is zoom machine-0:no,1:yes

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductZoomFlag&usr=&pwd=

getProductRs485Flag Function

Whether camera rs485

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductRs485Flag

Param

None

Return

rs485Flag

Whether camera rs485-0:no,1:yes

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductRs485Flag&usr=&pwd=

getProductIoAlarmFlag Function

Whether camera IO alarm

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductIoAlarmFlag

Param

None

Return

ioAlarmFlag

Whether camera IO alarm-0:no,1:yes

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductIoAlarmFlag&usr=&pwd=

getProductOnvifFlag Function

Whether camera Onvif

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductOnvifFlag

Param

None

Copyright@ Shenzhen Foscam Intelligent Technology Limited

78

Foscam IPCamera CGI Guide

Return

onvifFlag

Whether camera onvif-0:no,1:yes

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductOnvifFlag&usr=&pwd=

getProductP2pFlag Function

Whether camera P2p

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductP2pFlag

Param

None

Return

p2pFlag

Whether camera p2p-0:no,1:yes

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductP2pFlag&usr=&pwd=

getProductWpsFlag Function

Whether camera Wps

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductWpsFlag

Param

None

Return

wpsFlag

Whether camera wps-0:no,1:yes

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductWpsFlag&usr=&pwd=

getProductAudioFlag Function

Whether camera audio-speak

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductAudioFlag

Param

None

Return

audioFlag

Whether camera audio for speak-0:no,1:yes

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductAudioFlag&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

79

Foscam IPCamera CGI Guide

getProductTalkFlag Function

Whether camera audio-talk

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductTalkFlag

Param

None

Return

talkFlag

Whether camera audio for talk-0:no,1:yes

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductTalkFlag&usr=&pwd=

getProductAppVer Function

Get camera application version

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductAppVer

Param

None

Return

appVer

camera application version

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductAppVer&usr=&pwd=

getProductAllInfo Function

Get camera Information

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getProductAllInfo

Param

None

Return

model

Model number

modelName

Model Name

language

Main language

sensorType

Sensor type number

wifiType

Wifi Type Number

reserve1

Reserve

reserve2

Reserve

reserve3

Reserve

reserve4

Reserve

Copyright@ Shenzhen Foscam Intelligent Technology Limited

80

Foscam IPCamera CGI Guide

sdFlag

Whether machine sd card

outdoorFlag

Whether machine is outdoor

ptFlag

Whether machine pt

zoomFlag

Whether machine zoom

rs485Flag

Whether machine rs485

ioAlarmFlag

Whether machine io alarm

onvifFlag

Whether machine onvif

p2pFlag

Whether machine p2p

wpsFlag

Whether machine wps

audioFlag

Whether machine audio-speak

talkFlag

Whether machine audio-talk

reserveFlag1

reserve

reserveFlag2

reserve

reserveFlag3

reserve

reserveFlag4

reserve

appVer

Camera application version

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getProductAllInfo&usr=&pwd=

getGeneratePubKey Function

Get public key generated by camera for software reset

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getGeneratePubKey

Param

None

Return

genResult

The result that camera generate public key for software reset

genPubLen

The length of public key

pubKey

Public key

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getGeneratePubKey&usr=&pwd=

toolRestoreToFactory Function

Set camera reset to factory by software

privilege

visitor

Copyright@ Shenzhen Foscam Intelligent Technology Limited

81

Foscam IPCamera CGI Guide

Usage

/cgi-bin/CGIProxy.fcgi?cmd=toolRestoreToFactory

Param

codeLen

Code length for camera reset

code

Code for camera reset

restoreResult

The result that camera reset

Return Note Example

/cgi-bin/CGIProxy.fcgi?cmd=toolRestoreToFactory&codeLen=10&code=xxxxx xxxxx&&usr=&pwd=

System rebootSystem Function

Reboot camera

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=rebootSystem

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=rebootSystem&usr=&pwd=

restoreToFactorySetting Function

Restore to factory setting

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=restoreToFactorySetting

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd= restoreToFactorySetting&usr=&pwd=

exportConfig Function

Export config file

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=exportConfig

Param

None

Copyright@ Shenzhen Foscam Intelligent Technology Limited

82

Foscam IPCamera CGI Guide

Return

fileName

Note

After call this command, you can get the config file by visit the following addr:

The config name

/configs/export/configs.bin

Example

/cgi-bin/CGIProxy.fcgi?cmd=exportConfig&usr=&pwd=

ImportConfig Function

Import config file

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=importConfig&usr=&pwd=

Param

None

Return

None

Note

System will reboot automatically after this operation

Example



enctype="multipart/form-data"

action="cgi-bin/ CGIProxy.fcgi?cmd=importConfig&usr=&pwd=" >


FwUpgrade Function

Upgrade firmware

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=fwUpgrade&usr=&pwd=

Param

None

Return

upgradeResu

0

Upgrade success

lt

-1

Upgrade fail

Note

System will reboot automatically after this operation. This action may takes about 120s when upgrade app firmware, takes about 60s when upgrade system firmware

Example



Copyright@ Shenzhen Foscam Intelligent Technology Limited

83

Foscam IPCamera CGI Guide

removePatch Function

remove firewall patch

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=removePatch

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=removePatch&usr=&pwd=

MISC getFirewallConfig Function

Get firewall config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getFirewallConfig

Param

None

Return

isEnable

Use firewall or not

rule

0

The ip list can’t access

1

Only allow the ip list to access

ipListN

The ip address(Network address) of list N

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getFirewallConfig&usr=&pwd=

setFirewallConfig Function

Set firewall config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setFirewallConfig

Param

isEnable

Use firewall or not

rule

0

The ip list can’t access

1

Only allow the ip list to access

ipListN

Return

The ip address(Network address) of list N

None

Copyright@ Shenzhen Foscam Intelligent Technology Limited

84

Foscam IPCamera CGI Guide

Note Example

/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=&pwd=

getLog Function

Get system log

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getLog

Param

offset

Where you want to start get log

count

How many logs you want to get, must less then 20

totalCnt

Total log count

curCnt

current log count

logN

formation, consist by

Return

time++ip+logID

Note

We can have 1000 record of log at most. We can get 10 log at most one time

Example

/cgi-bin/CGIProxy.fcgi?cmd=getLog&offset=0&count=20&usr=&pwd=

3. All platform except 3518A add cgi getAudioVolume Function

Get Audio Volume

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getAudioVolume

Param

None

Return

volume

Volume value (0~100)

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getAudioVolume&usr=&pwd=

setAudioVolume Function

Set Audio Volume

Copyright@ Shenzhen Foscam Intelligent Technology Limited

85

Foscam IPCamera CGI Guide

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setAudioVolume

Param

volume

Return

None

Volume value (0~100)

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setAudioVolume&volume=100&usr=&pwd=

getWifiMode Function

Get Wifi Mode

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getWifiMode

Param

None

Return

wifiMode

0

sta

1

softAp

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getWifiMode&usr=&pwd=

getTemperatureAlarmConfig Function

Get Temperature Alarm Config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getTemperatureAlarmConfig

Param

None

Return

isEnable linkage

0

disable

1

enable

Motion alarm linkage

bit0:Ring

( bit7| bit3 | bit2 | bit1 | bit0 )

bit1:Send mail bit2:Snap picture bit3:Record

bit7:Push to phone lowerLimit

Top temperature Lower temperature

snapInterval

Interval for snap picture

triggerInterval

Interval for trigger alarm again,P.s.The true value of

topLimit

triggerInterval time is the value of the cgi get add 5s. scheduleN

N(0-6), alarm schedule

Copyright@ Shenzhen Foscam Intelligent Technology Limited

86

Foscam IPCamera CGI Guide

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getTemperatureAlarmConfig&usr=&pwd=

setTemperatureAlarmConfig Function

Set Temperature Alarm Config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setTemperatureAlarmConfig

Param

isEnable linkage

0

disable

1

enable

Motion alarm linkage

bit0:Ring

( bit7| bit3 | bit2 | bit1 | bit0 ) bit1:Send mail bit2:Snap picture bit3:Record

bit7:Push

to

phone lowerLimit

Top temperature Lower temperature

snapInterval

Interval for snap picture

triggerInterval

Interval for trigger alarm again,P.s.The true value

topLimit

of triggerInterval time is the value of the cgi set add 5s. scheduleN

Return

N(0-6), alarm schedule

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setTemperatureAlarmConfig&isEnable=1&linkag

e=129&topLimit=40&lowerLimit=20snapInterval=2&triggerInterval=5&schedul e0=1023&schedule1=1023&schedule2=1023&schedule3=1023&schedule4=1023 &schedule5=1023&schedule6=1023&usr=&pwd=

getTemperatureState Function

Get Temperature Degree

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getTemperatureState

Param

None

Copyright@ Shenzhen Foscam Intelligent Technology Limited

87

Foscam IPCamera CGI Guide

Return

degree

Temperature ℃!

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getTemperatureState&usr=&pwd=

Music setMusicDefaultListRefresh Function

Refresh default list

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setMusicDefaultListRefresh

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setMusicDefaultListRefresh&usr=&pwd=

getMusicListsName Function

Get Music lists name

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getMusicListsName

Param

None

Return

getResult

0

Sucess

-1

Faild

cnt

List number

list0

List0 name

list1

List1 name

list2

List2 name

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setMusicDefaultListRefresh&usr=&pwd=

getMusicsNameOfList Function

Get Musics name of list

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getMusicsNameOfList

Copyright@ Shenzhen Foscam Intelligent Technology Limited

88

Foscam IPCamera CGI Guide

Param

Return

name

List name

startNo

Get music start from startNo

musicNum

Expect to get music numbers

getResult

0

Sucess

-1

Faild

cnt

Musics number of current music list

hadGet

Current CGI had get music numbers

music0

Music0 name

music1

Music1 name

music2

Music2 name

music3

Music3 name

music4

Music4 name

music5

Music5 name

music6

Music6 name

music7

Music7 name

music8

Music8 name

music9

Music9 name

music10

Music10 name

music11

Music11 name

music12

Music12 name

music13

Music13 name

music14

Music14 name

music15

Music15 name

music16

Music16 name

music17

Music17 name

music18

Music18 name

music19

Music19 name

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getMusicsNameOfList&name=default&startNo=0

&musicNum=50&usr=&pwd=

addMusicList Function

Add Musics list and music

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=addMusicList&name=1&music0=1.wav

Param

name

List name

Copyright@ Shenzhen Foscam Intelligent Technology Limited

89

Foscam IPCamera CGI Guide

Return

music0

Music0 name

music1

Music0 name

music2

Music0 name

music3

Music0 name

music4

Music0 name

music5

Music0 name

music6

Music0 name

music7

Music0 name

music8

Music0 name

music9

Music0 name

setResult

0

Sucess

1

Fail,music list had alaready exist

2

Fail,music number had exceed max number

3

Fail,music list had not exist

4

Cgi param_error

cnt

List number

curListName

Current list name

list0

List0 name

list1

List1 name

list2

List2 name

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=addMusicList&name=1&music0=1.wav&music1= &music2=&music3=&music4=&music5=&usr=&pwd=

delMusicList Function

Delete Musics list and music

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=delMusicList&name=1

Param

name

List name

Return

delResult

0

Sucess

1

Fail,music list had not exist

2

Faild,cgi param_error

Copyright@ Shenzhen Foscam Intelligent Technology Limited

90

Foscam IPCamera CGI Guide

cnt

List number

curListName

Current list name

list0

List0 name

list1

List1 name

list2

List2 name

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=delMusicList&name=1&usr=&pwd=

setMusilayMode Function

Set Musics Play Mode

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setMusilayMode&mode=1

Param

mode

Return

1

order

2

One loop

3

List loop

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setMusilayMode&mode=1&usr=&pwd=

getMusilayMode Function

Get Musics Play Mode

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getMusilayMode

Param

None

Return

mode

1

order

2

One loop

3

List loop

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getMusilayMode&usr=&pwd=

setMusilayNext Function

Play Next Music

privilege



Copyright@ Shenzhen Foscam Intelligent Technology Limited

91

Foscam IPCamera CGI Guide

Usage

/cgi-bin/CGIProxy.fcgi?cmd=setMusilayNext

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setMusilayNext&usr=&pwd=

setMusilayPre Function

Play Precede Music

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setMusilayPre

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setMusilayPre&usr=&pwd=

getMusilayState Function

Get Music Play State

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getMusilayState

Param

None

Return

retResult

0

Success

-1

Faild

cnt

Music total number

mode

1

order

2

One loop

3

List loop

index

Music number index

state

0

stop

1

playing

name

List name

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getMusilayState&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

92

Foscam IPCamera CGI Guide

setMusilayStart Function

Start Play Music

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setMusilayStart

Param

mode

Return

1

order

2

One loop

3

List loop

index

Music number index

name

List name

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setMusilayStart&mode=1&index=0&name=defa

ult&usr=&pwd=

setMusilayStop Function

Stop Play Music

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setMusilayStop

Param

None

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setMusilayStop&usr=&pwd=

setMusicDormantTime Function

Set Music Dormant Time

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setMusicDormantTime

Param

minutes

Return

-1

Not dormant

10

10 minutes

20

20 minutes

30

30 minutes

None

Note Copyright@ Shenzhen Foscam Intelligent Technology Limited

93

Foscam IPCamera CGI Guide

Example

/cgi-bin/CGIProxy.fcgi?cmd=setMusicDormantTime&minutes=10&usr=& pwd=

getMusicDormantTime Function

Get Music Dormant Time

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getMusicDormantTime

Param

None

Return

minutes

-1

Not dormant

10

10 minutes

20

20 minutes

30

30 minutes

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getMusicDormantTime&usr=&pwd=

Cloud getCloudConfig Function

Get Cloud Config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getCloudConfig

Param

None

Return

isEnable

0

disable

1

enable

statusMsg

Status msg from server

cloudServer

1

Dropbox

2

Baidu

authAddr

Authorization addr to server

code

Authorization code from server

accessToken

Access Token from Authorization code

quota

Cloud storage total size

d

Cloud storage d size

Note Copyright@ Shenzhen Foscam Intelligent Technology Limited

94

Foscam IPCamera CGI Guide

Example

/cgi-bin/CGIProxy.fcgi?cmd=getCloudConfig&usr=&pwd=

setCloudConfig Function

Set Cloud Config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setCloudConfig

Param

isEnable cloudServer code

Return

0

disable

1

enable

1

Dropbox

2

Baidu

Authorization code from server

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setCloudConfig&isEnable=1&cloudServer=2&code

=dfasdfdfadf&usr=&pwd=

selectCloudServer Function

Select Cloud Server

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=selectCloudServer

Param

isEnable cloudServer

Return

0

disable

1

enable

1

Dropbox

2

Baidu

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=selectCloudServer&isEnable=1&cloudServer=2&u sr=&pwd=

getCloudToken Function

Get Cloud Token

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getCloudToken

Param

isEnable

0

Copyright@ Shenzhen Foscam Intelligent Technology Limited

disable 95

Foscam IPCamera CGI Guide

cloudServer code

1

enable

1

Dropbox

2

Baidu

Authorization code from server

Return

None

Note

Call this cgi, then call getCloudConfig 10s later, find accessToken

Example

/cgi-bin/CGIProxy.fcgi?cmd=getCloudToken&isEnable=1&cloudServer=2&code

=dfasdfdfadf&usr=&pwd=

getCloudQuota Function

Get Cloud Quota

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getCloudQuota

Param

isEnable cloudServer

0

disable

1

enable

1

Dropbox

2

Baidu

Return

None

Note

Call this cgi, then call getCloudConfig 10s later, find quota and d

Example

/cgi-bin/CGIProxy.fcgi?cmd=getCloudQuota&isEnable=1&cloudServer=2&code

=dfasdfdfadf&usr=&pwd=

testCloudServer Function

Get Cloud Quota

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=testCloudServer

Param

isEnable cloudServer

0

disable

1

enable

1

Dropbox

2

Baidu

Return

None

Note

Call this cgi, then call getCloudConfig 10s later, find statueMsg

Example

/cgi-bin/CGIProxy.fcgi?cmd=testCloudServer&isEnable=1&cloudServer=2&cod

e=dfasdfdfadf&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

96

Foscam IPCamera CGI Guide

getPushConfig Function

Get Push Config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getPushConfig

Param

None

Return

isEnable

0

disable

1

enable

pushServer

1

Baidu

statusMsg

Status message from server

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getPushConfig&usr=&pwd=

setPushConfig Function

Set Push Config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setPushConfig

Param

isEnable pushServer

Return

0

disable

1

enable

1

Baidu

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setPushConfig&isEnable=1&pushServer=1&usr=a dmin&pwd=

testPushServer Function

Test Push Server

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=testPushServer

Param

isEnable pushServer

0

disable

1

enable

1

Baidu

Copyright@ Shenzhen Foscam Intelligent Technology Limited

97

Foscam IPCamera CGI Guide

Return

None

Note

Call this cgi, then call getPushConfig 10s later

Example

/cgi-bin/CGIProxy.fcgi?cmd=testPushServer&isEnable=1&pushServer=1&usr= &pwd=

pushOperate Function

Test Push pushOperate

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=pushOperate

Param

cmd_oper

device_type

Return

1

App device

2

un App device

3

Test device

4

tag

5

Push msg to single app device

6

Push msg to tag

1

Web browers

2

pc

3

android

4

ios

5

Windows phone

channel_id

App get it from server

_id

App get it from server

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=pushOperate&usr=&pwd=

SetOnlineUpgrade Function

Online upgrade

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=SetOnlineUpgrade

Param

update_type

1

Upgrade now

2

Upgrade by time

url

Coding Firmware address

cycle

Update cycle

Copyright@ Shenzhen Foscam Intelligent Technology Limited

98

Foscam IPCamera CGI Guide

Return

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=SetOnlineUpgrade&update_type=1&url=http://bcs .duapp.com/foscam/FosBaby_B_app_ver2.x.1.11.bin&cycle=0&usr=&p wd=

setCloudStreamLevel Function

Set cloud stream level

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setCloudStreamLevel

level Return

1~100

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setCloudStreamLevel&level=30usr=&pwd=

getCloudStreamLevel Function

Get cloud stream level

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getCloudStreamLevel

Param

None

Return

level

1~100

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getCloudStreamLevel&usr=&pwd=

4. FosBaby_Baidu CGI(Only) getBaiduRtmp Function

Get Baidu Rtmp information

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getBaiduRtmp

Param

None

Return

isEnable

Baidu Rtmp is enable

Copyright@ Shenzhen Foscam Intelligent Technology Limited

99

Foscam IPCamera CGI Guide

iProperty

For record (default = 1)

isEnableAudio

Audio is enable(yes = 1 no = 0)

isMainStream

Is main stream(main = 1 sub = 0)

szStreamId

Stream id,get from baidu interface

szPublishToken

Have defaults,get from embed

szGuid

Have defaults,get from embed

szDevId

Device id,now is uid

szAccessToken

Access token

szRefreshToken

Refresh token,now you can set none

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getBaiduRtmp&usr=&pwd=

setBaiduRtmp Function

set Baidu Rtmp information

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setBaiduRtmp

Param

isEnable

Baidu Rtmp is enable

iProperty

For record (default = 1)

isEnableAudio

Audio is enable(yes = 1 no = 0)

isMainStream

Is main stream(main = 1 sub = 0)

szStreamId

Stream id,get from baidu interface

szPublishToken

Have defaults,get from embed

szGuid

Have defaults,get from embed

szDevId

Device id,now is uid

szAccessToken

Access token

szRefreshToken

Refresh token,now you can set none

Return Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setBaiduRtmp&isEnable=1&iProperty=4&isEnabl eAudio=1&isMainStream=1&szStreamId=9632a1f46ad711e4aa0900259089e 31a&szPublishToken=581f6d39741ef6a082e675e3c666299f&szGuid=f1d920 ca34a811e3be8c286ed494a71e&szDevId=FCZZZK6I5X4IAZZZ&szAccessTo ken=23.303a5a04219a7d9c44d3067b6911e09a.2592000.1418817013.94480 0184-1247706&szRefreshToken=&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

100

Foscam IPCamera CGI Guide

GetOnlineUpgradeState Function

Get online upgrade state

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=GetOnlineUpgradeState

Param

None

Return

state

0

normal

1

upgrading

2

fail

3

File check ok (fosbaby_P1 use)

progress Errno

0

normal

1

Net error

2

File error

255

Internal error

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=GetOnlineUpgradeState&usr=&pwd=

5. FosBaby_P1 CGI(Only) getHumidityAlarmConfig Function

Get Humidity Alarm Config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getHumidityAlarmConfig

Param

None

Return

isEnable linkage

0

disable

1

enable

Motion alarm linkage

bit0:Ring

( bit7| bit3 | bit2 | bit1 | bit0 )

bit1:Send mail bit2:Snap picture bit3:Record

bit7:Push to phone topLimit lowerLimit

Top humidity Lower humidity

Copyright@ Shenzhen Foscam Intelligent Technology Limited

101

Foscam IPCamera CGI Guide snapInterval

Interval for snap picture

triggerInterval

Interval for trigger alarm again,P.s.The true value of triggerInterval time is the value of the cgi get add 5s.

scheduleN

N(0-6), alarm schedule

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getHumidityAlarmConfig&usr=&pwd=

setHumidityAlarmConfig Function

Set Humidity Alarm Config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setHumidityAlarmConfig

Param

isEnable linkage

0

disable

1

enable

Motion alarm linkage

bit0:Ring

( bit7| bit3 | bit2 | bit1 | bit0 ) bit1:Send mail bit2:Snap picture bit3:Record

bit7:Push

to

phone lowerLimit

Top Humidity Lower Humidity

snapInterval

Interval for snap picture

triggerInterval

Interval for trigger alarm again,P.s.The true value

topLimit

of triggerInterval time is the value of the cgi set add 5s. scheduleN

Return

N(0-6), alarm schedule

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setHumidityAlarmConfig&isEnable=1&linkage=1

29&topLimit=40&lowerLimit=20snapInterval=2&triggerInterval=5&schedule0= 1023&schedule1=1023&schedule2=1023&schedule3=1023&schedule4=1023&sc hedule5=1023&schedule6=1023&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

102

Foscam IPCamera CGI Guide

getHumidityState Function

Get Humidity Value

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getHumidityState

Param

None

Return

humidity

Humidity %!

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getHumidityState&usr=&pwd=

setNightLightState Function

Set Night Light State

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setNightLightState

Param

state

Return

0

Nightlight Off

1

Nightlight On

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setNightLightState&state=1&usr=&pwd=

getNightLightState Function

Get Night Light State

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getNightLightState

Param

None

Return

state

0

Nightlight Off

1

Nightlight On

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getNightLightState&usr=&pwd=

setOneKeyAlarmConfig Function

Set One Key Alarm Config

Copyright@ Shenzhen Foscam Intelligent Technology Limited

103

Foscam IPCamera CGI Guide

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setOneKeyAlarmConfig

Param

isEnable

alarmLinkage

Return

0

Enable One Key Alarm

1

Disable One Key Alarm

bit0

Motion Alarm

bit1

Sound Alarm

bit2

IO Alarm

bit3

Temperature Alarm

bit4

Humidity Alarm

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setOneKeyAlarmConfig&isEnable=1&alarmLinka

ge=3&usr=&pwd=

getOneKeyAlarmConfig Function

Get One Key Alarm Config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getOneKeyAlarmConfig

Param

None

Return

isEnable

alarmLinkage

0

Enable One Key Alarm

1

Disable One Key Alarm

bit0

Motion Alarm

bit1

Sound Alarm

bit2

IO Alarm

bit3

Temperature Alarm

bit4

Humidity Alarm

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getOneKeyAlarmConfig&usr=&pwd=

getTimingRebootConfig Function

Get Timing Reboot Config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getTimingRebootConfig

Param

None

Return

isEnable

0

Enable Timing Reboot

Copyright@ Shenzhen Foscam Intelligent Technology Limited

104

Foscam IPCamera CGI Guide

intervalDay

1

Disable Timing Reboot

7

One week One month

30 Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getTimingRebootConfig&usr=&pwd=

SetTimingRebootConfig Function

Set Timing Reboot Config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setTimingRebootConfig

Param

isEnable

intervalDay

Return

0

Enable One Key Alarm

1

Disable One Key Alarm

7

One Week

30

One month

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setTimingRebootConfig&isEnable=1&alarmLinka

ge=3&usr=&pwd=

6. 3518E+Fosbaby+Fosbaby_P1+Fosbaby_ Baidu getSoftApConfig Function

Get SoftAp Config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getSoftApConfig

Param

None

Return

ssid

SoftAp’s ssid

authMode

0

Open

1

SHARED

2

WEPAUTO

3

WPAPSK

Copyright@ Shenzhen Foscam Intelligent Technology Limited

105

Foscam IPCamera CGI Guide

encryptType

psk

4

WPA2PSK

0

None

1

None

2

AES

3

AES

4 key

AES

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getSoftApConfig&usr=&pwd=

setSoftApConfig Function

Set SoftAp Config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setSoftApConfig

Param

ssid

SoftAp’s ssid

authMode

0

Open

1

SHARED

2

WEPAUTO

3

WPAPSK

4

WPA2PSK

0

None

1

None

2

AES

3

AES

4

AES

encryptType

psk Return

key

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setSoftApConfig&ssid=FosBaby_HAHA&authMo

de=4&encryptType=4&psk=123456789&usr=&pwd=

changeNetMode Function

Change Net Mode

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=changeNetMode&netModeChange=1

Copyright@ Shenzhen Foscam Intelligent Technology Limited

106

Foscam IPCamera CGI Guide

Param Return

netModeChange

1

Sta to softAp

2

softAp to sta

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=changeNetMode&netModeChange=1&usr= &pwd=

setFoscamRtmp Function

set foscam Rtmp information

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setFoscamRtmp

Param

isEnable

Foscam Rtmp is enable

iProperty

For record (default = 1)

isEnableAudio

Audio is enable(yes = 1 no = 0)

isMainStream

Is main stream(main = 1 sub = 0)

szStreamId

Stream id,get from foscam interface

szPublishToken

Have defaults,get from embed

szGuid

Have defaults,get from embed

szDevId

Device id,now is uid

szAccessToken

Access token

szPortal

Dispatching Center Address

Return Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setBaiduRtmp&isEnable=1&iProperty=4&isEnabl eAudio=1&isMainStream=1&szStreamId=9632a1f46ad711e4aa0900259089e 31a&szPublishToken=581f6d39741ef6a082e675e3c666299f&szGuid=f1d920 ca34a811e3be8c286ed494a71e&szDevId=FCZZZK6I5X4IAZZZ&szPortal=23. 303a5a04219a7d9c44d3067b6911e09a.2592000.1418817013.944800184-12 47706&szRefreshToken=&usr=&pwd=

getFoscamRtmp Function

Get Foscam Rtmp information

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getFoscamRtmp

Copyright@ Shenzhen Foscam Intelligent Technology Limited

107

Foscam IPCamera CGI Guide

Param

None

Return

isEnable

Foscam Rtmp is enable

iProperty

For record (default = 1)

isEnableAudio

Audio is enable(yes = 1 no = 0)

isMainStream

Is main stream(main = 1 sub = 0)

szStreamId

Stream id,get from foscam interface

szPublishToken

Have defaults,get from embed

szGuid

Have defaults,get from embed

szDevId

Device id,now is uid

szAccessToken

Access token

szPortal

Dispatching Center Address

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getBaiduRtmp&usr=&pwd=

setSnapToFtpFilenameConfig Function

Set snapPicture filename

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setSnapToFtpFilenameConfig

Return Param

isEnableSetFilename

setSnapToFtpFilenameConfig is enable

filename

File name

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setSnapToFtpFilenameConfig&usr=&pwd= &isEnableSetFilename=1&filename=picture

getSnapToFtpFilenameConfig Function

get snapPicture filename information

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getSnapToFtpFilenameConfig

Param

None

Return

isEnableSetFilename

setSnapToFtpFilenameConfig is enable

filename

File name

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=etSnapToFtpFilenameConfig&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

108

Foscam IPCamera CGI Guide

7. Fosbaby_P1+3518E setLedEnableState Function

Set Led Enable State

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setLedEnableState

Param

isEnable

Return

0

Sys and Net LED Off

1

Sys and Net LED On

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setLedEnableState&isEnable=1&usr=&pwd =

getLedEnableState Function

Get Led Enable State

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getLedEnableState

Param

None

Return

isEnable

0

Sys and Net LED Off

1

Sys and Net LED On

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getLedEnableState&usr=&pwd=

*logID: 0:System power on 1:Detect motion alarm 2: 3: 4: off line

Copyright@ Shenzhen Foscam Intelligent Technology Limited

109

Foscam IPCamera CGI Guide

8. Amba S2L(Only) getHdrMode Function

Get HDR mode

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getHdrMode

Param

None

Return

mode

0

HDR closed

1

HDR opend

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=getHdrMode&usr=&pwd=

setHdrMode Function

Set HDR Mode

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setHdrMode

Param

mode

Return

0

Close HDR

1

Open HDR

None

Note Example

cgi-bin/CGIProxy.fcgi?cmd=setHdrMode&mode=1&usr=&pwd=

getWdrMode Function

Get WDR mode

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getWdrMode

Param

None

Return

mode

0

WDR closed

1

WDR opend

Note

Copyright@ Shenzhen Foscam Intelligent Technology Limited

110

Foscam IPCamera CGI Guide

Example

/cgi-bin/CGIProxy.fcgi?cmd=getWdrMode&usr=&pwd=

setWdrMode Function

Set WDR Mode

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setWdrMode

Param

mode

Return

0

Close WDR

1

Open WDR

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setWdrMode&mode=1&usr=&pwd=

getVideoStreamParam Function

Get video stream param

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getVideoStreamParam

Param

None

Return

resolutionN

Resolution of stream type N

bitRateN

Bit rate of stream type N

frameRateN

Frame rate of stream type N

GOPN

P frames between I frame of stream type N

isVBRN

Bitrate control mode:0-CBR 1-CBR 2-LBR

lbrRatio

Ratio of LBR,range from 10 to 50

(20480~2097152)

Note

N means streamType [0~3]

Example

/cgi-bin/CGIProxy.fcgi?cmd=getVideoStreamParam&usr=&pwd=

setVideoStreamParam Function

Set the video stream param of stream N

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setVideoStreamParam

Param

streamType

0~3

resolution

Resolution of stream type N

bitRate

Bit rate of stream type N

(20480~2097152)

Copyright@ Shenzhen Foscam Intelligent Technology Limited

111

Foscam IPCamera CGI Guide

frameRate

Frame rate of stream type N

GOP

P frames between I frame of stream type N The suggest value is: X * frameRate

Return

isVBR

Bitrate control mode:0-CBR 1-CBR 2-LBR

lbrRatio

Ratio of LBR,range from 10 to 50

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setVideoStreamParam&streamType=0&resolution= 0&bitRate=2097152&frameRate=30&GOP=30&isVBR=2&lbrRatio=27&usr= in&pwd=

getSubVideoStreamParam Function

Get sub video stream param

privilege

visitor

Usage

/cgi-bin/CGIProxy.fcgi?cmd=getSubVideoStreamParam

Param

None

Return

resolutionN

Resolution of stream type N

bitRateN

Bit rate of stream type N

frameRateN

Frame rate of stream type N

GOPN

P frames between I frame of stream type N

isVBRN

Bitrate control modeof stream type N:0-CBR 1-CBR

(20480~2097152)

2-LBR lbrRatio

Ratio of LBR,range from 10 to 50

Note

N means streamType [0~3]

Example

/cgi-bin/CGIProxy.fcgi?cmd=getSubVideoStreamParam&usr=&pwd=

setSubVideoStreamParam Function

Set the sub video stream param of stream N

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setSubVideoStreamParam

Param

streamType

0~3

resolution

Resolution of stream type N

bitRate

Bit rate of stream type N

frameRate

Frame rate of stream type N

GOP

P frames between I frame of stream type N

(20480~2097152)

Copyright@ Shenzhen Foscam Intelligent Technology Limited

112

Foscam IPCamera CGI Guide The suggest value is: X * frameRate

Return

isVBR

Bitrate control mode:0-CBR 1-CBR 2-LBR

lbrRatio

Ratio of LBR,range from 10 to 50

None

Note Example

/cgi-bin/CGIProxy.fcgi?cmd=setSubVideoStreamParam&streamType=0&resoluti on=0&bitRate=2097152&frameRate=30&GOP=30&isVBR=2&lbrRatio=27&usr= &pwd=

getMotionDetectConfig1 Function

Get motion detect config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig

Param

None

Return

isEnable

Is enable motion detect alarm

linkage

Motion alarm linkage

bit0:Ring

( bit7 | bit6 | bit5 | bit4

bit1:Send mail

bit3 | bit2 | bit1 | bit0 )

bit2:Snap picture bit3:Record bit4:IO out bit5:Snap to cloud bit6:Record to cloud bit7:Push message to the phone

snapInterval

The interval time to snap picture again

sensitivity

Motion detect sensitivity

0 : Low 1: Normal 2: High 3: Lower 4: Lowest

triggerInterval

The time of which motion detect alaram can trigger again when a motion detection has happened.P.s.The true value of triggerInterval time is the value of the cgi get add 5s.

isMovAlarmEnabl

Is enable motion alarm detect

e isPirAlarmEnable

Is enable ive Infrared alarm detect

scheduleN

The motion alaram schedule of one week,

Copyright@ Shenzhen Foscam Intelligent Technology Limited

113

Foscam IPCamera CGI Guide N = 0(Monday) ~6(Sunday) For detail, see *1 bellow Area(N)N(1-3)

x

Abscissa value of the detected area’s topleft point

y

Vertical value of the detected area’s topleft point

width

The width of the detected area

height

The height of the detected area

sensitivit

Motion detect sensitivity

y valid

Whether the area is valid

0:invalid 1:valid

Note

·The min unit of schedule is half an hour, scheduleN value range

2 N - 1 (N[0-48]) N .areaN value 2 - 1 (N[0-10]) Example

/cgi-bin/CGIProxy.fcgi?cmd=getMotionDetectConfig1&usr=&pwd=

setMotionDetectConfig1 Function

Set motion detect config

privilege



Usage

/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig

Param

isEnable

Is enable motion detect alarm

linkage

Motion

alarm

bit0:Ring

linkage

bit1:Send mail

( bit7 | bit6 | bit5 |

bit2:Snap picture

bit4

bit3:Record

bit3 | bit2 | bit1 | bit0 )

bit4:IO out bit5:Snap to cloud bit6:Record to cloud bit7:Push message to the phone

snapInterval triggerInterval

isMovAlarmEnable

isPirAlarmEnable

The interval time to snap picture again The time of which motion detect alaram can trigger again when a motion detection has happened.P.s.The true value of triggerInterval time is the value of the cgi set add 5s. 0

Disable

1

Enable

0

Disable

Copyright@ Shenzhen Foscam Intelligent Technology Limited

114

Foscam IPCamera CGI Guide 1 schedule

Enable

The motion alaram schedule of one week,

N

N = 0(Monday) ~6(Sunday) For detail, see *1 bellow

Area(N)

x

Abscissa value of the detected area’s topleft point

N(1-3)

y

Vertical value of the detected area’s topleft point

width

The width of the detected area

Range[0,10000]

height

The height of the detected area

Range[0,10000]

sensitivity

Motion detect sensitivity

0 : Low 1: medium 2: High 3: Lower 4: Lowest

valid

Whether the area is valid

0:invalid 1:valid

Return

None

Note

·The min unit of schedule is half an hour, scheduleN value range

2 N - 1 (N[0-48]) .

Example

/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig1&isEnable=1&linkage=15& snapInterval=2&triggerInterval=6&isMovAlarmEnable=1&isPirAlarmEnable=1& schedule0=281474976710655&schedule1=281474976710655&schedule2=281 474976710655&schedule3=281474976710655&schedule4=281474976710655 &schedule5=281474976710655&schedule6=281474976710655&x1=0&y1=0& width1=300&height1=300&sensitivity1=1&valid1=1&x2=1220&y2=234&width2= 1000&height2=2000&sensitivity2=2&valid2=1&x3=0&y3=3456&width3=9000&h eight3=2340&sensitivity3=3&valid3=0&x4=0&y4=0&width4=9000&height4=900 0&sensitivity4=3&valid4=0&usr=&pwd=

Copyright@ Shenzhen Foscam Intelligent Technology Limited

115

More Documents from "Pietro Danesi" 113p6t

Foscam-ipcamera-cgi--guide-allplatforms-2015.11.06.pdf 2a4z42
February 2022 0
G. Puccini - Coro A Bocca Chiusa - (madama Butterfly) 25101v
December 2019 67
Metodologija Skripta 5h4m1d
October 2019 122
Something Stupid-frank Nancy Sinatra - Piano.pdf 2s3737
October 2019 311
Bruno Martino - E La Chiamano Estate.pdf m5j3a
October 2022 0
Scienza Delle Costruzioni Vol.2(carpinteri) 4t70
December 2019 272