Smarthome Menu :: Alarm Server


param.cgi?cmd=getasattr

Get Alarmserver Configuration

  • as_server[1-3]: Address of the receiving Server (e.g. Home Automation Server) [IPv4 Address]
  • as_port[1-3]: Port of the receiving Server [1-65536]
  • as_ssl[1-3]: Use SSL encryption [0, 1]
  • as_insecure[1-3]: Don't verify SSL certificate [0, 1]
  • as_mode[1-3]: Mode GET, POST [0, 1]
  • as_auth[1-3]: Authentication required [0, 1]
  • as_username[1-3]: Alarmserver Username
  • as_password[1-3]: Alarmserver Password Note: The password can be SET but will not be returned in a GET request!
  • as_path[1-3]: URL Path
  • as_area[1-3]: Send Query when Motion (Alarm Areas) is Detected
  • as_io[1-3]: Send Query when Alarm Input is Triggered
  • as_audio[1-3]: Send Query when Audio Alarm is Triggered
  • as_areaio[1-3]: Send Query when Motion is Detected and Input is Triggered
  • as_activequery[1-3]: Append Alarm Trigger to Query
  • as_query(1-5)[1-3]: Activate Sending optional Parameter 1 - 5
  • as_queryattr(1-5)[1-3]: Query Parameter Attribute 1 - 5
  • as_queryval(1-5)[1-3]: Query Parameter Value 1 - 5
  • as_header(1-5)[1-3]: Activate optional Request Header 1 - 5
  • as_headerattr(1-5)[1-3]: Optional Request Header Attribute 1 - 5
  • as_headerval(1-5)[1-3]: Optional Request Header Value 1 - 5

Example

GET: http://admin:instar@192.168.2.168/param.cgi?cmd=getasattr

cmd="getasattr";
as_server[1]="192.168.2.112";
as_port[1]="1880";
as_ssl[1]="0";
as_mode[1]="0";
as_auth[1]="0";
as_username[1]="";
as_path[1]="/as-webhook";
as_area[1]="1";
as_io[1]="1";
as_audio[1]="1";
as_areaio[1]="1";
as_activequery[1]="1";
as_query1[1]="0";
as_queryattr1[1]="";
as_queryval1[1]="";
as_query2[1]="0";
as_queryattr2[1]="";
as_queryval2[1]="";
as_query3[1]="0";
as_queryattr3[1]="";
as_queryval3[1]="";
as_query4[1]="0";
as_queryattr4[1]="";
as_queryval4[1]="";
as_query5[1]="0";
as_queryattr5[1]="";
as_queryval5[1]="";
as_insecure[1]="0";
as_headerattr1[1]="X-Auth-User";
as_headerval1[1]="user";
as_header1[1]="1";
as_headerattr2[1]="X-Auth-Pass";
as_headerval2[1]="userpass";
as_header2[1]="1";
as_headerattr3[1]="";
as_headerval3[1]="";
as_header3[1]="0";
as_headerattr4[1]="";
as_headerval4[1]="";
as_header4[1]="0";
as_headerattr5[1]="";
as_headerval5[1]="";
as_header5[1]="0";
as_server[2]="";
as_port[2]="80";
as_ssl[2]="0";
as_mode[2]="0";
as_auth[2]="0";
as_username[2]="";
as_path[2]="/";
as_area[2]="1";
as_io[2]="1";
as_audio[2]="1";
as_areaio[2]="1";
as_activequery[2]="0";
as_query1[2]="0";
as_queryattr1[2]="";
as_queryval1[2]="";
as_query2[2]="0";
as_queryattr2[2]="";
as_queryval2[2]="";
as_query3[2]="0";
as_queryattr3[2]="";
as_queryval3[2]="";
as_query4[2]="0";
as_queryattr4[2]="";
as_queryval4[2]="";
as_query5[2]="0";
as_queryattr5[2]="";
as_queryval5[2]="";
as_insecure[2]="0";
as_headerattr1[2]="";
as_headerval1[2]="";
as_header1[2]="0";
as_headerattr2[2]="";
as_headerval2[2]="";
as_header2[2]="0";
as_headerattr3[2]="";
as_headerval3[2]="";
as_header3[2]="0";
as_headerattr4[2]="";
as_headerval4[2]="";
as_header4[2]="0";
as_headerattr5[2]="";
as_headerval5[2]="";
as_header5[2]="0";
as_server[3]="";
as_port[3]="80";
as_ssl[3]="0";
as_mode[3]="0";
as_auth[3]="0";
as_username[3]="";
as_path[3]="/";
as_area[3]="1";
as_io[3]="1";
as_audio[3]="1";
as_areaio[3]="1";
as_activequery[3]="0";
as_query1[3]="0";
as_queryattr1[3]="";
as_queryval1[3]="";
as_query2[3]="0";
as_queryattr2[3]="";
as_queryval2[3]="";
as_query3[3]="0";
as_queryattr3[3]="";
as_queryval3[3]="";
as_query4[3]="0";
as_queryattr4[3]="";
as_queryval4[3]="";
as_query5[3]="0";
as_queryattr5[3]="";
as_queryval5[3]="";
as_insecure[3]="0";
as_headerattr1[3]="";
as_headerval1[3]="";
as_header1[3]="0";
as_headerattr2[3]="";
as_headerval2[3]="";
as_header2[3]="0";
as_headerattr3[3]="";
as_headerval3[3]="";
as_header3[3]="0";
as_headerattr4[3]="";
as_headerval4[3]="";
as_header4[3]="0";
as_headerattr5[3]="";
as_headerval5[3]="";
as_header5[3]="0";
response="200";
GET: http://192.168.2.168/param.cgi?cmd=getasattr&as_index=1&user=admin&pwd=instar

cmd="getasattr";
as_server="192.168.2.112";
as_port="8000";
as_ssl="0";
as_mode="1";
as_auth="1";
as_username="notifier";
as_path="/test";
as_area="1";
as_io="1";
as_audio="1";
as_areaio="1";
as_activequery="1";
as_query1="0";
as_queryattr1="";
as_queryval1="";
as_query2="0";
as_queryattr2="";
as_queryval2="";
as_query3="0";
as_queryattr3="";
as_queryval3="";
as_query4="0";
as_queryattr4="";
as_queryval4="";
as_query5="0";
as_queryattr5="";
as_queryval5="";
as_insecure="0";
as_headerattr1="X-Title";
as_headerval1="Unauthorized access detected";
as_header1="1";
as_headerattr2="X-Tags";
as_headerval2="warning,skull";
as_header2="1";
as_headerattr3="X-Click";
as_headerval3="http://192.168.2.125/";
as_header3="1";
as_headerattr4="X-Icon";
as_headerval4="http://192.168.2.125/snap.cgi?chn=13&user=admin&pwd=instar";
as_header4="1";
as_headerattr5="X-Priority";
as_headerval5="5";
as_header5="1";
response="200";
SET: http://192.168.2.168/param.cgi?cmd=setasattr&as_index=1&as_server=192.168.1.114&as_port=80&as_path=/&as_queryattr1=command1&as_queryval1=false&as_queryattr2=command2&as_queryval2=true&as_activequery=0&as_auth=0&as_query1=1&as_query2=1&as_headerattr1=X-Title&as_headerval1=Unauthorized%20access%20detected&as_header2=1&as_headerattr2=X-Tags&as_headerval2=warning%2Cskull&as_header3=1&as_headerattr3=X-Click&as_headerval3=http://192.168.2.125/&as_header4=1&as_headerattr4=X-Icon&as_headerval4=http://192.168.2.125/snap.cgi%3Fchn=13%26user=admin%26pwd=instar&as_header5=1&as_headerattr5=X-Priority&as_headerval5=5

cmd="setasattr";
response="200";

param.cgi?cmd=getasaction

Get Alarmserver Actions

  • enable[1-3]: Enable Alarmserver [1, 0]
  • snap[1-3]: Enable snapshot attachment [1, 0]
  • interval[1-3]: Cooldown time between Requests [0, 600]

Example

GET: http://admin:instar@192.168.2.168/param.cgi?cmd=getasaction

cmd="getasaction";
enable[1]="0";
snap[1]="0";
interval[1]="35";
enable[2]="0";
snap[2]="0";
interval[2]="60";
enable[3]="0";
snap[3]="0";
interval[3]="60";
response="200";
GET: http://192.168.2.168/param.cgi?cmd=getasaction&server=1&user=admin&pwd=instar

cmd="getasaction";
enable="1";
interval="60";
snap="0";
response="200";
GET: http://admin:instar@192.168.2.168/param.cgi?cmd=setasaction&server=1&enable=1&interval=60

cmd="setasaction";
response="200";

param.cgi?cmd=testas

Test the Alarmserver

This command allows you to emit a alarmserver request as configured in the web user interface of your camera. You can add the trigger and detected object as URL queries:

Alarm Trigger

  • Alarm Area 1 triggered: &active=1
  • Alarm Area 2 triggered: &active=2
  • Alarm Area 3 triggered: &active=3
  • Alarm Area 4 triggered: &active=4
  • Alarm-In / PIR triggered: &active=5
  • Audio Alarm triggered: &active=6
  • PIR triggered & Alarm Area 1 triggered: &active=7
  • PIR triggered & Alarm Area 2 triggered: &active=8
  • PIR triggered & Alarm Area 3 triggered: &active=9
  • PIR triggered & Alarm Area 4 triggered: &active=10
  • Manual trigger (cmd=pushhostalarm): &active=99

Detected Object

  • Person: &object=1
  • Vehicles: &object=2
  • Person + Vehicles: &object=3
  • Animals: &object=4
  • Person + Animals: &object=5
  • Person + Vehicles: &object=6

Test Result

  • result:
    • 0: Success
    • -1: Can’t connect to Server
    • -2: Invalid credentials
    • -3: Permission error / Bad path
    • -4: Timeout
    • -5: Server cannot be verified
    • -6: Busy
    • -7: Internal error
    • -8: Unknown error
    • -9: Transfer incomplete

Beside the default response code this command can also return the code 210 which indicates that the alarmserver is disabled or 215 could not be triggered because something is blocking it. Is the Alarmserver suppressed for the trigger you are trying to use? See as_area, as_io, etc. above.

Example

GET: http://admin:instar@192.168.2.168/param.cgi?cmd=testas&index=1&active=3&object=1

cmd="testas";
result="0";
response="200";
GET: http://192.168.2.168/param.cgi?cmd=testas&index=1&active=1&object=2&user=admin&pwd=instar

cmd="testas";
response="215";