Skip to main content
Binding is how a widget shows live device data and sends commands back. Two ideas do all the work: the widget ID and field paths.

The widget ID

Every widget has an ID. Firmware pushes values to that ID, and the widget updates. This is the core loop from How It Works:
// Firmware (Arduino)
device.updateWidget(targetId, "tempGauge", 27.4);
A Gauge whose widget ID is tempGauge now reads 27.4. Set a widget’s ID in the General tab; reference that same ID from firmware.

Field paths

When a device sends a structured payload, a widget reaches into it with a field path in the Data tab. Paths use dot-notation for nested objects and numeric indices for arrays. Given this payload:
{ "sensors": { "cargo_temp": 6.2 }, "speed": 48, "gps": { "lat": 18.9 } }
Field pathResolves to
speed48
sensors.cargo_temp6.2
gps.lat18.9
The platform resolves what it can and ignores what it can’t — your payload shape is entirely up to you.

Commands back to the device

Control widgets (Switch, Button, Slider, …) send commands in the Triggers tab. The firmware receives them through its command handler:
device.setUserCommandHandler([](JsonObject &msg) {
  // act on the command
});

Multi-device dashboards

Different widgets on the same canvas can target different devices — bind each widget to the device it represents. This is how a single dashboard monitors a whole set of devices.

The core loop

Values up, commands down.

Widget reference

What each widget binds to.