From 630dcf8a90559ff265dcfffd6c2f81c742161739 Mon Sep 17 00:00:00 2001 From: helviojr <30601040+helviojr@users.noreply.github.com> Date: Sun, 14 Jun 2020 02:05:16 -0300 Subject: [PATCH 1/3] WakeOnLANController Include WakeOnLANController and WakeUp event --- validation_schemas/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/validation_schemas/README.md b/validation_schemas/README.md index 6656aa5..bf38ee0 100644 --- a/validation_schemas/README.md +++ b/validation_schemas/README.md @@ -41,4 +41,5 @@ Alexa.Speaker Alexa.TemperatureSensor Alexa.ThermostatController Alexa.ToggleController +Alexa.WakeOnLANController ``` From 94719237a82b66393e8c040f7fc839a97c351455 Mon Sep 17 00:00:00 2001 From: helviojr <30601040+helviojr@users.noreply.github.com> Date: Sun, 14 Jun 2020 02:09:10 -0300 Subject: [PATCH 2/3] WakeOnLANController Include WakeOnLANController and WakeUp event --- .../alexa_smart_home_message_schema.json | 171 +++++++++++++++++- 1 file changed, 170 insertions(+), 1 deletion(-) diff --git a/validation_schemas/alexa_smart_home_message_schema.json b/validation_schemas/alexa_smart_home_message_schema.json index ac778b6..a81cf53 100644 --- a/validation_schemas/alexa_smart_home_message_schema.json +++ b/validation_schemas/alexa_smart_home_message_schema.json @@ -2196,6 +2196,95 @@ } ] }, + { + "type": "object", + "allOf": [ + { + "required": [ + "interface", + "type", + "version", + "configuration", + ], + "type": "object", + "properties": { + "type": { + "pattern": "^[ a-zA-Z0-9_\\-=#;:?@&]+$", + "type": "string" + }, + "interface": { + "type": "string" + }, + "version": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "configuration": { + "type": "object", + "required": [ + "MACAddresses", + ], + "additionalProperties": false, + "properties": { + "MACAddresses": { + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "pattern": "^[0-9A-Fa-f:]+$", + "type": "string" + } + } + } + }, + "properties": { + "type": "object", + "additionalProperties": false + } + } + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "AlexaInterface" + ] + }, + "interface": { + "type": "string", + "enum": [ + "Alexa.WakeOnLANController" + ] + }, + "version": { + "oneOf": [ + { + "type": "string", + "enum": [ + "3" + ] + }, + { + "type": "integer", + "format": "int32", + "enum": [ + 3 + ] + } + ] + } + } + } + ] + }, { "type": "object", "allOf": [ @@ -8284,6 +8373,86 @@ } } }, + { + "description": "A WakeUp event for Alexa event gateway", + "type": "object", + "required": [ + "event" + ], + "additionalProperties": false, + "properties": { + "context": { + "$ref": "#/definitions/common/model.Context" + }, + "event": { + "type": "object", + "required": [ + "header", + "endpoint", + "payload" + ], + "additionalProperties": false, + "properties": { + "header": { + "type": "object", + "required": [ + "namespace", + "name", + "payloadVersion", + "messageId", + "correlationalToken" + ], + "additionalProperties": false, + "properties": { + "namespace": { + "type": "string", + "enum": [ + "Alexa.WakeOnLANController" + ] + }, + "name": { + "type": "string", + "enum": [ + "WakeUp" + ] + }, + "payloadVersion": { + "$ref": "#/definitions/common/model.PayloadVersion" + }, + "messageId": { + "$ref": "#/definitions/common/model.MessageId" + }, + "correlationToken": { + "$ref": "#/definitions/common/model.CorrelationToken" + } + } + }, + "endpoint": { + "type": "object", + "required": [ + "scope", + "endpointId" + ], + "additionalProperties": false, + "properties": { + "scope": { + "$ref": "#/definitions/common/model.Scope" + }, + "endpointId": { + "$ref": "#/definitions/common/model.EndpointId" + } + } + }, + "payload": { + "type": "object", + "properties": { + }, + "additionalProperties": false + } + } + } + } + }, { "description": "A DeferredResponse message for Alexa", "type": "object", @@ -9160,4 +9329,4 @@ } } ] -} \ No newline at end of file +} From db52f548a13e818e685a1df56cb56a3081c650b9 Mon Sep 17 00:00:00 2001 From: helviojr <30601040+helviojr@users.noreply.github.com> Date: Sun, 14 Jun 2020 22:01:18 -0300 Subject: [PATCH 3/3] WakeOnLANController Creation of sample file --- .../PowerController.turnon.request.json | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 sample_messages/WakeOnLANController/PowerController.turnon.request.json diff --git a/sample_messages/WakeOnLANController/PowerController.turnon.request.json b/sample_messages/WakeOnLANController/PowerController.turnon.request.json new file mode 100644 index 0000000..ea356c9 --- /dev/null +++ b/sample_messages/WakeOnLANController/PowerController.turnon.request.json @@ -0,0 +1,20 @@ +{ + "directive": { + "header": { + "namespace": "Alexa.PowerController", + "name": "TurnOn", + "payloadVersion": "3", + "messageId": "1bd5d003-31b9-476f-ad03-71d471922820", + "correlationToken": "dFMb0z+PgpgdDmluhJ1LddFvSqZ/jCc8ptlAKulUj90jSqg==" + }, + "endpoint": { + "scope": { + "type": "BearerToken", + "token": "access-token-from-skill" + }, + "endpointId": "endpoint-001", + "cookie": {} + }, + "payload": {} + } +}