Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

[Support in progress]

Codecs & Templates have been expanded to allow exposing commands into our dashboard UI. When these are selected they allow us to trigger commands to the device that will set certain common configuration options that we’ve chosen to expose.

These options must be supported in the Codec as well as a downlink_commands section added to the Custom Template.

Example (command.interval)

[
    {
      "order": 0,
      "label": null,
      "variables": [
        {
          "order": 0,
          "label": "Reading Interval",
          "type": "string",
          "key": "command.interval",
          "form": "select",
          "min": null,
          "max": null,
          "required": true,
          "hide_on_setup": true,
         "help_texts": [{"value": "Device must be online before changing interval setting", "order": 0}],
          "default_value": "600",
          "values": [
            {
              "label": "30 seconds",
              "value": "30"
            },
            {
              "label": "1 minute",
              "value": "60"
            },
            {
              "label": "2 minutes",
              "value": "120"
            },
            {
              "label": "5 minutes",
              "value": "300"
            },
            {
              "label": "10 minutes",
              "value": "600"
            },
            {
              "label": "15 minutes",
              "value": "900"
            },
            {
              "label": "20 minutes",
              "value": "1200"
            },
            {
              "label": "30 minutes",
              "value": "1800"
            },
            {
              "label": "1 hour",
              "value": "3600"
            },
            {
              "label": "6 hours",
              "value": "21600"
            }
          ]
        }
      ]
    }
  ]

Defining variables keys prefixed with “command.” allows Prometheus to pick those variables, encode unitary commands through the codec, and trigger the downlink eventually.

  • No labels