Buttons, toggles, sliders, and fields that write back to your broker.
An operator panel built from the components on this page: buttons, a toggle, a slider, and entry fields
Input components let operators act: start a line, set a speed, type a value. One rule applies to all of them: input components don’t publish by themselves — the ON <EVENT> DO handler does.
Like a steering wheel, not a speedometer. Display widgets read signals; these widgets send them — every interaction ends in a publish back to the broker.
One section per control, each with its rendered result, the code, and then the property reference.
Binary on/off control. switch is an alias for toggle.
Basic
The toggle reflects the bound topic live — publish true or false to it and the switch follows:
A labeled toggle reflecting the live state of its bound topic
ADD COMPONENT "EnableSwitch" WITH TYPE "switch" SET LABEL "Enable Production" BIND STATE TO TOPIC "factory/production/enabled"
Property
Type
Description
LABEL
String
Toggle label
Bind targets:STATE — Events:ON TOGGLE DO
Write-back is broken in the current HUB build.ON TOGGLE DO PUBLISH ... WITH STATE fires, but the message payload is the literal text {{STATE}} instead of the toggle state (WITH VALUE behaves the same). Until this is fixed, use the toggle as a live state display and trigger commands from a button.
The slider tracks its bound topic live — the thumb moves as new values arrive:
A 0–200 °C setpoint slider tracking the live value of its bound topic
ADD COMPONENT "SetpointSlider" WITH TYPE "slider" SET RANGE FROM 0 TO 200 SET UNIT "°C" BIND VALUE TO TOPIC "control/setpoint"
Property
Type
Description
RANGE FROM x TO y
Numbers
Min / max
UNIT
String
Unit label
Bind targets:VALUE — Events:ON CHANGE DO
Write-back is broken in the current HUB build.ON CHANGE DO PUBLISH ... WITH VALUE sends the literal text {{VALUE}} instead of the slider position, and dragging is overridden by the bound topic. Until this is fixed, use the slider as a live numeric display and set values from a number field.
A labeled field pre-filled from its topic; typing publishes the new value:
A labeled text field pre-filled with the current value from its topic
ADD COMPONENT "NameInput" WITH TYPE "text-field" SET LABEL "Device Name" SET PLACEHOLDER "Enter name..." BIND VALUE TO TOPIC "config/device/name" ON CHANGE DO PUBLISH TOPIC "config/device/name" WITH VALUE
Accepts only numbers and publishes the limit on change:
A numeric field that accepts only numbers and publishes the limit on change
ADD COMPONENT "MaxPressure" WITH TYPE "number-field" SET LABEL "Max Pressure (bar)" SET PLACEHOLDER "0.00" BIND VALUE TO TOPIC "config/pressure/max" ON CHANGE DO PUBLISH TOPIC "config/pressure/max" WITH VALUE
Text and number fields fire ON CHANGE when the value is committed — press Enter (or leave the field) after typing. Each keystroke alone does not publish.
The toggle flips back on its own
The toggle reflects its BIND STATE topic. If nothing updates that topic, the toggle snaps back to the last bound value — make sure something (device, Action, or a test publish) updates the bound state.