Skip to content

Commit 09fc4ca

Browse files
Merge branch 'master' into ALX316
2 parents d9f9880 + b205002 commit 09fc4ca

File tree

7 files changed

+61
-114
lines changed

7 files changed

+61
-114
lines changed

Diff for: .gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ endpoint-package.zip
33
skill-package.zip
44
sample_lambda/python/python.zip
55
__pycache__
6+
*.txt
7+
sample_lambda/python/alexa_smart_home_message_schema.json
8+
sample_lambda/python/lambda1.py

Diff for: sample_async/python/sample_async.py

+17-25
Original file line numberDiff line numberDiff line change
@@ -169,25 +169,17 @@ def main():
169169
alexa_params = {
170170
"context": {
171171
"properties": [{
172-
"namespace": "Alexa.BrightnessController",
173-
"name": "brightness",
174-
"value": 99,
175-
"timeOfSample": time_of_sample,
176-
"uncertaintyInMilliseconds": 500
177-
}, {
178-
"namespace": "Alexa.ColorController",
179-
"name": "color",
172+
"namespace": "Alexa.EndpointHealth",
173+
"name": "connectivity",
180174
"value": {
181-
"hue": 350.5,
182-
"saturation": 0.7138,
183-
"brightness": 0.6524
175+
"value": "OK"
184176
},
185177
"timeOfSample": time_of_sample,
186178
"uncertaintyInMilliseconds": 500
187179
}, {
188-
"namespace": "Alexa.ColorTemperatureController",
189-
"name": "colorTemperatureInKelvin",
190-
"value": 7500,
180+
"namespace": "Alexa.BrightnessController",
181+
"name": "brightness",
182+
"value": 99,
191183
"timeOfSample": time_of_sample,
192184
"uncertaintyInMilliseconds": 500
193185
}]
@@ -204,21 +196,21 @@ def main():
204196
"type": "BearerToken",
205197
"token": token
206198
},
207-
"endpointId": "appliance-002"
199+
"endpointId": "endpoint-002"
208200
},
209201
"payload": {
210202
"change": {
211203
"cause": {
212-
"type": "ALEXA_INTERACTION"
213-
}
214-
},
215-
"properties": [{
216-
"namespace": "Alexa.PowerController",
217-
"name": "powerState",
218-
"value": "ON",
219-
"timeOfSample": time_of_sample,
220-
"uncertaintyInMilliseconds": 500
221-
}]
204+
"type": "PHYSICAL_INTERACTION"
205+
},
206+
"properties": [{
207+
"namespace": "Alexa.PowerController",
208+
"name": "powerState",
209+
"value": "ON",
210+
"timeOfSample": time_of_sample,
211+
"uncertaintyInMilliseconds": 500
212+
}]
213+
}
222214
}
223215
}
224216
}

Diff for: sample_lambda/python/lambda.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# To simplify this sample Lambda, we omit validation of access tokens and retrieval of a specific
3838
# user's appliances. Instead, this array includes a variety of virtual appliances in v2 API syntax,
39-
# and will be used to demostrate transformation between v2 appliances and v3 endpoints.
39+
# and will be used to demonstrate transformation between v2 appliances and v3 endpoints.
4040
SAMPLE_APPLIANCES = [
4141
{
4242
"applianceId": "endpoint-001",

Diff for: sample_messages/StateReport/StateReport.json

+37-32
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,43 @@
11
{
22
"context": {
3-
"properties": [ {
4-
"namespace": "Alexa.EndpointHealth",
5-
"name": "connectivity",
6-
"value": {
7-
"state": "OK",
8-
"lastContact": "2017-09-18T17:56:54.00Z"
9-
}
10-
},
11-
{
12-
"name": "targetSetpoint",
13-
"namespace": "Alexa.ThermostatController",
14-
"timeOfSample": "2017-09-27T18:30:30.45Z",
15-
"uncertaintyInMilliseconds": 200,
16-
"value": {
17-
"scale": "CELSIUS",
18-
"value": 25
19-
}
20-
}, {
21-
"name": "thermostatMode",
22-
"namespace": "Alexa.ThermostatController",
23-
"timeOfSample": "2017-09-27T18:30:30.45Z",
24-
"uncertaintyInMilliseconds": 200,
25-
"value": "AUTO"
26-
}, {
27-
"name": "temperature",
28-
"namespace": "Alexa.TemperatureSensor",
29-
"timeOfSample": "2017-09-27T18:30:30.45Z",
30-
"uncertaintyInMilliseconds": 200,
31-
"value": {
32-
"scale": "CELSIUS",
33-
"value": 20
3+
"properties": [
4+
{
5+
"namespace": "Alexa.EndpointHealth",
6+
"name": "connectivity",
7+
"value": {
8+
"value": "OK"
9+
},
10+
"timeOfSample": "2017-09-27T18:30:30.45Z",
11+
"uncertaintyInMilliseconds": 200
12+
},
13+
{
14+
"name": "targetSetpoint",
15+
"namespace": "Alexa.ThermostatController",
16+
"value": {
17+
"scale": "CELSIUS",
18+
"value": 25
19+
},
20+
"timeOfSample": "2017-09-27T18:30:30.45Z",
21+
"uncertaintyInMilliseconds": 200
22+
},
23+
{
24+
"name": "thermostatMode",
25+
"namespace": "Alexa.ThermostatController",
26+
"value": "AUTO",
27+
"timeOfSample": "2017-09-27T18:30:30.45Z",
28+
"uncertaintyInMilliseconds": 200
29+
},
30+
{
31+
"name": "temperature",
32+
"namespace": "Alexa.TemperatureSensor",
33+
"value": {
34+
"scale": "CELSIUS",
35+
"value": 20
36+
},
37+
"timeOfSample": "2017-09-27T18:30:30.45Z",
38+
"uncertaintyInMilliseconds": 200
3439
}
35-
} ]
40+
]
3641
},
3742
"event": {
3843
"header": {

Diff for: sample_messages/ThermostatController/ErrorResponse.ThermostatController.TEMPERATURE_VALUE_OUT_OF_RANGE.json

-32
This file was deleted.

Diff for: sample_messages/ThermostatController/ThermostatController.SetThermostatMode.request.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
"cookie": {}
1717
},
1818
"payload": {
19-
"thermostatMode": "COOL"
19+
"thermostatMode": {
20+
"value": "COOL"
21+
}
2022
}
2123
}
2224
}

Diff for: validation_schemas/alexa_smart_home_message_schema.json

-23
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@
204204
"endpoint": {
205205
"type": "object",
206206
"required": [
207-
"scope",
208207
"endpointId"
209208
],
210209
"properties": {
@@ -1797,9 +1796,6 @@
17971796
},
17981797
"context": {
17991798
"type": "object",
1800-
"required": [
1801-
"properties"
1802-
],
18031799
"additionalProperties": false,
18041800
"properties": {
18051801
"properties": {
@@ -2059,11 +2055,6 @@
20592055
},
20602056
"message": {
20612057
"$ref": "#/definitions/common.properties/message"
2062-
},
2063-
"percentageState": {
2064-
"type": "integer",
2065-
"minimum": 0,
2066-
"maximum": 100
20672058
}
20682059
}
20692060
},
@@ -2415,20 +2406,6 @@
24152406
}
24162407
}
24172408
},
2418-
{
2419-
"additionalProperties": false,
2420-
"properties": {
2421-
"header": {
2422-
"$ref": "#/definitions/ErrorResponse.properties/header.ThermostatController"
2423-
},
2424-
"endpoint": {
2425-
"$ref": "#/definitions/common.properties/endpoint"
2426-
},
2427-
"payload": {
2428-
"$ref": "#/definitions/ErrorResponse.properties/payload.general.TEMPERATURE_VALUE_OUT_OF_RANGE"
2429-
}
2430-
}
2431-
},
24322409
{
24332410
"additionalProperties": false,
24342411
"properties": {

0 commit comments

Comments
 (0)