Alexa.TimeHoldController Interface
The Alexa.TimeHoldController describes messages used to control time-based holding/pausing on a variety of appliances.
For information about skills and additional interfaces related to cooking, see Build Smart Home Skills for Cooking Appliances.
Directives
The control and query directives in this interface are supported in skills that target the following language:
- English (US)
See Develop Smart Home Skills in Multiple Languages for more information.
Hold
A request to pause or hold an endpoint.
User: Alexa, pause the microwave
Example Request
{
"directive": {
"header": {
"namespace": "Alexa.TimeHoldController",
"name": "Hold",
"messageId": "5f8a426e-01e4-4cc9-8b79-65f8bd0fd8a4",
"correlationToken": "dFMb0z+PgpgdDmluhJ1LddFvSqZ/jCc8ptlAKulUj90jSqg==",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token":"access-token-from-skill"
},
"endpointId": "appliance-001",
"cookie": { }
},
"payload": { }
}
}
Payload details
| Field | Description | Type | Required |
|---|---|---|---|
| None | No required or optional fields in the payload. | N/A | N/A |
Resume
A request to resume the appliance and remove the hold state.
User: Alexa, restart the microwave
{
"directive": {
"header": {
"namespace": "Alexa.TimeHoldController",
"name": "Resume",
"messageId": "5f8a426e-01e4-4cc9-8b79-65f8bd0fd8a4",
"correlationToken": "dFMb0z+PgpgdDmluhJ1LddFvSqZ/jCc8ptlAKulUj90jSqg==",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "access-token-from-skill"
},
"endpointId": "appliance-001",
"cookie": { }
},
"payload": { }
}
}
Payload details
| Field | Description | Type | Required |
|---|---|---|---|
| None | No required or optional fields in the payload. | N/A | N/A |
Properties and Events
For this interface, you must reply:
- Synchronously, which means you send a Response to Alexa from the Lambda function.
When you send a Response, you should include the state the interface properties in the context of the message.
Properties
| Property Name | Description | Type |
|---|---|---|
| None | The Alexa.TimeHoldController interface does not define any reportable properties. |
Response
If the Hold or Resume directive were successfully handled, you must respond synchronously with a Response event. Report the value of all relevant properties in the context of the message.
Example Response
{
"context":{
"properties":[
{
"namespace":"Alexa.Cooking",
"name":"cookingMode",
"value":"TIMECOOK",
"timeOfSample":"2017-08-31T23:30:00Z",
"uncertaintyInMilliseconds":0
},
{
"namespace":"Alexa.Cooking",
"name":"foodItem",
"value":{
"foodName":"Copper river salmon",
"foodCategory":"FISH",
"foodQuantity":{
"@type":"WEIGHT",
"value":"2.5",
"unit":"POUND"
}
},
"timeOfSample":"2017-08-31T23:30:00Z",
"uncertaintyInMilliseconds":0
},
{
"namespace":"Alexa.Cooking.TimeController",
"name":"cookTime",
"value":"PT6M15S",
"timeOfSample":"2017-08-31T23:30:00Z",
"uncertaintyInMilliseconds":0
},
{
"namespace":"Alexa.Cooking.TimeController",
"name":"powerLevel",
"value":{
"@type":"EnumeratedPowerLevel",
"value":"HIGH"
},
"timeOfSample":"2017-08-31T23:30:00Z",
"uncertaintyInMilliseconds":0
}
]
},
"event":{
"header":{
"namespace":"Alexa",
"name":"Response",
"messageId":"5f8a426e-01e4-4cc9-8b79-65f8bd0fd8a4",
"correlationToken":"dFMb0z+PgpgdDmluhJ1LddFvSqZ/jCc8ptlAKulUj90jSqg==",
"payloadVersion":"3"
},
"endpoint":{
"scope":{
"type":"BearerToken",
"token":"Alexa-access-token"
},
"endpointId":"appliance-001"
},
"payload":{
}
}
}
ErrorResponse
You should reply with an error if you cannot complete the customer request for some reason. For cooking-specific errors such as an appliance door is open, see Alexa.Cooking.ErrorResponse. For generic errors, such as a device is offline, see Error.Response.
Related Interfaces
| Interface | Description |
|---|---|
| Alexa.Cooking | Provides directives for cooking when no preset option is available. |
| Alexa.Cooking.TimeController | Provides directives for cooking by time interval. |
| Alexa.Cooking.PresetController | Provides directives for cooking with appliance preset options. |