registry: Lock, Color, ColorTemperature, Percentage, PowerLevel, Contact, Motion, Humidity
Eight descriptors written from their pages, each with its version, the value of its property and the payload of every directive. Seven replace a stub; Alexa.HumiditySensor is new, as AlexaInterfaceType.HUMIDITY_SENSOR. LockController is deferrable: defer() on a lock logs no warning. A 1.x declaration of LockController, MotionSensor, PercentageController or PowerLevelController now lists its property in discovery, where 1.5.2 listed none: the zoo's lock, motion sensor and heater come out as the JSON Alexa accepted. A payload that does not fit (hue 361, 900 K) is answered with INVALID_VALUE. 48 examples of the eight pages are saved as fixtures. 191 tests pass, 168 before. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
feff828ec1
commit
af1489696d
111 changed files with 2971 additions and 45 deletions
46
test/fixtures/alexa-docs/alexa-colorcontroller/ChangeReport.json
vendored
Normal file
46
test/fixtures/alexa-docs/alexa-colorcontroller/ChangeReport.json
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "ChangeReport",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {
|
||||
"change": {
|
||||
"cause": {
|
||||
"type": "PHYSICAL_INTERACTION"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.ColorController",
|
||||
"name": "color",
|
||||
"value": {
|
||||
"hue": 280,
|
||||
"saturation": 0.9,
|
||||
"brightness": 0.9
|
||||
},
|
||||
"timeOfSample": "2024-02-03T16:17:00.00Z",
|
||||
"uncertaintyInMilliseconds": 500
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"context": {
|
||||
"namespace": "Alexa.EndpointHealth",
|
||||
"name": "connectivity",
|
||||
"value": {
|
||||
"value": "OK"
|
||||
},
|
||||
"timeOfSample": "2024-02-03T16:15:00.00Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
}
|
||||
26
test/fixtures/alexa-docs/alexa-colorcontroller/SetColor.directive.json
vendored
Normal file
26
test/fixtures/alexa-docs/alexa-colorcontroller/SetColor.directive.json
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"directive": {
|
||||
"header": {
|
||||
"namespace": "Alexa.ColorController",
|
||||
"name": "SetColor",
|
||||
"messageId": "Unique version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID",
|
||||
"cookie": {}
|
||||
},
|
||||
"payload": {
|
||||
"color": {
|
||||
"hue": 350.5,
|
||||
"saturation": 0.7138,
|
||||
"brightness": 0.6524
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
34
test/fixtures/alexa-docs/alexa-colorcontroller/SetColor.response.json
vendored
Normal file
34
test/fixtures/alexa-docs/alexa-colorcontroller/SetColor.response.json
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "Response",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.ColorController",
|
||||
"name": "color",
|
||||
"value": {
|
||||
"hue": 350.5,
|
||||
"saturation": 0.7138,
|
||||
"brightness": 0.6524
|
||||
},
|
||||
"timeOfSample": "2019-07-03T16:20:50Z",
|
||||
"uncertaintyInMilliseconds": 500
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
34
test/fixtures/alexa-docs/alexa-colorcontroller/StateReport.json
vendored
Normal file
34
test/fixtures/alexa-docs/alexa-colorcontroller/StateReport.json
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "StateReport",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.ColorController",
|
||||
"name": "color",
|
||||
"value": {
|
||||
"hue": 350.5,
|
||||
"saturation": 0.7138,
|
||||
"brightness": 0.6524
|
||||
},
|
||||
"timeOfSample": "2019-07-03T16:20:50Z",
|
||||
"uncertaintyInMilliseconds": 500
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
78
test/fixtures/alexa-docs/alexa-colorcontroller/discovery.json
vendored
Normal file
78
test/fixtures/alexa-docs/alexa-colorcontroller/discovery.json
vendored
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa.Discovery",
|
||||
"name": "Discover.Response",
|
||||
"payloadVersion": "3",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID"
|
||||
},
|
||||
"payload": {
|
||||
"endpoints": [
|
||||
{
|
||||
"endpointId": "Unique ID of the endpoint",
|
||||
"manufacturerName": "Manufacturer of the endpoint",
|
||||
"description": "Description to be shown in the Alexa app",
|
||||
"friendlyName": "Living Room light",
|
||||
"displayCategories": [
|
||||
"LIGHT"
|
||||
],
|
||||
"additionalAttributes": {
|
||||
"manufacturer": "Manufacturer of the endpoint",
|
||||
"model": "Model of the device",
|
||||
"customIdentifier": "Optional custom identifier for the device"
|
||||
},
|
||||
"cookie": {},
|
||||
"capabilities": [
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.PowerController",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "powerState"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.ColorController",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "color"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.EndpointHealth",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "connectivity"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa",
|
||||
"version": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
46
test/fixtures/alexa-docs/alexa-colortemperaturecontroller/ChangeReport.json
vendored
Normal file
46
test/fixtures/alexa-docs/alexa-colortemperaturecontroller/ChangeReport.json
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "ChangeReport",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {
|
||||
"change": {
|
||||
"cause": {
|
||||
"type": "PHYSICAL_INTERACTION"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.ColorTemperatureController",
|
||||
"name": "colorTemperatureInKelvin",
|
||||
"value": 4000,
|
||||
"timeOfSample": "2024-02-03T16:1519:20.00Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.EndpointHealth",
|
||||
"name": "connectivity",
|
||||
"value": {
|
||||
"value": "OK"
|
||||
},
|
||||
"timeOfSample": "2024-02-03T16:15:00.00Z",
|
||||
"uncertaintyInMilliseconds": 100
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"directive": {
|
||||
"header": {
|
||||
"namespace": "Alexa.ColorTemperatureController",
|
||||
"name": "DecreaseColorTemperature",
|
||||
"messageId": "Unique version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID",
|
||||
"cookie": {}
|
||||
},
|
||||
"payload": {}
|
||||
}
|
||||
}
|
||||
30
test/fixtures/alexa-docs/alexa-colortemperaturecontroller/DecreaseColorTemperature.response.json
vendored
Normal file
30
test/fixtures/alexa-docs/alexa-colortemperaturecontroller/DecreaseColorTemperature.response.json
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "Response",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.ColorTemperatureController",
|
||||
"name": "colorTemperatureInKelvin",
|
||||
"value": 2200,
|
||||
"timeOfSample": "2020-02-03T16:21:10.02Z",
|
||||
"uncertaintyInMilliseconds": 500
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"directive": {
|
||||
"header": {
|
||||
"namespace": "Alexa.ColorTemperatureController",
|
||||
"name": "IncreaseColorTemperature",
|
||||
"messageId": "Unique version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID",
|
||||
"cookie": {}
|
||||
},
|
||||
"payload": {}
|
||||
}
|
||||
}
|
||||
30
test/fixtures/alexa-docs/alexa-colortemperaturecontroller/IncreaseColorTemperature.response.json
vendored
Normal file
30
test/fixtures/alexa-docs/alexa-colortemperaturecontroller/IncreaseColorTemperature.response.json
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "Response",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.ColorTemperatureController",
|
||||
"name": "colorTemperatureInKelvin",
|
||||
"value": 7000,
|
||||
"timeOfSample": "2020-02-03T16:21:10.02Z",
|
||||
"uncertaintyInMilliseconds": 500
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
22
test/fixtures/alexa-docs/alexa-colortemperaturecontroller/SetColorTemperature.directive.json
vendored
Normal file
22
test/fixtures/alexa-docs/alexa-colortemperaturecontroller/SetColorTemperature.directive.json
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"directive": {
|
||||
"header": {
|
||||
"namespace": "Alexa.ColorTemperatureController",
|
||||
"name": "SetColorTemperature",
|
||||
"messageId": "Unique version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID",
|
||||
"cookie": {}
|
||||
},
|
||||
"payload": {
|
||||
"colorTemperatureInKelvin": 5500
|
||||
}
|
||||
}
|
||||
}
|
||||
39
test/fixtures/alexa-docs/alexa-colortemperaturecontroller/SetColorTemperature.response.json
vendored
Normal file
39
test/fixtures/alexa-docs/alexa-colortemperaturecontroller/SetColorTemperature.response.json
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "Response",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.ColorTemperatureController",
|
||||
"name": "colorTemperatureInKelvin",
|
||||
"value": 5500,
|
||||
"timeOfSample": "2020-02-03T16:21:10.02Z",
|
||||
"uncertaintyInMilliseconds": 500
|
||||
},
|
||||
{
|
||||
"namespace": "Alexa.EndpointHealth",
|
||||
"name": "connectivity",
|
||||
"value": {
|
||||
"value": "OK"
|
||||
},
|
||||
"timeOfSample": "2020-02-03T16:20:50Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
39
test/fixtures/alexa-docs/alexa-colortemperaturecontroller/StateReport.json
vendored
Normal file
39
test/fixtures/alexa-docs/alexa-colortemperaturecontroller/StateReport.json
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "StateReport",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.ColorTemperatureController",
|
||||
"name": "colorTemperatureInKelvin",
|
||||
"value": 2200,
|
||||
"timeOfSample": "2024-02-03T16:18:10.00Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
},
|
||||
{
|
||||
"namespace": "Alexa.EndpointHealth",
|
||||
"name": "connectivity",
|
||||
"value": {
|
||||
"value": "OK"
|
||||
},
|
||||
"timeOfSample": "2024-02-03T16:15:00.00Z",
|
||||
"uncertaintyInMilliseconds": 100
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
78
test/fixtures/alexa-docs/alexa-colortemperaturecontroller/discovery.json
vendored
Normal file
78
test/fixtures/alexa-docs/alexa-colortemperaturecontroller/discovery.json
vendored
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa.Discovery",
|
||||
"name": "Discover.Response",
|
||||
"payloadVersion": "3",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID"
|
||||
},
|
||||
"payload": {
|
||||
"endpoints": [
|
||||
{
|
||||
"endpointId": "Unique ID of the endpoint",
|
||||
"manufacturerName": "Manufacturer of the endpoint",
|
||||
"description": "Description to be shown in the Alexa app",
|
||||
"friendlyName": "Device name, displayed in the Alexa app",
|
||||
"displayCategories": [
|
||||
"LIGHT"
|
||||
],
|
||||
"additionalAttributes": {
|
||||
"manufacturer": "Manufacturer of the endpoint",
|
||||
"model": "Model of the device",
|
||||
"customIdentifier": "Optional custom identifier for the device"
|
||||
},
|
||||
"cookie": {},
|
||||
"capabilities": [
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.PowerController",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "powerState"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.ColorTemperatureController",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "colorTemperatureInKelvin"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.EndpointHealth",
|
||||
"version": "3.1",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "connectivity"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa",
|
||||
"version": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
46
test/fixtures/alexa-docs/alexa-contactsensor/ChangeReport.json
vendored
Normal file
46
test/fixtures/alexa-docs/alexa-contactsensor/ChangeReport.json
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "ChangeReport",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {
|
||||
"change": {
|
||||
"cause": {
|
||||
"type": "PHYSICAL_INTERACTION"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.ContactSensor",
|
||||
"name": "detectionState",
|
||||
"value": "DETECTED",
|
||||
"timeOfSample": "2018-02-03T16:20:50.52Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.EndpointHealth",
|
||||
"name": "connectivity",
|
||||
"value": {
|
||||
"value": "OK"
|
||||
},
|
||||
"timeOfSample": "2017-02-03T16:08:15.02Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
39
test/fixtures/alexa-docs/alexa-contactsensor/StateReport.json
vendored
Normal file
39
test/fixtures/alexa-docs/alexa-contactsensor/StateReport.json
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "StateReport",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.ContactSensor",
|
||||
"name": "detectionState",
|
||||
"value": "NOT_DETECTED",
|
||||
"timeOfSample": "2017-02-03T16:20:50.52Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
},
|
||||
{
|
||||
"namespace": "Alexa.EndpointHealth",
|
||||
"name": "connectivity",
|
||||
"value": {
|
||||
"value": "OK"
|
||||
},
|
||||
"timeOfSample": "2017-02-03T16:08:15.02Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
59
test/fixtures/alexa-docs/alexa-contactsensor/discovery.json
vendored
Normal file
59
test/fixtures/alexa-docs/alexa-contactsensor/discovery.json
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa.Discovery",
|
||||
"name": "Discover.Response",
|
||||
"payloadVersion": "3",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID"
|
||||
},
|
||||
"payload": {
|
||||
"endpoints": [
|
||||
{
|
||||
"endpointId": "Unique ID of the endpoint",
|
||||
"manufacturerName": "Manufacturer of the endpoint",
|
||||
"description": "Smart Sensor by Sensor Maker",
|
||||
"friendlyName": "Bedroom window",
|
||||
"displayCategories": [
|
||||
"CONTACT_SENSOR"
|
||||
],
|
||||
"cookie": {},
|
||||
"capabilities": [
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.ContactSensor",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "detectionState"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.EndpointHealth",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "connectivity"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa",
|
||||
"version": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
58
test/fixtures/alexa-docs/alexa-humiditysensor/ChangeReport.json
vendored
Normal file
58
test/fixtures/alexa-docs/alexa-humiditysensor/ChangeReport.json
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "ChangeReport",
|
||||
"messageId": "a unique identifier, preferably a version 4 UUID",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "an OAuth2 bearer token"
|
||||
},
|
||||
"endpointId": "endpoint ID"
|
||||
},
|
||||
"payload": {
|
||||
"change": {
|
||||
"cause": {
|
||||
"type": "PERIODIC_POLL"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.HumiditySensor",
|
||||
"name": "relativeHumidity",
|
||||
"value": {
|
||||
"value": 92.5
|
||||
},
|
||||
"timeOfSample": "2023-02-03T16:20:50.52Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.TemperatureSensor",
|
||||
"name": "temperature",
|
||||
"value": {
|
||||
"value": 19.9,
|
||||
"scale": "CELSIUS"
|
||||
},
|
||||
"timeOfSample": "2023-02-03T16:20:50.52Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
},
|
||||
{
|
||||
"namespace": "Alexa.EndpointHealth",
|
||||
"name": "connectivity",
|
||||
"value": {
|
||||
"value": "OK"
|
||||
},
|
||||
"timeOfSample": "2022-06-03T16:20:50Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
51
test/fixtures/alexa-docs/alexa-humiditysensor/StateReport.json
vendored
Normal file
51
test/fixtures/alexa-docs/alexa-humiditysensor/StateReport.json
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "StateReport",
|
||||
"messageId": "a unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "an opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "an OAuth2 bearer token"
|
||||
},
|
||||
"endpointId": "endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.HumiditySensor",
|
||||
"name": "relativeHumidity",
|
||||
"value": {
|
||||
"value": 89
|
||||
},
|
||||
"timeOfSample": "2023-02-03T16:20:50.52Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
},
|
||||
{
|
||||
"namespace": "Alexa.TemperatureSensor",
|
||||
"name": "temperature",
|
||||
"value": {
|
||||
"value": 19.9,
|
||||
"scale": "CELSIUS"
|
||||
},
|
||||
"timeOfSample": "2023-02-03T16:20:50.52Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
},
|
||||
{
|
||||
"namespace": "Alexa.EndpointHealth",
|
||||
"name": "connectivity",
|
||||
"value": {
|
||||
"value": "OK"
|
||||
},
|
||||
"timeOfSample": "2023-02-03T16:20:50Z",
|
||||
"uncertaintyInMilliseconds": 1000
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
80
test/fixtures/alexa-docs/alexa-humiditysensor/discovery.json
vendored
Normal file
80
test/fixtures/alexa-docs/alexa-humiditysensor/discovery.json
vendored
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa.Discovery",
|
||||
"name": "Discover.Response",
|
||||
"payloadVersion": "3",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID"
|
||||
},
|
||||
"payload": {
|
||||
"endpoints": [
|
||||
{
|
||||
"endpointId": "Unique ID of the endpoint",
|
||||
"manufacturerName": "Manufacturer name of the endpoint",
|
||||
"description": "Description to be shown in the Alexa app",
|
||||
"friendlyName": "Weather station",
|
||||
"displayCategories": [
|
||||
"TEMPERATURE_SENSOR"
|
||||
],
|
||||
"additionalAttributes": {
|
||||
"manufacturer": "Manufacturer name of the endpoint",
|
||||
"model": "Model of the device",
|
||||
"serialNumber": "Serial number of the device",
|
||||
"firmwareVersion": "Firmware version of the device",
|
||||
"softwareVersion": "Software version of the device",
|
||||
"customIdentifier": "Optional custom identifier for the device"
|
||||
},
|
||||
"capabilities": [
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.HumiditySensor",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "relativeHumidity"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.TemperatureSensor",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "temperature"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.EndpointHealth",
|
||||
"version": "3.2",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "connectivity"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa",
|
||||
"version": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
42
test/fixtures/alexa-docs/alexa-lockcontroller/ChangeReport.json
vendored
Normal file
42
test/fixtures/alexa-docs/alexa-lockcontroller/ChangeReport.json
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "ChangeReport",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {
|
||||
"change": {
|
||||
"cause": {
|
||||
"type": "PHYSICAL_INTERACTION"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.LockController",
|
||||
"name": "lockState",
|
||||
"value": "LOCKED",
|
||||
"timeOfSample": "2017-02-03T16:20:50Z",
|
||||
"uncertaintyInMilliseconds": 1000
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"context": {
|
||||
"namespace": "Alexa.EndpointHealth",
|
||||
"name": "connectivity",
|
||||
"value": {
|
||||
"value": "OK"
|
||||
},
|
||||
"timeOfSample": "2017-02-03T06:18:00Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
}
|
||||
14
test/fixtures/alexa-docs/alexa-lockcontroller/Lock-slow.deferred.json
vendored
Normal file
14
test/fixtures/alexa-docs/alexa-lockcontroller/Lock-slow.deferred.json
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "DeferredResponse",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"payload": {
|
||||
"estimatedDeferralInSeconds": 15
|
||||
}
|
||||
}
|
||||
}
|
||||
30
test/fixtures/alexa-docs/alexa-lockcontroller/Lock-slow.response.json
vendored
Normal file
30
test/fixtures/alexa-docs/alexa-lockcontroller/Lock-slow.response.json
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "Response",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.LockController",
|
||||
"name": "lockState",
|
||||
"value": "LOCKED",
|
||||
"timeOfSample": "2017-02-03T16:20:00.00Z",
|
||||
"uncertaintyInMilliseconds": 1000
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
20
test/fixtures/alexa-docs/alexa-lockcontroller/Lock.directive.json
vendored
Normal file
20
test/fixtures/alexa-docs/alexa-lockcontroller/Lock.directive.json
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"directive": {
|
||||
"header": {
|
||||
"namespace": "Alexa.LockController",
|
||||
"name": "Lock",
|
||||
"messageId": "Unique version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID",
|
||||
"cookie": {}
|
||||
},
|
||||
"payload": {}
|
||||
}
|
||||
}
|
||||
30
test/fixtures/alexa-docs/alexa-lockcontroller/Lock.response.json
vendored
Normal file
30
test/fixtures/alexa-docs/alexa-lockcontroller/Lock.response.json
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "Response",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.LockController",
|
||||
"name": "lockState",
|
||||
"value": "LOCKED",
|
||||
"timeOfSample": "2017-02-03T16:20:00.00Z",
|
||||
"uncertaintyInMilliseconds": 1000
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
30
test/fixtures/alexa-docs/alexa-lockcontroller/StateReport.json
vendored
Normal file
30
test/fixtures/alexa-docs/alexa-lockcontroller/StateReport.json
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "StateReport",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.LockController",
|
||||
"name": "lockState",
|
||||
"value": "JAMMED",
|
||||
"timeOfSample": "2017-02-03T16:20:00.00Z",
|
||||
"uncertaintyInMilliseconds": 1000
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
14
test/fixtures/alexa-docs/alexa-lockcontroller/Unlock-slow.deferred.json
vendored
Normal file
14
test/fixtures/alexa-docs/alexa-lockcontroller/Unlock-slow.deferred.json
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "DeferredResponse",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"payload": {
|
||||
"estimatedDeferralInSeconds": 20
|
||||
}
|
||||
}
|
||||
}
|
||||
30
test/fixtures/alexa-docs/alexa-lockcontroller/Unlock-slow.response.json
vendored
Normal file
30
test/fixtures/alexa-docs/alexa-lockcontroller/Unlock-slow.response.json
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "Response",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.LockController",
|
||||
"name": "lockState",
|
||||
"value": "UNLOCKED",
|
||||
"timeOfSample": "2017-02-03T16:20:00.00Z",
|
||||
"uncertaintyInMilliseconds": 1000
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
20
test/fixtures/alexa-docs/alexa-lockcontroller/Unlock.directive.json
vendored
Normal file
20
test/fixtures/alexa-docs/alexa-lockcontroller/Unlock.directive.json
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"directive": {
|
||||
"header": {
|
||||
"namespace": "Alexa.LockController",
|
||||
"name": "Unlock",
|
||||
"messageId": "Unique version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID",
|
||||
"cookie": {}
|
||||
},
|
||||
"payload": {}
|
||||
}
|
||||
}
|
||||
30
test/fixtures/alexa-docs/alexa-lockcontroller/Unlock.response.json
vendored
Normal file
30
test/fixtures/alexa-docs/alexa-lockcontroller/Unlock.response.json
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "Response",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.LockController",
|
||||
"name": "lockState",
|
||||
"value": "UNLOCKED",
|
||||
"timeOfSample": "2017-02-03T16:20:00.00Z",
|
||||
"uncertaintyInMilliseconds": 1000
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
59
test/fixtures/alexa-docs/alexa-lockcontroller/discovery.json
vendored
Normal file
59
test/fixtures/alexa-docs/alexa-lockcontroller/discovery.json
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa.Discovery",
|
||||
"name": "Discover.Response",
|
||||
"payloadVersion": "3",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID"
|
||||
},
|
||||
"payload": {
|
||||
"endpoints": [
|
||||
{
|
||||
"endpointId": "Unique ID of the endpoint",
|
||||
"manufacturerName": "Manufacturer of the endpoint",
|
||||
"description": "Description to be shown in the Alexa app",
|
||||
"friendlyName": "Your device name, displayed in the Alexa app, for example Front Door>",
|
||||
"displayCategories": [
|
||||
"SMARTLOCK"
|
||||
],
|
||||
"cookie": {},
|
||||
"capabilities": [
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.LockController",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "lockState"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.EndpointHealth",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "connectivity"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa",
|
||||
"version": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
46
test/fixtures/alexa-docs/alexa-motionsensor/ChangeReport.json
vendored
Normal file
46
test/fixtures/alexa-docs/alexa-motionsensor/ChangeReport.json
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "ChangeReport",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {
|
||||
"change": {
|
||||
"cause": {
|
||||
"type": "PHYSICAL_INTERACTION"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.MotionSensor",
|
||||
"name": "detectionState",
|
||||
"value": "DETECTED",
|
||||
"timeOfSample": "2024-07-03T10:20:50.52Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.EndpointHealth",
|
||||
"name": "connectivity",
|
||||
"value": {
|
||||
"value": "OK"
|
||||
},
|
||||
"timeOfSample": "2024-07-03T10:11:50.52Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
39
test/fixtures/alexa-docs/alexa-motionsensor/StateReport.json
vendored
Normal file
39
test/fixtures/alexa-docs/alexa-motionsensor/StateReport.json
vendored
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "StateReport",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.MotionSensor",
|
||||
"name": "detectionState",
|
||||
"value": "NOT_DETECTED",
|
||||
"timeOfSample": "2024-07-03T10:20:50.52Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
},
|
||||
{
|
||||
"namespace": "Alexa.EndpointHealth",
|
||||
"name": "connectivity",
|
||||
"value": {
|
||||
"value": "OK"
|
||||
},
|
||||
"timeOfSample": "2024-07-03T09:56:50.12Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
59
test/fixtures/alexa-docs/alexa-motionsensor/discovery.json
vendored
Normal file
59
test/fixtures/alexa-docs/alexa-motionsensor/discovery.json
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa.Discovery",
|
||||
"name": "Discover.Response",
|
||||
"payloadVersion": "3",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID"
|
||||
},
|
||||
"payload": {
|
||||
"endpoints": [
|
||||
{
|
||||
"endpointId": "Unique ID of the endpoint",
|
||||
"manufacturerName": "Manufacturer of the endpoint",
|
||||
"description": "Smart Sensor by Sensor Maker",
|
||||
"friendlyName": "Front door",
|
||||
"displayCategories": [
|
||||
"MOTION_SENSOR"
|
||||
],
|
||||
"cookie": {},
|
||||
"capabilities": [
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.MotionSensor",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "detectionState"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.EndpointHealth",
|
||||
"version": "3.1",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "connectivity"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa",
|
||||
"version": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
22
test/fixtures/alexa-docs/alexa-percentagecontroller/AdjustPercentage.directive.json
vendored
Normal file
22
test/fixtures/alexa-docs/alexa-percentagecontroller/AdjustPercentage.directive.json
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"directive": {
|
||||
"header": {
|
||||
"namespace": "Alexa.PercentageController",
|
||||
"name": "AdjustPercentage",
|
||||
"messageId": "Unique version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID",
|
||||
"cookie": {}
|
||||
},
|
||||
"payload": {
|
||||
"percentageDelta": -20
|
||||
}
|
||||
}
|
||||
}
|
||||
30
test/fixtures/alexa-docs/alexa-percentagecontroller/AdjustPercentage.response.json
vendored
Normal file
30
test/fixtures/alexa-docs/alexa-percentagecontroller/AdjustPercentage.response.json
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "Response",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.PercentageController",
|
||||
"name": "percentage",
|
||||
"value": 54,
|
||||
"timeOfSample": "2017-02-03T16:20:50.52Z",
|
||||
"uncertaintyInMilliseconds": 500
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
42
test/fixtures/alexa-docs/alexa-percentagecontroller/ChangeReport.json
vendored
Normal file
42
test/fixtures/alexa-docs/alexa-percentagecontroller/ChangeReport.json
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "ChangeReport",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {
|
||||
"change": {
|
||||
"cause": {
|
||||
"type": "PHYSICAL_INTERACTION"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.PercentageController",
|
||||
"name": "percentage",
|
||||
"value": 65,
|
||||
"timeOfSample": "2024-05-01T19:20:05.05Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"context": {
|
||||
"namespace": "Alexa.EndpointHealth",
|
||||
"name": "connectivity",
|
||||
"value": {
|
||||
"value": "OK"
|
||||
},
|
||||
"timeOfSample": "2024-05-01T19:10:22.05Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
}
|
||||
22
test/fixtures/alexa-docs/alexa-percentagecontroller/SetPercentage.directive.json
vendored
Normal file
22
test/fixtures/alexa-docs/alexa-percentagecontroller/SetPercentage.directive.json
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"directive": {
|
||||
"header": {
|
||||
"namespace": "Alexa.PercentageController",
|
||||
"name": "SetPercentage",
|
||||
"messageId": "Unique version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID",
|
||||
"cookie": {}
|
||||
},
|
||||
"payload": {
|
||||
"percentage": 74
|
||||
}
|
||||
}
|
||||
}
|
||||
30
test/fixtures/alexa-docs/alexa-percentagecontroller/SetPercentage.response.json
vendored
Normal file
30
test/fixtures/alexa-docs/alexa-percentagecontroller/SetPercentage.response.json
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "Response",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.PercentageController",
|
||||
"name": "percentage",
|
||||
"value": 74,
|
||||
"timeOfSample": "2017-02-03T16:20:50.52Z",
|
||||
"uncertaintyInMilliseconds": 500
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
30
test/fixtures/alexa-docs/alexa-percentagecontroller/StateReport.json
vendored
Normal file
30
test/fixtures/alexa-docs/alexa-percentagecontroller/StateReport.json
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "StateReport",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.PercentageController",
|
||||
"name": "percentage",
|
||||
"value": 30,
|
||||
"timeOfSample": "2017-02-03T16:20:50.52Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
64
test/fixtures/alexa-docs/alexa-percentagecontroller/discovery.json
vendored
Normal file
64
test/fixtures/alexa-docs/alexa-percentagecontroller/discovery.json
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa.Discovery",
|
||||
"name": "Discover.Response",
|
||||
"payloadVersion": "3",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID"
|
||||
},
|
||||
"payload": {
|
||||
"endpoints": [
|
||||
{
|
||||
"endpointId": "Unique ID of the endpoint",
|
||||
"manufacturerName": "Manufacturer of the endpoint",
|
||||
"description": "Description to be shown in the Alexa app",
|
||||
"friendlyName": "Device name, displayed in the Alexa app",
|
||||
"additionalAttributes": {
|
||||
"manufacturer": "Manufacturer of the endpoint",
|
||||
"model": "Model of the device",
|
||||
"customIdentifier": "Optional custom identifier for the device"
|
||||
},
|
||||
"displayCategories": [
|
||||
"OTHER"
|
||||
],
|
||||
"cookie": {},
|
||||
"capabilities": [
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.PercentageController",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "percentage"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.EndpointHealth",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "connectivity"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa",
|
||||
"version": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
22
test/fixtures/alexa-docs/alexa-powerlevelcontroller/AdjustPowerLevel.directive.json
vendored
Normal file
22
test/fixtures/alexa-docs/alexa-powerlevelcontroller/AdjustPowerLevel.directive.json
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"directive": {
|
||||
"header": {
|
||||
"namespace": "Alexa.PowerLevelController",
|
||||
"name": "AdjustPowerLevel",
|
||||
"messageId": "Unique version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID",
|
||||
"cookie": {}
|
||||
},
|
||||
"payload": {
|
||||
"powerLevelDelta": 12
|
||||
}
|
||||
}
|
||||
}
|
||||
30
test/fixtures/alexa-docs/alexa-powerlevelcontroller/AdjustPowerLevel.response.json
vendored
Normal file
30
test/fixtures/alexa-docs/alexa-powerlevelcontroller/AdjustPowerLevel.response.json
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "Response",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.PowerLevelController",
|
||||
"name": "powerLevel",
|
||||
"value": 52,
|
||||
"timeOfSample": "2017-02-03T16:20:50.52Z",
|
||||
"uncertaintyInMilliseconds": 500
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
42
test/fixtures/alexa-docs/alexa-powerlevelcontroller/ChangeReport.json
vendored
Normal file
42
test/fixtures/alexa-docs/alexa-powerlevelcontroller/ChangeReport.json
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "ChangeReport",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {
|
||||
"change": {
|
||||
"cause": {
|
||||
"type": "PHYSICAL_INTERACTION"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.PowerLevelController",
|
||||
"name": "powerLevel",
|
||||
"value": 75,
|
||||
"timeOfSample": "2024-05-01T09:32:05.05Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"context": {
|
||||
"namespace": "Alexa.EndpointHealth",
|
||||
"name": "connectivity",
|
||||
"value": {
|
||||
"value": "OK"
|
||||
},
|
||||
"timeOfSample": "2024-05-01T09:25:45.25Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
}
|
||||
22
test/fixtures/alexa-docs/alexa-powerlevelcontroller/SetPowerLevel.directive.json
vendored
Normal file
22
test/fixtures/alexa-docs/alexa-powerlevelcontroller/SetPowerLevel.directive.json
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"directive": {
|
||||
"header": {
|
||||
"namespace": "Alexa.PowerLevelController",
|
||||
"name": "SetPowerLevel",
|
||||
"messageId": "Unique version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID",
|
||||
"cookie": {}
|
||||
},
|
||||
"payload": {
|
||||
"powerLevel": 40
|
||||
}
|
||||
}
|
||||
}
|
||||
30
test/fixtures/alexa-docs/alexa-powerlevelcontroller/SetPowerLevel.response.json
vendored
Normal file
30
test/fixtures/alexa-docs/alexa-powerlevelcontroller/SetPowerLevel.response.json
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "Response",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.PowerLevelController",
|
||||
"name": "powerLevel",
|
||||
"value": 40,
|
||||
"timeOfSample": "2017-02-03T16:20:50.52Z",
|
||||
"uncertaintyInMilliseconds": 500
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
30
test/fixtures/alexa-docs/alexa-powerlevelcontroller/StateReport.json
vendored
Normal file
30
test/fixtures/alexa-docs/alexa-powerlevelcontroller/StateReport.json
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa",
|
||||
"name": "StateReport",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID",
|
||||
"correlationToken": "Opaque correlation token that matches the request",
|
||||
"payloadVersion": "3"
|
||||
},
|
||||
"endpoint": {
|
||||
"scope": {
|
||||
"type": "BearerToken",
|
||||
"token": "OAuth2.0 bearer token"
|
||||
},
|
||||
"endpointId": "Endpoint ID"
|
||||
},
|
||||
"payload": {}
|
||||
},
|
||||
"context": {
|
||||
"properties": [
|
||||
{
|
||||
"namespace": "Alexa.PowerLevelController",
|
||||
"name": "powerLevel",
|
||||
"value": 52,
|
||||
"timeOfSample": "2017-02-03T16:20:50.52Z",
|
||||
"uncertaintyInMilliseconds": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
81
test/fixtures/alexa-docs/alexa-powerlevelcontroller/discovery.json
vendored
Normal file
81
test/fixtures/alexa-docs/alexa-powerlevelcontroller/discovery.json
vendored
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
"event": {
|
||||
"header": {
|
||||
"namespace": "Alexa.Discovery",
|
||||
"name": "Discover.Response",
|
||||
"payloadVersion": "3",
|
||||
"messageId": "Unique identifier, preferably a version 4 UUID"
|
||||
},
|
||||
"payload": {
|
||||
"endpoints": [
|
||||
{
|
||||
"endpointId": "Unique ID of the endpoint",
|
||||
"manufacturerName": "Manufacturer of the endpoint",
|
||||
"description": "Description to be shown in the Alexa app",
|
||||
"friendlyName": "Living Room Light",
|
||||
"displayCategories": [
|
||||
"LIGHT"
|
||||
],
|
||||
"additionalAttributes": {
|
||||
"manufacturer": "Manufacturer of the endpoint",
|
||||
"model": "Model of the device",
|
||||
"serialNumber": "Serial number of the device",
|
||||
"firmwareVersion": "Firmware version of the device",
|
||||
"softwareVersion": "Software version of the device",
|
||||
"customIdentifier": "Optional custom identifier for the device"
|
||||
},
|
||||
"cookie": {},
|
||||
"capabilities": [
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.PowerLevelController",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "powerLevel"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.ColorController",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "color"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa.EndpointHealth",
|
||||
"version": "3",
|
||||
"properties": {
|
||||
"supported": [
|
||||
{
|
||||
"name": "connectivity"
|
||||
}
|
||||
],
|
||||
"proactivelyReported": true,
|
||||
"retrievable": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "AlexaInterface",
|
||||
"interface": "Alexa",
|
||||
"version": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
58
test/fixtures/interfaces.js
vendored
58
test/fixtures/interfaces.js
vendored
|
|
@ -9,20 +9,74 @@
|
|||
// page of the interface. The pages of RangeController and ModeController fold their discovery
|
||||
// examples away, so they were not saved: the range is taken from an example of the ToggleController
|
||||
// page, and ModeController has none.
|
||||
// refused [[directive, payload, message]]: a payload the directive does not take, and the message of the
|
||||
// INVALID_VALUE that answers it
|
||||
// unfit [[property, value]]: a value the property does not take
|
||||
//
|
||||
// test/registry/descriptors.test.js and test/device/discovery.test.js run the entries. The first one fails for a
|
||||
// descriptor of tier 1 or 2 that has no entry.
|
||||
// test/registry/descriptors.test.js, test/device/discovery.test.js and test/dispatch/interfaces.test.js run the
|
||||
// entries. The first one fails for a descriptor of tier 1 or 2 that has no entry.
|
||||
const { asset, semantics, text } = require("alex2node");
|
||||
|
||||
const reported = { retrievable: true, proactivelyReported: true };
|
||||
const declared = [{ options: reported, example: "discovery" }];
|
||||
const inThreeLanguages = (english, spanish, french) => [text(english, "en-US"), text(spanish, "es-MX"), text(french, "fr-CA")];
|
||||
|
||||
module.exports = [
|
||||
{ namespace: "Alexa", page: "alexa-interface", declared: [{ options: {}, example: "discovery" }] },
|
||||
{ namespace: "Alexa.BrightnessController", page: "alexa-brightnesscontroller", declared: [{ options: reported, example: "discovery" }] },
|
||||
{
|
||||
namespace: "Alexa.ColorController",
|
||||
page: "alexa-colorcontroller",
|
||||
declared,
|
||||
refused: [
|
||||
["SetColor", { color: { hue: 361, saturation: 1, brightness: 1 } }, "payload.color.hue: expected a number from 0 to 360, got 361"],
|
||||
["SetColor", { color: "red" }, 'payload.color: expected an object with hue, saturation, brightness, got "red"'],
|
||||
],
|
||||
unfit: [["color", { hue: 120, saturation: 50, brightness: 1 }], ["color", { hue: 120, saturation: 1 }]],
|
||||
},
|
||||
{
|
||||
namespace: "Alexa.ColorTemperatureController",
|
||||
page: "alexa-colortemperaturecontroller",
|
||||
declared,
|
||||
refused: [
|
||||
["SetColorTemperature", { colorTemperatureInKelvin: 900 }, "payload.colorTemperatureInKelvin: expected an integer from 1000 to 10000, got 900"],
|
||||
["IncreaseColorTemperature", "a lot", 'payload: expected an object, got "a lot"'],
|
||||
],
|
||||
unfit: [["colorTemperatureInKelvin", 10001], ["colorTemperatureInKelvin", "warm"]],
|
||||
},
|
||||
{ namespace: "Alexa.ContactSensor", page: "alexa-contactsensor", declared, unfit: [["detectionState", "OPEN"], ["detectionState", true]] },
|
||||
{ namespace: "Alexa.EndpointHealth", page: "alexa-endpointhealth", declared: [{ options: reported, example: "discovery" }] },
|
||||
{ namespace: "Alexa.HumiditySensor", page: "alexa-humiditysensor", declared, unfit: [["relativeHumidity", 45], ["relativeHumidity", { value: 101 }]] },
|
||||
{
|
||||
namespace: "Alexa.LockController",
|
||||
page: "alexa-lockcontroller",
|
||||
declared,
|
||||
refused: [["Lock", "now", 'payload: expected an object, got "now"']],
|
||||
unfit: [["lockState", "OPEN"], ["lockState", "locked"]],
|
||||
},
|
||||
{ namespace: "Alexa.ModeController", page: "alexa-modecontroller", declared: [] },
|
||||
{ namespace: "Alexa.MotionSensor", page: "alexa-motionsensor", declared, unfit: [["detectionState", "MOTION"], ["detectionState", 1]] },
|
||||
{
|
||||
namespace: "Alexa.PercentageController",
|
||||
page: "alexa-percentagecontroller",
|
||||
declared,
|
||||
refused: [
|
||||
["SetPercentage", { percentage: 101 }, "payload.percentage: expected an integer from 0 to 100, got 101"],
|
||||
["AdjustPercentage", { percentageDelta: 0.5 }, "payload.percentageDelta: expected an integer from -100 to 100, got 0.5"],
|
||||
],
|
||||
unfit: [["percentage", -1], ["percentage", 50.5]],
|
||||
},
|
||||
{ namespace: "Alexa.PowerController", page: "alexa-powercontroller", declared: [{ options: reported, example: "discovery" }] },
|
||||
{
|
||||
namespace: "Alexa.PowerLevelController",
|
||||
page: "alexa-powerlevelcontroller",
|
||||
declared,
|
||||
refused: [
|
||||
["SetPowerLevel", { powerLevel: "half" }, 'payload.powerLevel: expected an integer from 0 to 100, got "half"'],
|
||||
["AdjustPowerLevel", {}, "payload.powerLevelDelta: expected an integer from -100 to 100, got nothing"],
|
||||
],
|
||||
unfit: [["powerLevel", 101], ["powerLevel", null]],
|
||||
},
|
||||
{
|
||||
namespace: "Alexa.RangeController",
|
||||
page: "alexa-rangecontroller",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue