User's Manual

92
Query/Control the peripheral components status (Operator,
combination CGI)
Notes: This combination CGI command will replace the separated peripheral control
CGIs.
Query the peripheral components status
Method: GET
URL:
http://<ip>/io/query_pc.cgi[?<parameter>[&<parameter>...]]
Input parameters:
None parameter provided, CGI responds all supported peripherals' status.
The peripheral parameter provided, CGI just responds the specific peripherals'
status. Please refer to the “Parameter Pairs Table” for specific input paramters.
Return:
HTTP/1.0 200 OK \r\n
content-type: text/plain\r\n
\r\n
<parameter pair>\r\n
<parameter pair>\r\n
......
Here are the details of parameter pairs, parameters depend on product models.
“error” value response indicate that “Failed to query/control the peripheral
equipments”
Parameter Pairs Table
Parameter Get/Set Value and description
privacy_button
Query
only
Privacy button status, valid values: [disabled|off|on]
pir
Query
only
PIR status, valid values: [disabled|actionless|active]
light_sensor
Query
only
Light sensor status, valid values: [disabled|night|day]
pt_position
Query
only
Query current Pan & Tilt position, because the MCU can’t get
response from PT, so the values maybe wrong under some
conditions. Format is “X,Y”
“X” is the Pan position; “Y” is the Tilt position.
input_1
input_2
Query
only
Input #1,#2 status, valid values: [high|low]
output_1
output_2
Get &
Set
Onput #1,#2 status,
Query format is “A,B”.
“A” valid values: [high|low]
“B” valid values: [pulse|static]
Control format is “A”.
“A” valid values: [high|low]