[Sub] Write recipe request

Subscribe to this topic to accept write recipe requests.
Write a single recipe without changing all the other recipes on the device

Request Topic and Payload

Topic

things5-production/v1/devices/<device-id>/cmd/write_recipe_req

Payload Representation

{
    "request_id": "UUID sent in the request",
    "recipe": {
      "id": "uniqueid",
      "name": "Pollo con patate al cuore",
      "description": "Recipe description",
      "type": "core",
      "index": 1,
      "phases": [
        {
          "values": [
            {
              "name": "evaporator_fan_speed",
              "value": "4",
              "type": "integer"
            },
            {
              "name": "core_temperature",
              "value": "-5",
              "type": "integer"
            },
            {
              "name": "cell_temperature",
              "value": "-20",
              "type": "integer"
            }
          ]
        },
        {
          "values": [
            {
              "name": "evaporator_fan_speed",
              "value": "2",
              "type": "integer"
            },
            {
              "name": "core_temperature",
              "value": "-5",
              "type": "integer"
            },
            {
              "name": "cell_temperature",
              "value": "-20",
              "type": "integer"
            }
          ]
        },
        {
          "values": [
            {
              "name": "evaporator_fan_speed",
              "value": "1",
              "type": "integer"
            },
            {
              "name": "core_temperature",
              "value": "-5",
              "type": "integer"
            },
            {
              "name": "cell_temperature",
              "value": "-20",
              "type": "integer"
            }
          ]
        },
        {
          "values": [
            {
              "name": "evaporator_fan_speed",
              "value": "0",
              "type": "integer"
            },
            {
              "name": "cell_temperature",
              "value": "-10",
              "type": "integer"
            }
          ]
        }
      ],
      "metadata": {
        "key": "value"
      }
    }
  }

Payload Parameters

namedescriptionexample
request_idthe request id to be sent back by the device when sending the response
recipeslist of recipes to write

Recipe type

namerequired
idfalse
nametrue
descriptionfalse
typefalse
phasestrue
metadatafalse

📘

Response has to be sent into the write recipe response: