From 72d9849dffd8b011b4c535ff8b2f4c3706fc15c3 Mon Sep 17 00:00:00 2001 From: jsetton Date: Mon, 11 Mar 2019 17:12:52 -0400 Subject: [PATCH] Added security panel controller schema capabilities and properties --- .../alexa_smart_home_message_schema.json | 286 +++++++++++++++++- 1 file changed, 283 insertions(+), 3 deletions(-) diff --git a/validation_schemas/alexa_smart_home_message_schema.json b/validation_schemas/alexa_smart_home_message_schema.json index f4a9dc7..5830559 100644 --- a/validation_schemas/alexa_smart_home_message_schema.json +++ b/validation_schemas/alexa_smart_home_message_schema.json @@ -30,6 +30,14 @@ "type": "string", "minLength": 1 }, + "armState": { + "enum": [ + "ARMED_AWAY", + "ARMED_STAY", + "ARMED_NIGHT", + "DISARMED" + ] + }, "temperature": { "type": "object", "required": [ @@ -2979,6 +2987,186 @@ } } } + }, + "SecurityPanelController": { + "alarmState": { + "property": { + "type": "object", + "required": [ + "namespace", + "name", + "value", + "timeOfSample", + "uncertaintyInMilliseconds" + ], + "additionalProperties": false, + "properties": { + "namespace": { + "enum": [ + "Alexa.SecurityPanelController" + ] + }, + "name": { + "enum": [ + "burglaryAlarm", + "fireAlarm", + "carbonMonoxideAlarm", + "waterAlarm" + ] + }, + "value": { + "enum": [ + "OK", + "ALARM" + ] + }, + "timeOfSample": { + "$ref": "#/definitions/common.properties/timestamp" + }, + "uncertaintyInMilliseconds": { + "$ref": "#/definitions/common.properties/uncertaintyInMilliseconds" + } + } + } + }, + "armState": { + "property": { + "type": "object", + "required": [ + "namespace", + "name", + "value", + "timeOfSample", + "uncertaintyInMilliseconds" + ], + "additionalProperties": false, + "properties": { + "namespace": { + "enum": [ + "Alexa.SecurityPanelController" + ] + }, + "name": { + "enum": [ + "armState" + ] + }, + "value": { + "$ref": "#/definitions/common.properties/armState" + }, + "timeOfSample": { + "$ref": "#/definitions/common.properties/timestamp" + }, + "uncertaintyInMilliseconds": { + "$ref": "#/definitions/common.properties/uncertaintyInMilliseconds" + } + } + } + }, + "capabilities": { + "type": "object", + "required": [ + "type", + "interface", + "version", + "configuration" + ], + "additionalProperties": false, + "properties": { + "type": { + "enum": [ + "AlexaInterface" + ] + }, + "interface": { + "enum": [ + "Alexa.SecurityPanelController" + ] + }, + "version": { + "$ref": "#/definitions/common.properties/version" + }, + "properties": { + "type": "object", + "required": [ + "supported", + "proactivelyReported", + "retrievable" + ], + "additionalProperties": false, + "properties": { + "supported": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "object", + "required": [ + "name" + ], + "additionalProperties": false, + "properties": { + "name": { + "enum": [ + "armState", + "burglaryAlarm", + "fireAlarm", + "carbonMonoxideAlarm", + "waterAlarm" + ] + } + } + } + }, + "proactivelyReported": { + "type": "boolean" + }, + "retrievable": { + "type": "boolean" + } + } + }, + "configuration": { + "type": "object", + "additionalProperties": false, + "properties": { + "supportedAuthorizationTypes": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "object", + "required": [ + "type" + ], + "additionalProperties": false, + "properties": { + "type": { + "enum": [ + "FOUR_DIGIT_PIN" + ] + } + } + } + }, + "supportedArmStates": { + "type": "array", + "uniqueItems": true, + "items": { + "type": "object", + "required": [ + "value" + ], + "additionalProperties": false, + "properties": { + "value": { + "$ref": "#/definitions/common.properties/armState" + } + } + } + } + } + } + } + } } }, "state.properties": { @@ -3052,6 +3240,12 @@ }, { "$ref": "#/definitions/common.properties/interfaces/ContactSensor/detectionState/property" + }, + { + "$ref": "#/definitions/common.properties/interfaces/SecurityPanelController/alarmState/property" + }, + { + "$ref": "#/definitions/common.properties/interfaces/SecurityPanelController/armState/property" } ] } @@ -3099,6 +3293,17 @@ "$ref": "#/definitions/common.properties/timestamp" } } + }, + "securityPanelArm": { + "type": "object", + "additionalProperties": false, + "properties": { + "exitDelayInSeconds": { + "type": "integer", + "minimum": 0, + "maximum": 255 + } + } } } }, @@ -3166,6 +3371,35 @@ } } }, + "header.SecurityPanelController": { + "type": "object", + "required": [ + "namespace", + "name", + "payloadVersion", + "messageId" + ], + "additionalProperties": false, + "properties": { + "namespace": { + "enum": [ + "Alexa.SecurityPanelController" + ] + }, + "name": { + "$ref": "#/definitions/ErrorResponse.properties/name" + }, + "payloadVersion": { + "$ref": "#/definitions/common.properties/payloadVersion" + }, + "messageId": { + "$ref": "#/definitions/common.properties/messageId" + }, + "correlationToken": { + "$ref": "#/definitions/common.properties/correlationToken" + } + } + }, "header.ColorTemperatureController": { "type": "object", "required": [ @@ -3393,6 +3627,28 @@ } } }, + "payload.SecurityPanelController.general": { + "type": "object", + "required": [ + "type" + ], + "additionalProperties": false, + "properties": { + "type": { + "enum": [ + "AUTHORIZATION_REQUIRED", + "BYPASS_NEEDED", + "NOT_READY", + "UNAUTHORIZED", + "UNCLEARED_ALARM", + "UNCLEARED_TROUBLE" + ] + }, + "message": { + "$ref": "#/definitions/common.properties/message" + } + } + }, "payload.ColorTemperatureController.NOT_SUPPORTED_IN_CURRENT_MODE": { "type": "object", "required": [ @@ -3423,7 +3679,8 @@ "StateReport", "ActivationStarted", "DeactivationStarted", - "AcceptGrant.Response" + "AcceptGrant.Response", + "Arm.Response" ] }, "with.payload": { @@ -3457,7 +3714,8 @@ "namespace": { "enum": [ "Alexa.CameraStreamController", - "Alexa.SceneController" + "Alexa.SceneController", + "Alexa.SecurityPanelController" ] }, "name": { @@ -3484,6 +3742,9 @@ }, { "$ref": "#/definitions/common.properties/payload/sceneActivationDeactivation" + }, + { + "$ref": "#/definitions/common.properties/payload/securityPanelArm" } ], "minProperties": 1 @@ -3523,7 +3784,8 @@ "namespace": { "enum": [ "Alexa", - "Alexa.Authorization" + "Alexa.Authorization", + "Alexa.SecurityPanelController" ] }, "name": { @@ -3694,6 +3956,20 @@ } } }, + { + "additionalProperties": false, + "properties": { + "header": { + "$ref": "#/definitions/ErrorResponse.properties/header.SecurityPanelController" + }, + "endpoint": { + "$ref": "#/definitions/common.properties/endpoint" + }, + "payload": { + "$ref": "#/definitions/ErrorResponse.properties/payload.SecurityPanelController.general" + } + } + }, { "additionalProperties": false, "properties": { @@ -3977,6 +4253,7 @@ "SMARTLOCK", "SCENE_TRIGGER", "ACTIVITY_TRIGGER", + "SECURITY_PANEL", "OTHER" ] } @@ -4077,6 +4354,9 @@ }, { "$ref": "#/definitions/common.properties/interfaces/MotionSensor/capabilities" + }, + { + "$ref": "#/definitions/common.properties/interfaces/SecurityPanelController/capabilities" } ] }