Recipe Download

Command the data logger to download a recipe via HTTP GET from a URL.

Topic Structure: <baseTopic>/cc/<deviceID>/recipe

Properties

  • "url:" {string} web address to a specific server to retrieve recipe.

  • "sensor": {int} (Optional) Specify onboard Recipe or sensor Recipes
    • -1 Retrieve onboard recipe / Data Logger Configuration

    • 1 .. N Retrieve Recipe for Sensor Number

  • "action": {string} (Optional) "reset" If “url” is omitted and action is "reset" the command will clear the recipe and trigger the logger to retrieve an updated version.

  • "tranID": (optional) - Any

Example Command (onboard)

Subscribe cs/v2/cc/ABCD-EFGH-1234/recipe

{
    "url": "https://DataThings.com/recipe",
    "sensor": -1
}

Example Command (reset)

Subscribe cs/v2/cc/ABCD-EFGH-1234/recipe

{
    "action": "reset",
    "sensor": 1
}

Progress

Progress of the Recipe download will be published on the state topic.

Publish cs/v2/state/ABCD-EFGH-1234

  • Download Started

{
    "clientId": "ABCD-EFGH-1234",
    "state": "online",
    "fileTransfer": "Recipe file download"
}
  • Back online

{
    "clientId": "ABCD-EFGH-1234",
    "state": "online",
    "fileTransfer": "Recipe file download"
}

Response

Publish cs/v2/cr/ABCD-EFGH-1234/recipe

In addition to the state topic messages, the data logger will publish a final result of the process on the cr topic.

{
    "success": "Recipe ran successfully"
}