Smart Home Cook Trait Schema

action.devices.traits.Cook - This trait belongs to devices that can cook food according to various food presets and supported cooking modes. Examples of these device types include Multicooker, pressure cookers, blenders, and bread makers. Cook commands may include the quantity and name of the food, such as "Two cups of brown rice", where "brown rice" is a food preset for the device.

This trait does not handle cooking time or cooking temperature. See Timer and TemperatureControl for more information.

Device ATTRIBUTES

Attribute Definition
supportedCookingModes Array of strings. Required. Contains all of the cooking modes supported by this device. Currently, you must use the modes listed in the section Supported cooking modes.
foodPresets Array of objects. Optional. Contains presets for certain types of food.
  • food_preset_name String. Required. Internal name of the food preset, which will be used in commands and states. This can be non-user-friendly, and is shared across all languages.
  • supported_units Array of strings. Required (to avoid sending commands for items like "3 gallons of chicken"). Contains all of the units supported by the device for a specific food. For example, coffee might have CUPS and OUNCES (for example, Brew two cups of coffee or Make 16 ounces of coffee) while roti might have NO_UNITS (for example, Bake 10 roti). Currently, you must use the units listed in the section Supported units.
  • food_synonyms Array of objects. Required. Contains food name synonyms for the preset in each supported language:
    • synonym Array of strings. Synonyms for the preset should include both singular and plural forms (for example, "sugar cookie" and "sugar cookies"), if applicable.
    • lang String. Supported language for the synonym names (see Supported Languages/Language Codes).
The following is an example:
{
  "supportedCookingModes": ["COOK", "BAKE"],
  "foodPresets": [{
      "food_preset_name": "chocolate chip cookie",
      "supported_units": ["NO_UNITS"],
      "food_synonyms": [{
        "synonym": ["chocolate chip cookie", "chocolate chip cookies"],
        "lang": "en"
      }]
    },
    {
      "food_preset_name": "sugar cookie",
      "supported_units": ["NO_UNITS"],
      "food_synonyms": [{
        "synonym": ["sugar cookie", "sugar cookies"],
        "language": "en"
      }]
    }
  ]
}

Sample SYNC Request and Response

This is an example using the device type and traits above. It is intended to give an idea of how to build a SYNC response. If you add or remove traits, this will need to be modified to reflect those changes.

Request
{
    "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
    "inputs": [{
      "intent": "action.devices.SYNC"
    }]
}
Node.js
'use strict';

const {smarthome} = require('actions-on-google');
const functions = require('firebase-functions');

const app = smarthome();

app.onSync((body, headers) => {
  return {
    requestId: body.requestId,
    payload: {
      agentUserId: '1836.15267389',
      devices: [{
        id: '123',
        type: 'action.devices.types.MICROWAVE',
        traits: [
          'action.devices.traits.Cook'
        ],
        name: {
          defaultNames: ['Apartment Deluxe Microwave'],
          name: 'Microwave',
          nicknames: ['Microwave']
        },
        willReportState: true,
        attributes: {
          supportedCookingModes: ['DEFROST', 'MICROWAVE', 'WARM'],
          foodPresets: [{
            food_preset_name: 'Pocket Pizza',
            supported_units: ['NO_UNITS'],
            food_synonyms: [{
              synonyms: ['pocket pizza', 'baby pizza'],
              lang: 'en'
            }]
          }, {
            food_preset_name: 'Popcorn',
            supported_units: ['POUNDS', 'GRAMS'],
            food_synonyms: [{
              synonyms: ['popcorn', 'movie food']
            }]
          }]
        },
        deviceInfo: {
          manufacturer: 'Apartment Deluxe',
          model: '271',
          hwVersion: '8.2',
          swVersion: '8.1'
        },
        customData: {
          fooValue: 1114,
          barValue: false,
          bazValue: 'goatjive'
        }
      }]
    }
  };
});

// ...

exports.smarthome = functions.https.onRequest(app);
Java
@NotNull
@Override
public SyncResponse onSync(@NotNull SyncRequest syncRequest, @Nullable Map<?, ?> headers) {
  Payload payload = new Payload();
  payload.setAgentUserId("1836.15267389");
  payload.setDevices(new Device[] {
      new Device.Builder()
          .setId("123")
          .setType("action.devices.types.MICROWAVE")
          .addTrait("action.devices.traits.Cook")
          .setName(
              Collections.singletonList("Apartment Deluxe Microwave"),
              "Microwave",
              Collections.singletonList("Microwave")
          )
          .setWillReportState(true)
          .setAttributes(new JSONObject()
              .put("supportedCookingModes", new String[] {
                  "DEFROST",
                  "MICROWAVE",
                  "WARM"
              })
              .put("foodPresets", new JSONObject[] {
                  new JSONObject()
                      .put("food_preset_name", "Pocket Pizza")
                      .put("supported_units", new String[] {
                          "NO_UNITS"
                      })
                      .put("food_synonyms", new JSONObject[] {
                          new JSONObject()
                              .put("synonyms", new String[] {
                                  "pocket pizza",
                                  "baby pizza"
                              })
                              .put("lang", "en")
                      }),
                  new JSONObject()
                      .put("food_preset_name", "Popcorn")
                      .put("supported_units", new String[] {
                          "POUNDS",
                          "GRAMS"
                      })
                      .put("food_synonyms", new JSONObject[] {
                          new JSONObject()
                              .put("synonyms", new String[] {
                                  "popcorn",
                                  "movie food"
                              })
                              .put("lang", "en")
                      })
              })
          )
          .setDeviceInfo("Apartment Deluxe", "271", "8.2", "8.1")
          .setCustomData(new JSONObject()
              .put("fooValue", 1114)
              .put("barValue", false)
              .put("bazValue", "goatjive")
              .toString()
          )
          .build()
  });
  return new SyncResponse(syncRequest.getRequestId(), payload);
}
JSON
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "agentUserId": "1836.15267389",
    "devices": [
      {
        "id": "123",
        "type": "action.devices.types.MICROWAVE",
        "traits": [
          "action.devices.traits.Cook"
        ],
        "name": {
          "defaultNames": [
            "Apartment Deluxe Microwave"
          ],
          "name": "Microwave",
          "nicknames": [
            "Microwave"
          ]
        },
        "willReportState": true,
        "attributes": {
          "supportedCookingModes": [
            "DEFROST",
            "MICROWAVE",
            "WARM"
          ],
          "foodPresets": [
            {
              "food_preset_name": "Pocket Pizza",
              "supported_units": [
                "NO_UNITS"
              ],
              "food_synonyms": [
                {
                  "synonyms": [
                    "pocket pizza",
                    "baby pizza"
                  ],
                  "lang": "en"
                }
              ]
            },
            {
              "food_preset_name": "Popcorn",
              "supported_units": [
                "POUNDS",
                "GRAMS"
              ],
              "food_synonyms": [
                {
                  "synonyms": [
                    "popcorn",
                    "movie food"
                  ]
                }
              ]
            }
          ]
        },
        "deviceInfo": {
          "manufacturer": "Apartment Deluxe",
          "model": "271",
          "hwVersion": "8.2",
          "swVersion": "8.1"
        },
        "customData": {
          "fooValue": 1114,
          "barValue": false,
          "bazValue": "goatjive"
        }
      }
    ]
  }
}
Validator

Device STATES

State Definition
currentCookingMode String. Required. Describes the current cooking mode set on the device, from the list of supported cooking modes. Only one mode may be reported. If no mode is currently selected, this should be set to NONE.
currentFoodPreset String. Optional. Describes the current food cooking in the device, from the list of foodPresets. Only one food may be reported. If no food is currently selected, this should be set to NONE.
currentFoodQuantity Float. Optional. Defines the current amount of food cooking, if a quantity was specified. Should not be reported if nothing is currently cooking, or if there is no quantity associated with this food preset. Must be reported with currentFoodUnit.
currentFoodUnit String. Optional. The unit associated with the currentFoodQuantity, if that is reported.

Sample QUERY Request and Response

User What’s cooking in my rice maker right now?
Google Assistant The rice cooker is cooking two cups of brown rice.
Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": 'action.devices.QUERY',
    "payload": {
      "devices": [{
        "id": "123",
        "customData": {
          "fooValue": 74,
          "barValue": true,
          "bazValue": "foo"
        }
      }]
    }
  }]
}
Node.js
'use strict';

const {smarthome} = require('actions-on-google');
const functions = require('firebase-functions');

const app = smarthome();

app.onQuery((body, headers) => {
  return {
    requestId: body.requestId,
    payload: {
      devices: {
        123: {
          online: true,
          currentCookingMode: 'COOK',
          currentFoodPreset: 'Brown Rice',
          currentFoodQuantity: 2,
          currentFoodUnit: 'CUPS'
        },
        status: 'SUCCESS'
      }
    }
  };
});

// ...

exports.smarthome = functions.https.onRequest(app);
Java
@NotNull
@Override
public QueryResponse onQuery(@NotNull QueryRequest queryRequest, @Nullable Map<?, ?> map) {
  QueryResponse.Payload payload = new QueryResponse.Payload();
  payload.setDevices(new HashMap<String, Map<String, Object>>() {{    put("123", new HashMap<String, Object>() {{      put("online", true);
put("currentCookingMode", "COOK");
put("currentFoodPreset", "Brown Rice");
put("currentFoodQuantity", 2);
put("currentFoodUnit", "CUPS");
      put("status", "SUCCESS");
    }});
  }});

  return new QueryResponse(queryRequest.getRequestId(), payload);
}
JSON
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "devices": {
      "123": {
        "online": true,
        "currentCookingMode": "COOK",
        "currentFoodPreset": "Brown Rice",
        "currentFoodQuantity": 2,
        "currentFoodUnit": "CUPS"
      },
      "status": "SUCCESS"
    }
  }
}
User How many roti is my bread maker baking?
Google Assistant The bread maker is baking 10 roti.
Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": 'action.devices.QUERY',
    "payload": {
      "devices": [{
        "id": "123",
        "customData": {
          "fooValue": 74,
          "barValue": true,
          "bazValue": "foo"
        }
      }]
    }
  }]
}
Node.js
'use strict';

const {smarthome} = require('actions-on-google');
const functions = require('firebase-functions');

const app = smarthome();

app.onQuery((body, headers) => {
  return {
    requestId: body.requestId,
    payload: {
      devices: {
        123: {
          online: true,
          currentCookingMode: 'BAKE',
          currentFoodPreset: 'Roti',
          currentFoodQuantity: 10,
          currentFoodUnit: 'NO_UNITS'
        },
        status: 'SUCCESS'
      }
    }
  };
});

// ...

exports.smarthome = functions.https.onRequest(app);
Java
@NotNull
@Override
public QueryResponse onQuery(@NotNull QueryRequest queryRequest, @Nullable Map<?, ?> map) {
  QueryResponse.Payload payload = new QueryResponse.Payload();
  payload.setDevices(new HashMap<String, Map<String, Object>>() {{    put("123", new HashMap<String, Object>() {{      put("online", true);
put("currentCookingMode", "BAKE");
put("currentFoodPreset", "Roti");
put("currentFoodQuantity", 10);
put("currentFoodUnit", "NO_UNITS");
      put("status", "SUCCESS");
    }});
  }});

  return new QueryResponse(queryRequest.getRequestId(), payload);
}
JSON
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "devices": {
      "123": {
        "online": true,
        "currentCookingMode": "BAKE",
        "currentFoodPreset": "Roti",
        "currentFoodQuantity": 10,
        "currentFoodUnit": "NO_UNITS"
      },
      "status": "SUCCESS"
    }
  }
}

Device COMMANDS

Command Parameters/Definition
action.devices.commands.Cook
  • start Boolean. Required. True to start cooking, false to stop current cooking mode.
  • cookingMode String. Optional. Requested cooking mode for the device.
  • foodPreset String. Optional. The name of the food preset requested by the user.
  • quantity Float. Optional. The quantity of the food requested by the user.
  • unit String. Optional. Required if the user specifies a quantity with units (for example, "cups").

Sample EXECUTE Request and Response

User Start cooking white rice in my pot.
Google Assistant Cooking white rice in the pot.
Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123",
          "customData": {
            "fooValue": 74,
            "barValue": true,
            "bazValue": "lambtwirl"
          }
        }],
        "execution": [{
          "command": "action.devices.commands.Cook",
          "params": {
            "start": true,
            "cookingMode": "COOK",
            "foodPreset": "white rice"
          }
        }]
      }]
    }
  }]
}
Node.js
'use strict';

const {smarthome} = require('actions-on-google');
const functions = require('firebase-functions');

const app = smarthome();

app.onExecute((body, headers) => {
  return {
    requestId: body.requestId,
    payload: {
      commands: [{
        ids: ['123'],
        status: 'SUCCESS',
        states: {
          currentCookingMode: 'COOK',
          currentFoodPreset: 'White rice'
        }
      }]
    }
  };
});

// ...

exports.smarthome = functions.https.onRequest(app);
Java
@NotNull
@Override
public ExecuteResponse onExecute(@NotNull ExecuteRequest executeRequest, @Nullable Map<?, ?> map) {
  ExecuteResponse.Payload payload = new ExecuteResponse.Payload();


  payload.setCommands(new Commands[] {
      new Commands(
          new String[] {"123"},
          "SUCCESS",
          new HashMap<String, Object>() {{put("currentCookingMode", "COOK");
put("currentFoodPreset", "White rice");
          }},
          null,
          null
      )
  });
  return new ExecuteResponse(executeRequest.getRequestId(), payload);
}
JSON
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "currentCookingMode": "COOK",
          "currentFoodPreset": "White rice"
        }
      }
    ]
  }
}
User Make a smoothie in my blender.
Google Assistant Blending smoothie in the blender.
Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123",
          "customData": {
            "fooValue": 74,
            "barValue": true,
            "bazValue": "lambtwirl"
          }
        }],
        "execution": [{
          "command": "action.devices.commands.Cook",
          "params": {
            "start": true,
            "foodPreset": "smoothie"
          }
        }]
      }]
    }
  }]
}
Node.js
'use strict';

const {smarthome} = require('actions-on-google');
const functions = require('firebase-functions');

const app = smarthome();

app.onExecute((body, headers) => {
  return {
    requestId: body.requestId,
    payload: {
      commands: [{
        ids: ['123'],
        status: 'SUCCESS',
        states: {
          currentCookingMode: 'BLEND',
          currentFoodPreset: 'Smoothie'
        }
      }]
    }
  };
});

// ...

exports.smarthome = functions.https.onRequest(app);
Java
@NotNull
@Override
public ExecuteResponse onExecute(@NotNull ExecuteRequest executeRequest, @Nullable Map<?, ?> map) {
  ExecuteResponse.Payload payload = new ExecuteResponse.Payload();


  payload.setCommands(new Commands[] {
      new Commands(
          new String[] {"123"},
          "SUCCESS",
          new HashMap<String, Object>() {{put("currentCookingMode", "BLEND");
put("currentFoodPreset", "Smoothie");
          }},
          null,
          null
      )
  });
  return new ExecuteResponse(executeRequest.getRequestId(), payload);
}
JSON
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "currentCookingMode": "BLEND",
          "currentFoodPreset": "Smoothie"
        }
      }
    ]
  }
}
User Brew two cups of strong coffee in my coffee maker.
Google Assistant Brewing two cups of strong coffee in the coffee maker.
Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123",
          "customData": {
            "fooValue": 74,
            "barValue": true,
            "bazValue": "lambtwirl"
          }
        }],
        "execution": [{
          "command": "action.devices.commands.Cook",
          "params": {
            "start": true,
            "cookingMode": "BREW",
            "foodPreset": "strong coffee",
            "quantity": 2,
            "unit": "CUPS"
          }
        }]
      }]
    }
  }]
}
Node.js
'use strict';

const {smarthome} = require('actions-on-google');
const functions = require('firebase-functions');

const app = smarthome();

app.onExecute((body, headers) => {
  return {
    requestId: body.requestId,
    payload: {
      commands: [{
        ids: ['123'],
        status: 'SUCCESS',
        states: {
          currentCookingMode: 'BREW',
          currentFoodPreset: 'Strong coffee',
          currentFoodQuantity: 2,
          currentFoodUnit: 'CUPS'
        }
      }]
    }
  };
});

// ...

exports.smarthome = functions.https.onRequest(app);
Java
@NotNull
@Override
public ExecuteResponse onExecute(@NotNull ExecuteRequest executeRequest, @Nullable Map<?, ?> map) {
  ExecuteResponse.Payload payload = new ExecuteResponse.Payload();


  payload.setCommands(new Commands[] {
      new Commands(
          new String[] {"123"},
          "SUCCESS",
          new HashMap<String, Object>() {{put("currentCookingMode", "BREW");
put("currentFoodPreset", "Strong coffee");
put("currentFoodQuantity", 2);
put("currentFoodUnit", "CUPS");
          }},
          null,
          null
      )
  });
  return new ExecuteResponse(executeRequest.getRequestId(), payload);
}
JSON
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "currentCookingMode": "BREW",
          "currentFoodPreset": "Strong coffee",
          "currentFoodQuantity": 2,
          "currentFoodUnit": "CUPS"
        }
      }
    ]
  }
}
User Broil a whole chicken in my lower oven.
Google Assistant Broiling a whole chicken in the lower oven.
Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123",
          "customData": {
            "fooValue": 74,
            "barValue": true,
            "bazValue": "lambtwirl"
          }
        }],
        "execution": [{
          "command": "action.devices.commands.Cook",
          "params": {
            "start": true,
            "cookingMode": "BROIL",
            "foodPreset": "whole chicken"
          }
        }]
      }]
    }
  }]
}
Node.js
'use strict';

const {smarthome} = require('actions-on-google');
const functions = require('firebase-functions');

const app = smarthome();

app.onExecute((body, headers) => {
  return {
    requestId: body.requestId,
    payload: {
      commands: [{
        ids: ['123'],
        status: 'SUCCESS',
        states: {
          currentCookingMode: 'BROIL',
          currentFoodPreset: 'Whole chicken'
        }
      }]
    }
  };
});

// ...

exports.smarthome = functions.https.onRequest(app);
Java
@NotNull
@Override
public ExecuteResponse onExecute(@NotNull ExecuteRequest executeRequest, @Nullable Map<?, ?> map) {
  ExecuteResponse.Payload payload = new ExecuteResponse.Payload();


  payload.setCommands(new Commands[] {
      new Commands(
          new String[] {"123"},
          "SUCCESS",
          new HashMap<String, Object>() {{put("currentCookingMode", "BROIL");
put("currentFoodPreset", "Whole chicken");
          }},
          null,
          null
      )
  });
  return new ExecuteResponse(executeRequest.getRequestId(), payload);
}
JSON
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "currentCookingMode": "BROIL",
          "currentFoodPreset": "Whole chicken"
        }
      }
    ]
  }
}
User Bake five roti in my bread maker.
Google Assistant Baking five roti in the bread maker.
Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123",
          "customData": {
            "fooValue": 74,
            "barValue": true,
            "bazValue": "lambtwirl"
          }
        }],
        "execution": [{
          "command": "action.devices.commands.Cook",
          "params": {
            "start": true,
            "cookingMode": "BAKE",
            "foodPreset": "roti",
            "quantity": 5,
            "unit": "NO_UNITS"
          }
        }]
      }]
    }
  }]
}
Node.js
'use strict';

const {smarthome} = require('actions-on-google');
const functions = require('firebase-functions');

const app = smarthome();

app.onExecute((body, headers) => {
  return {
    requestId: body.requestId,
    payload: {
      commands: [{
        ids: ['123'],
        status: 'SUCCESS',
        states: {
          currentCookingMode: 'BAKE',
          currentFoodPreset: 'roti',
          currentFoodQuantity: 5,
          currentFoodUnit: 'NO_UNITS'
        }
      }]
    }
  };
});

// ...

exports.smarthome = functions.https.onRequest(app);
Java
@NotNull
@Override
public ExecuteResponse onExecute(@NotNull ExecuteRequest executeRequest, @Nullable Map<?, ?> map) {
  ExecuteResponse.Payload payload = new ExecuteResponse.Payload();


  payload.setCommands(new Commands[] {
      new Commands(
          new String[] {"123"},
          "SUCCESS",
          new HashMap<String, Object>() {{put("currentCookingMode", "BAKE");
put("currentFoodPreset", "Roti");
put("currentFoodQuantity", 5);
put("currentFoodUnit", "NO_UNITS");
          }},
          null,
          null
      )
  });
  return new ExecuteResponse(executeRequest.getRequestId(), payload);
}
JSON
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "currentCookingMode": "BAKE",
          "currentFoodPreset": "roti",
          "currentFoodQuantity": 5,
          "currentFoodUnit": "NO_UNITS"
        }
      }
    ]
  }
}
User Stop my coffee maker.
Google Assistant I'll stop the coffee maker.
Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123",
          "customData": {
            "fooValue": 74,
            "barValue": true,
            "bazValue": "lambtwirl"
          }
        }],
        "execution": [{
          "command": "action.devices.commands.Cook",
          "params": {
            "start": false
          }
        }]
      }]
    }
  }]
}
Node.js
'use strict';

const {smarthome} = require('actions-on-google');
const functions = require('firebase-functions');

const app = smarthome();

app.onExecute((body, headers) => {
  return {
    requestId: body.requestId,
    payload: {
      commands: [{
        ids: ['123'],
        status: 'SUCCESS',
        states: {
          currentCookingMode: 'NONE',
          currentFoodPreset: 'NONE'
        }
      }]
    }
  };
});

// ...

exports.smarthome = functions.https.onRequest(app);
Java
@NotNull
@Override
public ExecuteResponse onExecute(@NotNull ExecuteRequest executeRequest, @Nullable Map<?, ?> map) {
  ExecuteResponse.Payload payload = new ExecuteResponse.Payload();


  payload.setCommands(new Commands[] {
      new Commands(
          new String[] {"123"},
          "SUCCESS",
          new HashMap<String, Object>() {{put("currentCookingMode", "NONE");
put("currentFoodPreset", "NONE");
          }},
          null,
          null
      )
  });
  return new ExecuteResponse(executeRequest.getRequestId(), payload);
}
JSON
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [
      {
        "ids": [
          "123"
        ],
        "status": "SUCCESS",
        "states": {
          "currentCookingMode": "NONE",
          "currentFoodPreset": "NONE"
        }
      }
    ]
  }
}

Device ERRORS

See the full list of errors and exceptions.

  • deviceDoorOpen - The door of the device is open.
  • deviceLidOpen - The lid of the device is open.
  • fractionalAmountNotSupported - The user requested a fractional amount for this food preset, but it isn’t supported by this device.
  • amountAboveLimit - The user requested a quantity that was over the maximum.
  • unknownFoodPreset - The user requested a food preset not supported by the device.

Supported cooking modes

  • UNKNOWN_COOKING_MODE
  • BAKE
  • BEAT
  • BLEND
  • BOIL
  • BREW
  • BROIL
  • CONVECTION_BAKE
  • COOK
  • DEFROST
  • DEHYDRATE
  • FERMENT
  • FRY
  • KNEAD
  • MICROWAVE
  • PRESSURE_COOK
  • PUREE
  • ROAST
  • SAUTE
  • SLOW_COOK
  • SOUS_VIDE
  • STEAM
  • STEW
  • WARM
  • WHIP

Supported units

  • UNKNOWN_UNITS
  • NO_UNITS 1
  • CENTIMETERS
  • CUPS
  • DECILITERS
  • FEET
  • FLUID_OUNCES
  • GALLONS
  • GRAMS
  • INCHES
  • KILOGRAMS
  • LITERS
  • METERS
  • MILLIGRAMS
  • MILLILITERS
  • MILLIMETERS
  • OUNCES
  • PINCH
  • PINTS
  • PORTION 2
  • POUNDS
  • QUARTS
  • TABLESPOONS
  • TEASPOONS

1 Use this when the item is countable so units are not needed (forexample, cupcakes).

2 Use this as a generic unit of measurement to represent a"portion" of the item. This measurement is device-specific and should beinterpreted by the device partner.