CGI

Status CGI

Version / Author / DateModify
1.0/David/2013-03-30First edition

Overview User to query the status and log IP Camera via CGI. IP Camera status include:

Name

Description

time

IP Camera, current time, the current time to the number of seconds elapsed 1970-1-1 00:00:00 GMT

alarm

IP Camera alarm status
0: no alarm
1: motion detection alarm
2: external alarm
3: audio detection alarm

upnp

UPNP state
0: No Action
1: UPNP success
-1: IGD device not found
-2: Invalid IGD device.
-3: UPNP operation failed

ntp

NTP state
0: No Action
1: NTP successfully
2: NTP fails

record

Video status
0: not video
1: Current video

disk

Video disk status
0: Not detected disk
-1: Disk error
-2: Insufficient disk space
> 0: the percentage of disk space left

ddns

The
DDNS state
0: No Action
-1: Parameter error
-2: Access to server error
-3: Device internal error
100:3322 success
101:3322 Back BADSYS
102:3322 Back BADAUTH
103:3322 Back BADAGENT
104:3322 Back NOTDONATOR
105:3322 Back NOTFQDN
106:3322 Back NOHOST
107:3322 Back NOTYOURS
108:3322 Back NOTACTIVE
109:3322 Back NUMHOST
110:3322 Back ABUSE
111:3322 Back DNSERR
112:3322 Back 911
The 113:3322 unknown error
200: dyndns success
The 201: dyndns Back BADSYS
202: dyndns return BADAGENT
203: dyndns return BADAUTH
204: dyndns return NOTDONATOR
205: dyndns return NOTFQDN
206: dyndns return NOHOST
207: dyndns return NOTYOURS
208: dyndns return NUMHOST
209: dyndns return ABUSE
210: dyndns return DNSERR
211: dyndns Back 911
212: dyndns unknown error
300: oray standard service success
301: oray successful professional services
The 302: oray returns the user name or password error
The 303: oray return the host name error
304: oray update error
The 305: oray update timeout
The 306: oray unknown error
400:9299 success
The 401:9299 unknown error
The 402:9299 return ER (domain name has expired)
The 403:9299 return DA (domain name is not activated)
404:9299 return SNE (user or password error)
The 405:9299 return NE (domain name does not exist)
500: NOIP success
501: NOIP return NOHOST
502: NOIP return BADAUTH
503: NOIP return BADAGENT
504: NOIP return NOTDONATOR
505: NOIP return ABUSE
506: NOIP Back 911
507: NOIP unknown error
DDNS_TRIDRO_ERR_OK = 600
DDNS_TRIDRO_ERR_NOT100 = 601,
DDNS_TRIDRO_ERR_NOY = 602
DDNS_TRIDRO_ERR_TIMEOUT = 603
DDNS_TRIDRO_ERR_UNKNOWN = 604
DDNS_TRIDRO_NOERR = 605				// updating
#define DDNS_EASYN_OK 					700
#define DDNS_EASYN_NOAUTH 				701
#define DDNS_EASYN_NOID 				702
#define DDNS_EASYN_OVER 				703
#define DDNS_EASYN_ERR_IDDISABLE 		704
#define DDNS_EASYN_ERR_PARAM 			705
#define DDNS_EASYN_UNKNOWN_ERR 			706

tutk

#define STATUS_TUTK_P2P_NOACTION					 
	0
#define STATUS_TUTK_P2P_LOGGED_IN					
	1
#define STATUS_TUTK_P2P_LOGGING_IN					
	2
#define STATUS_TUTK_P2P_UNLICENSE                     
	-1 //The UID is not licensed or expired
#define STATUS_TUTK_P2P_NOT_INITIALIZED              
	-2  // The IOTC module is not initialized yet
#define STATUS_TUTK_P2P_LOGIN_ALREADY_CALLED         
	-3 //The device is already under login process currently
#define STATUS_TUTK_P2P_FAIL_CREATE_SOCKET            
	-4  // Fails to create sockets
#define STATUS_TUTK_P2P_FAIL_SOCKET_OPT               
	-5 //Fails to set up socket options
#define STATUS_TUTK_P2P_FAIL_SOCKET_BIND              
	-6 //Fails to bind sockets
#define STATUS_TUTK_P2P_FAIL_CREATE_THREAD            
	-7 // Fails to create threads
#define STATUS_TUTK_P2P_FAIL_RESOLVE_HOSTNAME         
	-8  //Cannot resolve masters host name
#define STATUS_TUTK_P2P_TCP_TRAVEL_FAILED              
	-9 //Cannot connect to masters in neither UDP nor TCP
#define STATUS_TUTK_P2P_TCP_CONNECT_TO_SERVER_FAILED  
	-10 //Cannot connect to IOTC servers in TCP
#define STATUS_TUTK_P2P_NO_TCP_SUPPORT                 
	-11 //The device does not support TCP relay
#define STATUS_TUTK_P2P_SERVER_NOT_RESPONSE            
	-12 //IOTC servers have no response
#define STATUS_TUTK_P2P_FAIL_GET_LOCAL_IP              
	-13 //Fails to get the devices local IP address
#define STATUS_TUTK_P2P_NETWORK_UNREACHABLE            
	-14  //Network is unreachable

skype only RC9264

#define STATUS_SKYPE_NOACTION					0
#define STATUS_SKYPE_LOGGED_IN					1
#define STATUS_SKYPE_LOGGING_IN					2
#define STATUS_SKYPE_LOGGING_OUT				3
#define STATUS_SKYPE_UNKNOWN_ERROR				-1
#define STATUS_SKYPE_HTTPS_PROXY_AUTH_FAILED 	-2 
#define STATUS_SKYPE_SOCKS_PROXY_AUTH_FAILED 	-3 
#define STATUS_SKYPE_P2P_CONNECT_FAILED 		-4 
#define STATUS_SKYPE_SERVER_CONNECT_FAILED 		-5 
#define STATUS_SKYPE_SERVER_OVERLOADED 			-6 
#define STATUS_SKYPE_DB_IN_USE 					-7 
#define STATUS_SKYPE_INVALID_SKYPENAME 			-8 
#define STATUS_SKYPE_INVALID_EMAIL 				-9 
#define STATUS_SKYPE_UNACCEPTABLE_PASSWORD 		-10 
#define STATUS_SKYPE_SKYPENAME_TAKEN 			-11 
#define STATUS_SKYPE_REJECTED_AS_UNDERAGE 		-12 
#define STATUS_SKYPE_NO_SUCH_IDENTITY 			-13 
#define STATUS_SKYPE_INCORRECT_PASSWORD 		-14 
#define STATUS_SKYPE_TOO_MANY_LOGIN_ATTEMPTS 	-15 
#define STATUS_SKYPE_PASSWORD_HAS_CHANGED 		-16 
#define STATUS_SKYPE_PERIODIC_UIC_UPDATE_FAILED -17 
#define STATUS_SKYPE_DB_DISK_FULL 				-18 
#define STATUS_SKYPE_DB_IO_ERROR 				-19 
#define STATUS_SKYPE_DB_CORRUPT 				-20 
#define STATUS_SKYPE_DB_FAILURE 				-21 
#define STATUS_SKYPE_INVALID_APP_ID 			-22 
#define STATUS_SKYPE_APP_ID_FAILURE 			-23 
#define STATUS_SKYPE_UNSUPPORTED_VERSION 		-24
#define STATUS_SKYPE_OFFLINE					-25

IP Camera the log classification:

Event ID

Event Description

Event Classification

0x00000

Device starts

System

0x00001

HTTPS error

System

0x00002

Disk space is full

System

0x00003

Disk error

System

0x10000

Authorized users to access

User

0x10001

Deny users access

User

0x10002

Visit reject Session

User

0x10003

Users to create Session

User

0x10004

The user end of the Session

User

0x10005

Session terminated by equipment

User

0x20000

Send mail to success

Mail

0x20001

Send e-mail failed: system error

Mail

0x20002

Failed to send a message: parameter error

Mail

0x20003

Send message failed: Can not connect to the server

Mail

0x20004

Send e-mail failure: STARTTLS failed

Mail

0x20005

Send e-mail fails: TLS fails

Mail

0x20006

Send message failed: server error

Mail

0x20007

Send mail failed: authentication method is not supported

Mail

0x20008

Send Mail failed: user authentication failed

Mail

0x20009

Send e-mail fails: the mail is rejected

Mail

0x30000

Alarm stop

Alarm

0x30001

Motion detection alarm

Alarm

0x30002

External alarm

Alarm

0x30003

Sound detection alarm

Alarm

0x30004

Alarm action fails

Alarm

Query the status of the IP Camera

Get_status.cgi

  • Permissions requirements:
No
  • Syntax:
/ Get_status.cgi [? User = & pwd = & session = & json = & jsonp_callback = & status = & ... & status =]
  • Parameters:
User / pwd: Parameter authentication method required to login username / password
session: Session authentication method required to Session ID
json / jsonp_callback: return the json type of data set
status: the name of the state need to query and return the corresponding variable name, in the form:
status_name = var_name
status_name to query the state name, var_name variable name corresponding return. If you want to check more than one state, set up a number, if not set in accordance with the default variable name, return the entire state.
  • Returns:
Returns need to query the status of the variable definition.
  • Example:
Http://192.168.0.188/get_status.cgi?session=1891048766&time=t&alarm=&upnp=u
IP Camera Back:
var t = 1309768553;
var alarm = 0;
var u = 1;

http://192.168.0.188/get_status.cgi?session=1891048766
IP Camera returns all of the state:
var time = 1309768641;
var alarm = 0;
var upnp = 1;
var ntp = 1;
var record = 0;
var disk = -1;
var ddns = 100;

Inquiries IP Camera log

Get_log

  • Permissions requirements:
Managers
  • Syntax:
/ Get_log.cgi [? User = & pwd = & session = & json = & jsonp_callback = & number = & t = & event = & event_user = & ip =]
  • Parameters:
User / pwd: Parameter authentication method required to login username / password
session: Session authentication method required to Session ID
json / jsonp_callback: return the json type of data set
t / event / event_user / ip / number: Note that the default variable name event_user corresponding user, that no incidental event_user parameters or set event_user is empty, the user name returned user returns the corresponding variable name set.
  • Returns:
Return js text:
t: an array of variables, the timing of the events
event: an array of variables, event ID
user: an array of variables, to produce the event access to the user, can be empty
ip: array variables, resulting in access to the IP address of the event can be empty
number: the number of variables in the array, the number of events
Otherwise, return the the log array of objects, the log objects include: t, event, user, ip
  • Example:
Http://192.168.0.188/get_logs.cgi?session=1891048766&t=time&number=n
IP Camera Back:
var event = new Array ();
var time = new Array ();
var user = new Array ();
var ip = new Array ();
event [0] = 65536;
time [0] = 1309775672;
user [0] = 'admin';
ip [0] = '192 .168.0.16 ';
event [1] = 65537;
time [1] = 1309775670;
user [1] ='';
ip [1] = '192 .168.0.16 ';
event [2] = 65536;
time [2] = 1309775651;
user [2] = 'admin';
ip [2] = '192 .168.0.16 ';
event [3] = 65536;
time [3] = 1309775631;
user [3] = 'admin';
ip [3] = '192 .168.0.16 ';
event [4] = 131072;
time [4] = 1309774476;
user [4] ='';
ip [4] ='';
event [5] = 131072;
time [5] = 1309774459;
user [5] ='';
ip [5] ='';
event [6] = 65539;
time [6] = 1309774435;
user [6] = 'admin';
ip [6] = '192 .168.0.16 ';
event [7] = 65536;
time [7] = 1309774435;
user [7] = 'admin';
ip [7] = '192 .168.0.16 ';
event [8] = 3;
time [8] = 24;
user [8] ='';
ip [8] ='';
var n = 9;
Copyright:Shenzhen Reecam Tech. Ltd.

ICP:粤ICP备09050685号 Technical support:800069965