One other thing that I’ve noticed in the drivers, I don’t think there is any zwave control through the API, it appears to only be control of the alarm and status of the sensors. Part of the status of the sensors is to request information from the panel which could be used to dynamically build which sensors are on the device and what type of sensors they are, but I don’t see anything in the driver for anything zwave other than a category for a zwave siren.
Now that is not to say that Qolsys hasn’t put that functionality into their API, but the C4 driver doesn’t send any zwave device commands.
-Edit-
Good news guys, I was able to get the panel to accept commands an arm from the connection. I will post more information later.
I was able to send an action:info info_type: summary and got this back.
{“event”:“INFO”,“info_type”:“SUMMARY”,“partition_list”:[{“partition_id”:0,“name”:“partition1”,“status”:“DISARM”,“secure_arm”:false,“zone_list”:[{“id”:“A634A3”,“type”:“Door_Window”,“name”:“Front Door”,“group”:“entryexitdelay”,“status”:“Closed”,“state”:“0”,“zone_id”:1,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“83B7A6”,“type”:“Door_Window”,“name”:“Back Door”,“group”:“entryexitdelay”,“status”:“Closed”,“state”:“0”,“zone_id”:2,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“B4DDAE”,“type”:“Door_Window”,“name”:“Laundry Door”,“group”:“entryexitdelay”,“status”:“Closed”,“state”:“0”,“zone_id”:3,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“3B8FA1”,“type”:“Door_Window”,“name”:“Den Door”,“group”:“entryexitdelay”,“status”:“Closed”,“state”:“0”,“zone_id”:4,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“46A5A4”,“type”:“Door_Window”,“name”:“Dining Room Window 1”,“group”:“instantperimeter”,“status”:“Closed”,“state”:“0”,“zone_id”:5,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“07CBA9”,“type”:“Door_Window”,“name”:“Dining Room Window 2”,“group”:“instantperimeter”,“status”:“Closed”,“state”:“0”,“zone_id”:6,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“8CA8AD”,“type”:“Door_Window”,“name”:“Den Window 1”,“group”:“instantperimeter”,“status”:“Closed”,“state”:“0”,“zone_id”:7,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“B42BA0”,“type”:“Door_Window”,“name”:“Den Window 2”,“group”:“instantperimeter”,“status”:“Closed”,“state”:“0”,“zone_id”:8,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“4C25AA”,“type”:“Door_Window”,“name”:“Den Window 3”,“group”:“instantperimeter”,“status”:“Closed”,“state”:“0”,“zone_id”:9,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“A7F4AB”,“type”:“Door_Window”,“name”:“Kitchen Window”,“group”:“instantperimeter”,“status”:“Closed”,“state”:“0”,“zone_id”:10,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“87F7A0”,“type”:“Door_Window”,“name”:“Cooper’s Window”,“group”:“instantperimeter”,“status”:“Closed”,“state”:“0”,“zone_id”:11,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“00FFA1”,“type”:“Door_Window”,“name”:“Hannah’s Window 1”,“group”:“instantperimeter”,“status”:“Closed”,“state”:“0”,“zone_id”:12,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“8CBFA4”,“type”:“Door_Window”,“name”:“Hannah’s Window 2”,“group”:“instantperimeter”,“status”:“Closed”,“state”:“0”,“zone_id”:13,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“C72EAF”,“type”:“Door_Window”,“name”:“Master Bath Window”,“group”:“instantperimeter”,“status”:“Closed”,“state”:“0”,“zone_id”:14,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“09CCA8”,“type”:“Door_Window”,“name”:“Master Bedroom Window”,“group”:“instantperimeter”,“status”:“Closed”,“state”:“0”,“zone_id”:15,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“98B2AE”,“type”:“Door_Window”,“name”:“Living Room Window 1”,“group”:“instantperimeter”,“status”:“Closed”,“state”:“0”,“zone_id”:16,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“6FD5A8”,“type”:“Door_Window”,“name”:“Living Room Window 2”,“group”:“instantperimeter”,“status”:“Closed”,“state”:“0”,“zone_id”:17,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:1,“partition_id”:0},{“id”:“0”,“type”:“Bluetooth”,“name”:“Michael’s iPhone”,“group”:“mobileintrusion”,“status”:“Closed”,“state”:“0”,“zone_id”:18,“zone_physical_type”:1,“zone_alarm_type”:1,“zone_type”:115,“partition_id”:0},{“id”:“996B2C”,“type”:“SmokeDetector”,“name”:“Smoke Detector 1 Smoke D”,“group”:“smoke_heat”,“status”:“Closed”,“state”:“0”,“zone_id”:19,“zone_physical_type”:9,“zone_alarm_type”:9,“zone_type”:5,“partition_id”:0},{“id”:“BCA327”,“type”:“SmokeDetector”,“name”:“Smoke Detector 2 Smoke D”,“group”:“smoke_heat”,“status”:“Closed”,“state”:“0”,“zone_id”:20,“zone_physical_type”:9,“zone_alarm_type”:9,“zone_type”:5,“partition_id”:0},{“id”:“855122”,“type”:“SmokeDetector”,“name”:“Smoke Detector 3 Smoke D”,“group”:“smoke_heat”,“status”:“Closed”,“state”:“0”,“zone_id”:21,“zone_physical_type”:9,“zone_alarm_type”:9,“zone_type”:5,“partition_id”:0},{“id”:“SWG1”,“type”:“Panel Glass Break”,“name”:“Panel Glass Break”,“group”:“glassbreakawayonly”,“status”:“Closed”,“state”:“0”,“zone_id”:22,“zone_physical_type”:1,“zone_alarm_type”:0,“zone_type”:116,“partition_id”:0},{“id”:“0”,“type”:“Bluetooth”,“name”:“Heather’s iPhone”,“group”:“mobileintrusion”,“status”:“Closed”,“state”:“0”,“zone_id”:23,“zone_physical_type”:1,“zone_alarm_type”:1,“zone_type”:115,“partition_id”:0},{“id”:“SWPM1”,“type”:“Panel Motion”,“name”:“Panel Motion”,“group”:“safetymotion”,“status”:“Closed”,“state”:“0”,“zone_id”:25,“zone_physical_type”:1,“zone_alarm_type”:3,“zone_type”:2,“partition_id”:0}]}],“nonce”:"",“requestID”:“77677d4c-51c3-4433-83cf-d3c8e9b99ddb”}
—Edit—
First I used openssl s_client -host 192.168.7.1 -port 12345 as the command to open up the session. All of the same information that comes in on curl shows up in this command.
Next you need to get your token from your panel, and these are the JSON strings that are used.
{“partition_id”:0,“action”:“ARMING”,“arming_type”:“ARM_STAY”,“version”:0,“nonce”:"",“source”:“C4”,“version_key”:1,“source_key”:“C4”,“token”:""}
{“nonce”:"",“action”:“INFO”,“info_type”:“SUMMARY”,“version”:0,“source”:“C4”,“token”:""}
{“partition_id”:0,“action”:“ARMING”,“arming_type”:“ARM_AWAY”,“version”:0,“nonce”:"",“source”:“C4”,“version_key”:1,“source_key”:“C4”,“token”:""}
{“partition_id”:0,“action”:“ARMING”,“arming_type”:“DISARM”,“version”:0,“nonce”:"",“source”:“C4”,“version_key”:1,“source_key”:“C4”,“token”:""}
I’m fairly sure that “source” can be changed, I just kept it in there for simplicity for now.
There are also commands to send an alarm from the API and there might be other things but C4 doesn’t use them. Additionally here is some tables that were used that can also help out with things.
QolsysZoneTypes = {
UNKNOWN = 0,
CONTACT = 1,
MOTION = 2,
SOUND = 3 ,
BREAKAGE = 4,
SMOKE_HEAT = 5,
CARBON_MONOXIDE = 6,
RADON = 7,
TEMPERATURE = 8,
PANIC_BUTTON = 9,
CONTROL = 10,
CAMERA = 11,
LIGHT = 12,
GPS = 13,
SIREN = 14,
WATER = 15,
TILT = 16,
FREEZE = 17,
TAKEOVER_MODULE = 18,
GLASSBREAK = 19,
TRANSLATOR = 20,
MEDICAL_PENDANT = 21,
WATER_IQ_FLOOD = 22,
WATER_OTHER_FLOOD = 23,
IMAGE_SENSOR = 30,
WIRED_SENSOR = 100,
RF_SENSOR = 101,
KEYFOB = 102,
WALLFOB = 103,
RF_KEYPAD = 104,
PANEL = 105,
WTTS_OR_SECONDARY = 106,
SHOCK = 107,
SHOCK_SENSOR_MULTI_FUNCTION = 108,
DOOR_BELL = 109,
CONTACT_MULTI_FUNCTION = 110,
SMOKE_MULTI_FUNCTION = 111,
TEMPERATURE_MULTI_FUNCTION = 112,
SHOCK_OTHERS = 113,
OCCUPANCY_SENSOR = 114,
BLUETOOTH = 115,
PANEL_GLASS_BREAK = 116,
POWERG_SIREN = 117,
BLUETOOTH_SPEAKER = 118,
PANEL_MOTION = 119,
ZWAVE_SIREN = 120,
COUNT = 121 }
VERSION_KEY = ‘version’
SOURCE_KEY = ‘source’
PARTITION_KEY = ‘partition_id’
ACTION_KEY = ‘action’
ARMING_VAL = ‘ARMING’
INFO_VAL = ‘INFO’
INFO_TYPE_KEY = ‘info_type’
ZONE_EVENT_VAL = ‘ZONE_EVENT’
ARMING_TYPE_KEY = ‘arming_type’
ZONE_EVENT_TYPE_KEY = ‘zone_event_type’
DISARM_VAL = ‘DISARM’
ARM_AWAY_VAL = ‘ARM_AWAY’
ARM_STAY_VAL = ‘ARM_STAY’
SUMMARY_VAL = ‘SUMMARY’
PARTITION_LIST_KEY = ‘partition_list’
PARTITION_STATUS_KEY = ‘status’
SCOPE_KEY = ‘scope’
EVENT_KEY = ‘event’
ID_KEY = ‘id’
ZONE_KEY = ‘zone’
ZONE_ID_KEY = ‘zone_id’
ZONE_LIST_KEY = ‘zone_list’
ZONE_STATUS_KEY = ‘status’
ZONE_OPEN_VAL = ‘Open’
ZONE_CLOSED_VAL = ‘Closed’
ZONE_ACTIVE_VAL = ‘Active’
ZONE_ACTIVATED_VAL = ‘Activated’
ZONE_IDLE_VAL = ‘Idle’
ZONE_NORMAL_VAL = ‘Normal’
ZONE_NAME_KEY = ‘name’
ZONE_TYPE_KEY = ‘zone_type’
ALARM_VAL = ‘ALARM’
ALARM_TYPE_KEY = ‘alarm_type’
EXIT_DELAY_KEY = ‘exit_delay’
ENTRY_DELAY_KEY = ‘entry_delay’
DELAY_KEY = ‘delay’
USERCODE_KEY = ‘usercode’
FIRE_VAL = ‘FIRE’
POLICE_VAL = ‘POLICE’
AUX_VAL = ‘AUXILIARY’
TOKEN_KEY = ‘token’
ERROR_TYPE_KEY = ‘error_type’
NONCE_KEY = ‘nonce’
BYPASS_KEY = ‘bypass’
DESCRIPTION_KEY = ‘description’
CODE_REQUIRED = ‘code_required’
SECURE_ARM_KEY = ‘secure_arm’
VALUE_KEY = ‘value’