Thank you for your visit. This page is only available in English at this time.

Alexa.Cooking.TemperatureController Interface

Implement the Alexa.Cooking.TemperatureController capability interface so that users can control appliances that cook by appliance temperature, such as an oven or sous-vide. If you want users to control appliances that cook food items at specific food temperatures, use the FoodTemperatureController interface instead. Typically you use the TemperatureController interface in conjunction with the TemperatureSensor (optional) and Cooking (mandatory) interfaces. For more information about cooking skills, see Build Smart Home Skills for Cooking Appliances.

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

Utterances

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

Alexa, preheat the oven to 425 degrees Fahrenheit.
Alexa, cook chicken at 350 degrees in the oven.

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

Properties

The Alexa.Cooking.TemperatureController interface uses the targetCookingTemperature and preheatTimeInterval properties as the primary properties. The targetCookingTemperature property represents the temperature of a cooking appliance during a cooking session. The preheatTimeInterval property represents the time when preheating begins, and when it is expected to complete, expressed as a time interval.

Discovery

You describe endpoints that support Alexa.Cooking.TemperatureController using the standard discovery mechanism described in Alexa.Discovery.

Set retrievable to true for the properties that you report when Alexa sends your skill a state report request. Set proactivelyReported to true for the properties that you proactively report to Alexa in a change report.

For the full list of display categories, see display categories.

In addition to the usual discovery response fields, for TemperatureController, include a configuration object that contains the following fields.

Field Description Type Required
supportsRemoteStart True if Alexa can start the device after a customer's voice command. When false, Alexa sends the CookByTemperature directive to set the parameters for the cook session, and Alexa prompts the user to push start on the device. The default is false. Boolean No
supportedCookingModes The cooking modes that the device supports through this interface. Other cooking modes can be supported by the same appliance through other interfaces. An array of cookingMode values. Yes
supportedCookingTemperatureRange The range of temperatures that the device supports. The range is an object that contains a minimumValue and a maximumValue, each of which is a temperature object. If you specify this range in your configuration, Alexa validates the temperature that the user requests. If you don't specify this range, you must validate the temperature that the user requests in your skill. Object No

Discover response example

The following example shows a Discover.Response message for an oven that supports the TemperatureController, TemperatureSensor, and Cooking interfaces.

{
  "event": {
    "header": {
      "namespace": "Alexa.Discovery",
      "name": "Discover.Response",
      "payloadVersion": "3",
      "messageId": "<message id>"
    },
    "payload": {
      "endpoints": [
        {
          "endpointId": "<unique ID of the endpoint>",
          "manufacturerName": "<the manufacturer name of the endpoint>",
          "description": "<a description that is shown in the Alexa app>",
          "friendlyName": "Oven",
          "displayCategories": ["OVEN"],
          "cookie": {},
          "capabilities": [
            {
              "type": "AlexaInterface",
              "interface": "Alexa.Cooking.TemperatureController",
              "version": "3",
              "properties": {
                "supported": [
                  {
                    "name": "targetCookingTemperature"
                  },
                  {
                    "name": "preheatTimeInterval"
                  }
                ],
                "proactivelyReported": true,
                "retrievable": true
              },
              "configuration": {
                "supportsRemoteStart": false,
                "supportedCookingModes": [
                  "BAKE",
                  "ROAST"
                ],
                "supportedCookingTemperatureRange": {
                  "minimumValue": "80 °C",
                  "maximumValue": "250 °C"
                }
              }
            },
            {
              "type": "AlexaInterface",
              "interface": "Alexa.Cooking.TemperatureSensor",
              "version": "3",
              "properties": {
                "supported": [
                  {
                    "name": "cookingTemperature"
                  }
                ],
                "proactivelyReported": false,
                "retrievable": true
              }
            },
            {
              "type": "AlexaInterface",
              "interface": "Alexa.Cooking",
              "version": "3",
              "properties": {
                "supported": [
                  {
                    "name": "cookingMode"
                  },
                  {
                    "name": "foodItem"
                  },
                  {
                    "name": "cookingTimeInterval"
                  }
                ],
                "proactivelyReported": true,
                "retrievable": true
              },
              "configuration": {
                "supportsRemoteStart": false,
                "supportedCookingModes": ["REHEAT", "DEFROST", "OFF"]
              }
            },
            {
              "type": "AlexaInterface",
              "interface": "Alexa",
              "version": "3"
            }
          ]
        }
      ]
    }
  }
}

Directives

CookByTemperature directive

Support the CookByTemperature directive so that customers can start a cooking session and specify the cooking temperature.

The following examples show customer utterances:

Alexa, set oven to 350 degrees.
Alexa, preheat the oven to 425 degrees Fahrenheit.
Alexa, bake chicken at 375 degrees in the oven.

CookByTemperature directive payload details

Field Description Type
targetCookingTemperature The target temperature for the cooking session. This field is always included in the payload. A temperature object.
cookingMode The cooking mode for the cooking session, such as BROIL. This is only included if the user specifies it. If cookingMode is not present, choose the default cooking mode for the device, such as BAKE. A cookingMode object.
foodItem The food to cook. This field is only included if the user specifies it. A foodItem object.

CookByTemperature directive example

{
  "directive": {
    "header": {
      "namespace": "Alexa.Cooking.TemperatureController",
      "name": "CookByTemperature",
      "messageId": "<message id>",
      "correlationToken": "<an opaque correlation token>",
      "payloadVersion": "3"
    },
    "endpoint": {
      "scope": {
        "type": "BearerToken",
        "token": "<an OAuth2 bearer token>"
      },
      "endpointId": "<endpoint id>",
      "cookie": {}
    },
    "payload": {
      "targetCookingTemperature": {
          "value": 375,
          "scale": "FAHRENHEIT"
      },
      "cookingMode": {
        "BAKE"
      },
      "foodItem": {
          "foodName": "Chicken"
      }
    }
  }
}

CookByTemperature response event

If you handle a CookByTemperature directive successfully, respond with an Alexa.Response event. In the context object, include the values of all relevant properties.

CookByTemperature response event example

The following example shows a response to a CookByTemperature directive. The context contains the values of all properties relevant to the current cooking action, even though some of the properties are defined by other interfaces.

{
  "event": {
    "header": {
      "namespace": "Alexa",
      "name": "Response",
      "messageId": "<message id>",
      "correlationToken": "<an opaque correlation token>",
      "payloadVersion": "3"
    },
    "endpoint": {
      "endpointId": "<endpoint id>"
    },
    "payload": {}
  },
  "context": {
    "properties": [
      {
          "namespace": "Alexa.Cooking.TemperatureController",
          "name": "targetCookingTemperature",
          "value": {
              "value": 325,
              "scale": "FAHRENHEIT"
          },
          "timeOfSample": "2019-11-11T21:20:45Z",
          "uncertaintyInMilliseconds": 0
      },
      {
          "namespace": "Alexa.Cooking.TemperatureController",
          "name": "preheatTimeInterval",
          "value": {
            "start": "2019-11-11T20:30:00Z",
            "end": "2019-11-11T21:00:00Z"
          },
          "timeOfSample": "2019-11-11T21:20:45Z",
          "uncertaintyInMilliseconds": 0
      },
      {
        "namespace": "Alexa.Cooking.TemperatureSensor",
        "name": "cookingTemperature",
        "value": {
          "value": 325,
          "scale": "FAHRENHEIT"
        },
        "timeOfSample": "2019-11-11T21:20:45Z",
        "uncertaintyInMilliseconds": 0
      },
      {
         "namespace": "Alexa.Cooking",
         "name": "cookingMode",
         "value": "BAKE",
         "timeOfSample": "2019-11-11T21:20:45Z",
         "uncertaintyInMilliseconds": 0
      },
      {
         "namespace": "Alexa.Cooking",
         "name": "foodItem",
         "value":{
            "foodName": "Roast",
            "foodCategory": "MEAT",
            "foodQuantity":{
               "@type": "Weight",
               "value": "5.5",
               "unit": "POUND"
            }
         },
         "timeOfSample": "2019-11-11T21:20:45Z",
         "uncertaintyInMilliseconds": 0
      },
      {
          "namespace": "Alexa.Cooking",
          "name": "cookingTimeInterval",
          "value": {
              "start": "2019-11-11T21:00:00Z",
              "end": "2019-11-11T22:30:00Z"
          },
          "timeOfSample": "2019-11-11T21:20:45Z",
          "uncertaintyInMilliseconds": 0
      }
    ]
  }
}

CookByTemperature directive error handling

If you can't handle a CookByTemperature directive successfully, respond with an Alexa.Cooking.ErrorResponse event. You can also respond with a generic Alexa.ErrorResponse event if your error is generic, and not specific to cooking.

State reporting

Support the ReportState directive so that customers can ask about the temperature of their cooking appliance.

The following examples show customer utterances:

Alexa, what is the target temperature in my oven?
Alexa, what temperature is my oven set to?

Alexa sends a ReportState directive to request information about the state of an endpoint. When Alexa sends a ReportState directive, you send a StateReport event in response. The response contains the current state of all retrievable properties in the context object. You identify your retrievable properties in your discovery response. For more information about state reports, see Understand State Reporting.

StateReport response event example

{
  "event": {
    "header": {
      "namespace": "Alexa",
      "name": "StateReport",
      "messageId": "<message id>",
      "correlationToken": "<an opaque correlation token>",
      "payloadVersion": "3"
    },
    "endpoint": {
      "endpointId": "<endpoint id>"
    },
    "payload": {}
  },
  "context": {
    "properties": [
      {
          "namespace": "Alexa.Cooking.TemperatureController",
          "name": "targetCookingTemperature",
          "value": {
              "value": 325,
              "scale": "FAHRENHEIT"
          },
          "timeOfSample": "2019-11-11T21:20:45Z",
          "uncertaintyInMilliseconds": 0
      },
      {
          "namespace": "Alexa.Cooking.TemperatureController",
          "name": "preheatTimeInterval",
          "value": {
            "start": "2019-11-11T20:30:00Z",
            "end": "2019-11-11T21:00:00Z"
          },
          "timeOfSample": "2019-11-11T21:20:45Z",
          "uncertaintyInMilliseconds": 0
      },
      {
        "namespace": "Alexa.Cooking.TemperatureSensor",
        "name": "cookingTemperature",
        "value": {
          "value": 325,
          "scale": "FAHRENHEIT"
        },
        "timeOfSample": "2019-11-11T21:20:45Z",
        "uncertaintyInMilliseconds": 0
      },
      {
         "namespace": "Alexa.Cooking",
         "name": "cookingMode",
         "value": "BAKE",
         "timeOfSample": "2019-11-11T21:20:45Z",
         "uncertaintyInMilliseconds": 0
      },
      {
         "namespace": "Alexa.Cooking",
         "name": "foodItem",
         "value":{
            "foodName": "Roast",
            "foodCategory": "MEAT",
            "foodQuantity":{
               "@type": "Weight",
               "value": "5.5",
               "unit": "POUND"
            }
         },
         "timeOfSample": "2019-11-11T21:20:45Z",
         "uncertaintyInMilliseconds": 0
      },
      {
          "namespace": "Alexa.Cooking",
          "name": "cookingTimeInterval",
          "value": {
              "start": "2019-11-11T21:00:00Z",
              "end": "2019-11-11T22:30:00Z"
          },
          "timeOfSample": "2019-11-11T21:20:45Z",
          "uncertaintyInMilliseconds": 0
      }
    ]
  }
}

Change reporting

You send a ChangeReport event to proactively report changes in the state of an endpoint. You identify the properties that you proactively report in your discovery response. For more information about change reports, see Understand State Reporting.

ChangeReport event example

{  
  "event": {
    "header": {
      "namespace": "Alexa",
      "name": "ChangeReport",
      "messageId": "<message id>",
      "payloadVersion": "3"
    },
    "endpoint": {
      "scope": {
        "type": "BearerToken",
        "token": "<an OAuth2 bearer token>"
      },
      "endpointId": "<endpoint id>"
    },
    "payload": {
      "change": {
        "cause": {
          "type": "PERIODIC_POLL"
        },
        "properties": [
          {
              "namespace": "Alexa.Cooking.TemperatureController",
              "name": "targetCookingTemperature",
              "value": {
                  "value": 325,
                  "scale": "FAHRENHEIT"
              },
              "timeOfSample": "2019-11-11T21:20:45Z",
              "uncertaintyInMilliseconds": 0
          },
          {
              "namespace": "Alexa.Cooking.TemperatureController",
              "name": "preheatTimeInterval",
              "value": {
                "start": "2019-11-11T20:30:00Z",
                "end": "2019-11-11T21:00:00Z"
              },
              "timeOfSample": "2019-11-11T21:20:45Z",
              "uncertaintyInMilliseconds": 0
          },
          {
            "namespace": "Alexa.Cooking.TemperatureSensor",
            "name": "cookingTemperature",
            "value": {
              "value": 325,
              "scale": "FAHRENHEIT"
            },
            "timeOfSample": "2019-11-11T21:20:45Z",
            "uncertaintyInMilliseconds": 0
          },
          {
             "namespace": "Alexa.Cooking",
             "name": "cookingMode",
             "value": "BAKE",
             "timeOfSample": "2019-11-11T21:20:45Z",
             "uncertaintyInMilliseconds": 0
          },
          {
             "namespace": "Alexa.Cooking",
             "name": "foodItem",
             "value":{
                "foodName": "Roast",
                "foodCategory": "MEAT",
                "foodQuantity":{
                   "@type": "Weight",
                   "value": "5.5",
                   "unit": "POUND"
                }
             },
             "timeOfSample": "2019-11-11T21:20:45Z",
             "uncertaintyInMilliseconds": 0
          },
          {
              "namespace": "Alexa.Cooking",
              "name": "cookingTimeInterval",
              "value": {
                  "start": "2019-11-11T21:00:00Z",
                  "end": "2019-11-11T22:30:00Z"
              },
              "timeOfSample": "2019-11-11T21:20:45Z",
              "uncertaintyInMilliseconds": 0
          }
        ]
      }
    }
  },
  "context": {}
}

AddOrUpdateReport

You must proactively send an Alexa.Discovery.AddOrUpdateReport message if the feature support of your endpoint changes. For example, if the user changes the temperature scale from FAHRENHEIT to CELSIUS, or vice-versa, you must send an AddOrUpdateReport message. For more information, see AddOrUpdateReport event.

AddOrUpdateReport event example

{
  "event": {
    "header": {
      "namespace": "Alexa.Discovery",
      "name": "AddOrUpdateReport",
      "payloadVersion": "3",
      "messageId": "<message id>"
    },
    "payload": {
      "endpoints": [
        {
          "endpointId": "<unique ID of the endpoint>",
          "manufacturerName": "<the manufacturer name of the endpoint>",
          "description": "<a description that is shown in the Alexa app>",
          "friendlyName": "Oven",
          "displayCategories": ["OVEN"],
          "cookie": {},
          "capabilities": [
            {
              "type": "AlexaInterface",
              "interface": "Alexa.Cooking.TemperatureController",
              "version": "3",
              "properties": {
                "supported": [
                  {
                    "name": "targetCookingTemperature"
                  },
                  {
                    "name": "preheatTimeInterval"
                  }
                ],
                "proactivelyReported": true,
                "retrievable": true
              },
              "configuration": {
                "supportsRemoteStart": false,
                "supportedCookingModes": [
                  "BAKE",
                  "ROAST"
                ],
                "supportedCookingTemperatureRange": {
                  "minimumValue": "175 °F",
                  "maximumValue": "500 °F"
                }
              }
            },
            {
              "type": "AlexaInterface",
              "interface": "Alexa.Cooking.TemperatureSensor",
              "version": "3",
              "properties": {
                "supported": [
                  {
                    "name": "cookingTemperature"
                  }
                ],
                "proactivelyReported": false,
                "retrievable": true
              }
            },
            {
              "type": "AlexaInterface",
              "interface": "Alexa.Cooking",
              "version": "3",
              "properties": {
                "supported": [
                  {
                    "name": "cookingMode"
                  },
                  {
                    "name": "cookingTimeInterval"
                  },
                  {
                    "name": "foodItem"
                  }
                ],
                "proactivelyReported": true,
                "retrievable": true
              },
              "configuration": {
                "supportsRemoteStart": false,
                "supportedCookingModes": ["REHEAT", "DEFROST", "OFF"]
              }
            },
            {
              "type": "AlexaInterface",
              "interface": "Alexa",
              "version": "3"
            }
          ]
        }
      ]
    }
  }
}