Grato por sua visita. Neste momento esta página está apenas disponível em inglês.

Alexa.TimeHoldController Interface

The Alexa.TimeHoldController describes messages used to control time-based holding/pausing on a variety of appliances. For information about cooking skills, see Build Smart Home Skills for Cooking Appliances.

For the list of locales that are supported for the TimeHoldController interface, see List of Capability Interfaces and Supported Locales.

Utterances

When you use the Alexa.TimeHoldController interface, the voice interaction model is already built for you. The following examples show some customer utterances:

Alexa, pause the microwave.
Alexa, restart the microwave.

After the customer says one of these utterances, Alexa sends a corresponding directive to your skill.

Directives

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 capability, 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 of the interface properties in the context of the message.

Properties

There are no reportable properties currently defined for this interface.

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.

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.