Explainer
Why an InfluxDB dashboard has no button or slider widgets
Short answer
The InfluxDB dashboard UI has no native interactive widget: a button cannot publish MQTT and a slider cannot post its value to an HTTP endpoint. The documented nearest path is a Flux task calling the experimental mqtt package, fired by the Run Task control in the UI, which carries no UI-supplied value.

On this page
- Does the InfluxDB dashboard UI have a button or slider widget?
- What is the closest supported way to publish MQTT from the InfluxDB UI?
- Can a task run carry a slider value or call an HTTP endpoint?
- How do you verify the MQTT task actually controlled the device?
- Where should the interactive controls live instead?
- Questions asked
No, the InfluxDB web UI has no interactive widget that runs an action: there is no button widget that publishes an MQTT message and no slider widget that posts its value to an HTTP endpoint. The dashboard is built for observing time series, and its cell types take data in, not commands out. The closest documented path is a Flux task that uses the experimental mqtt package, fired by the UI's Run Task control; anything that needs to carry a value you set in the browser belongs in a control tool, not in InfluxDB.
Does the InfluxDB dashboard UI have a button or slider widget? #
No native interactive widget exists in the InfluxDB web UI: the cell types display data, and none of them executes an action on a click or a change. A button that publishes an MQTT message on click and a slider that sends its value to an HTTP endpoint on change are both outside what the dashboard does today. Where the control has to live instead of the dashboard is the same separation described in Node-RED IO data MQTT setup: keep publish and control separate: the tool that stores the data is not the tool that sends the command.
What is the closest supported way to publish MQTT from the InfluxDB UI? #
The nearest documented path is a Flux script using the experimental mqtt package, stored as a task and executed with the Run Task control in the web UI. That control is the substitute for a button: it runs a fixed stored script on your click. Concretely, the sequence is:
- Write a Flux script that calls
mqtt.publishfrom the experimental mqtt package, with the broker URL, topic and payload fixed inside the script. - Save that script as an InfluxDB task.
- Open the task in the web UI and select Run Task to execute it.
- Verify at the device that the message arrived and the action happened.
The package is labeled experimental, so treat it as subject to change and check it against your InfluxDB and Flux version before you rely on it. The same package surfaces as a failure source in Why Flux mqtt.publish fails with Dialer.Dial in InfluxDB when the task's host cannot reach the broker; a publish that dies at connect time is the first thing to rule out after your first run.
Can a task run carry a slider value or call an HTTP endpoint? #
No supported implementation does either. The Run Task control executes a stored script; it passes nothing from the browser into the task, so the payload is whatever is hard-coded in the Flux. That makes it a button substitute only, and a slider that posts a chosen value to an HTTP endpoint has no documented path in the UI at all. No task option, package or widget identified in the documentation takes an onChange event or an interactive value, so do not plan a control design that depends on one appearing.
For a worked example of what the workaround can and cannot do: suppose a plant-air fan is started by an MQTT message with payload 1 on topic plant/fan/start, and the broker sits at the edge box on 192.168.1.50 (an example address). The Flux script fixes mqtt.publish(url: "tcp://192.168.1.50:1883", topic: "plant/fan/start", message: "1"), the task stores it, and each Run Task click publishes exactly that message. What you cannot do is the next request, a runtime setpoint: a slider dragged to 62 percent has no way to place 62 into the payload, because the run passes no value. That setpoint needs a real control path, such as the publish-versus-control split covered in the Node-RED article above, and the reaction of the fan then comes back as telemetry you watch in the same InfluxDB dashboard.
How do you verify the MQTT task actually controlled the device? #
A successful task run confirms only that the stored Flux executed; it does not prove the device did anything. Verify the whole chain at the destination, in this order:
- The task's run history in the UI shows the manual run completed without error.
- The broker received the message: watch the topic with a subscriber on the broker host, or check the broker's own connection and message counters.
- The device acted on the payload: the fan contactor pulled in, or the device's status topic changed state.
- The resulting telemetry reached the bucket and the dashboard cell updated, which closes the loop between command and observation.
If step 1 is green and step 2 is empty, the fault is between the InfluxDB host and the broker: name resolution, routing or the broker listening only on localhost, the same class of failure traced in Why a device cannot publish MQTT to a broker on your PC. If step 3 fails with the message confirmed at the broker, the fault is the payload or the device's subscription, not InfluxDB.
Where should the interactive controls live instead? #
In a purpose-built control layer, with InfluxDB kept for observation. An edge or gateway box running Node-RED, a small web page calling the device's API, or the SCADA system you already run all give you buttons and sliders natively, publish MQTT or call HTTP endpoints with real values, and log the command alongside the telemetry it caused. When that control box is also the broker host, a compact fanless computer such as an industrial mini PC fills the role, and the InfluxDB task trick stays what it is: a manual, fixed-payload button substitute for occasional tests, not a control system.
The decision: use the Run Task route only when the command is fixed and the click is rare, such as a one-off test trigger during commissioning. Anything an operator will use to run the plant, and anything that carries a chosen value, goes in the control layer.
Questions asked
Can an InfluxDB dashboard button send an MQTT message?
Not as a native widget. The closest supported path is a Flux script that uses the experimental mqtt package's mqtt.publish function, stored as a task and fired with the Run Task control in the web UI. It publishes a fixed payload, because a manually run task cannot read anything you typed or dragged in the dashboard.
Can an InfluxDB slider call an HTTP endpoint on change?
No supported implementation exists for that in the documented UI. No widget passes an onChange value into a Flux task, and the experimental mqtt task workaround does not establish outbound HTTP with UI state. Build the slider in a tool that is built for control, such as Node-RED, and keep InfluxDB for the data.
Does a successful task run prove the device was controlled?
No. A green task run only confirms the stored Flux executed without error at the InfluxDB side. Confirm the control path at the destination: the device received the message, acted on it, and its telemetry changed in the bucket, which you can check on the same dashboard.
Where should the interactive controls live instead?
In a purpose-built control layer. A small edge box running Node-RED gives buttons and sliders that publish MQTT or call HTTP endpoints natively, while InfluxDB keeps storing the telemetry you watch. Keep the control path separate from the data-collection path so a dashboard failure never blocks a command.
