Widget types
| Widget | Kind | Data types (usual first) | Device sends with | Device receives with |
|---|---|---|---|---|
| Button | Control | Boolean, Integer | iot.button() | iot.onButton() |
| Switch | Control | Boolean, Integer | — | iot.onSwitch() |
| LED | Display, can control | Boolean, Integer | iot.led() | iot.onLED() |
| Slider | Control | Float, Integer | iot.slider() | iot.onSlider() |
| Gauge | Display | Float, Integer | iot.gauge() | — |
| Chart | Display, with history | Float, Integer | iot.chart() | — |
| Value Display | Display | Float, Integer, String, Boolean | iot.display() | iot.onValue() |
| Label | Display | String, Integer, Float, Boolean | iot.label() | — |
| Terminal | Both | String | iot.terminal() | iot.onTerminal() (commands are sent once) |
| RGB | Control | Structured | — | iot.onRGB() |
| Timer | Control | Structured | — | iot.onTimer() |
| Map | Display | Structured | iot.map() | — |
| Joystick | Control | Structured | — | iot.onJoystick() |
| Status (Status Indicator) | Display | Float, Integer, String, Boolean | iot.status() | — |
| Selector (Dropdown) | Control | Integer, String, Float | iot.selector() | iot.onSelector(), iot.onSelectorText() |
| Number Input | Control | Float, Integer | iot.numberInput() | iot.onNumberInput() |
| Progress Bar | Display | Float, Integer | iot.progress() | — |
| Text Input | Control | String | — | iot.onTextInput() |
| Keypad | Control | Integer, String, Float | — | iot.onKeypad(), iot.onKeypadText() |
| Text (Note) | Fixed text | — | — | — |
| Computed Value | Summary | — | — | — |
| Event Log | Summary | — | — | — |
| Multi Chart | Summary | — | — | — |
| Table (List) | Summary | — | — | — |
Notes
- Boolean values travel as
1and0. - Structured widgets carry extra fields besides the value, such as colour channels or coordinates; see MQTT protocol.
- Summary widgets have no pin of their own. They work from the device's other widgets: a formula (Computed Value), a list of recent changes (Event Log), several pins on one chart (Multi Chart), or every widget in a table (Table).
- Keypad, Text Input and Terminal commands are sent once. Other controls are kept by the broker, so a device that was offline gets its latest settings when it reconnects; these one-off commands are not repeated.
- Charts and alerts use numbers only. A widget set to String does not appear in charts and cannot trigger alerts.
- Any widget can also be sent to with
iot.publish("Type", "V1", value)and received withiot.onWidget("Type", "V1", cb)oriot.onWidgetText(...).
Where each widget is set up and used:
- Organizations: Dashboards and widgets
- Users: Using widgets
- Device developers: Sending and receiving