Get Password:
GET http://ip:port/json.htm?type=settings
JSON: "SecPassword" : (for example) "2adcefe38fbcd3dcd45908fbab1bf628",
ARM HOME:
GET http://ip:port/json.htm?type=command¶m=setsecstatus&secstatus=1&seccode=2adcefe38fbcd3dcd45908fbab1bf628
ARM AWAY:
http://ip:port/json.htm?type=command¶m=setsecstatus&secstatus=2&seccode=2adcefe38fbcd3dcd45908fbab1bf628
DISARM:
http://ip:port/json.htm?type=command¶m=setsecstatus&secstatus=0&seccode=2adcefe38fbcd3dcd45908fbab1bf628
GET STATUS
GET http://ip:port/json.htm?type=command¶m=getsecstatus
Code: Select all
Example Switch Device JSON:
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 100,
"CustomImage" : 0,
"Data" : "Normal",
"Description" : "",
"Favorite" : 0,
"HardwareID" : 1000,
"HardwareName" : "Unknown?",
"HardwareType" : "Unknown?",
"HardwareTypeVal" : 0,
"HaveDimmer" : false,
"HaveGroupCmd" : false,
"HaveTimeout" : false,
"ID" : "148702",
"LastUpdate" : "2015-10-26 19:42:41",
"MaxDimLevel" : 0,
"Name" : "Security panel",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : 6,
"Status" : "Normal",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "Security Panel",
"SwitchType" : "Security",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "Security",
"TypeImg" : "security",
"Unit" : 0,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "65"
}
SecPassword is MD5 encrypted, so the pin in your app should also be encrypted before validation.
If you arm, check if the settings contain a delay counter..
To add a security panel to your switches, specify a PIN in the settings, and ARM the security panel.
It's now visible under devices, and you can add the switch.