Recipes

Recipes are the programs stored on a device. The API offers two ways to work with them:

  • Recipes kept by Things5 (the endpoints below this page): Things5 keeps a copy of the device's recipes, so they can be read and edited even when the device is offline. First import them with Init recipes. When a recipe is changed through Things5, it is sent to the device; if the device answers with an error, the previous version is restored in Things5.
  • Recipes read directly from the device: Read recipes, Read recipe, Write recipe, Delete recipe. Nothing is stored in Things5 and the device must be connected.

Recipe templates and cookbooks are recipes for a device model rather than a single device: see Recipe templates, Cookbooks and Cookbook syncs.

All recipe endpoints are under https://api.things5.digital/v1/recipes. Reading needs the view permission on the device; changes need recipes:manage.

Recipe id

Things5 identifies a recipe with unique_id, generated when the recipe is imported from the device or created in Things5. The device's own id can be any string and is the one used in MQTT messages; unique_id never appears in MQTT messages.

The device side of recipes is described in MQTT API: Recipes.