Skip to content
Stand with Ukraine flag

Knob Control

  • Widget
  • v1.0.0
  • Sep 1, 2026
  • MIT license
  • v4.2+ | Built-in
Knob Control

Sends the command to the device each time the user changes the value. Uses ‘setValue’ and ‘getValue’ RPC calls by default. The name of the RPC calls is configurable in advanced settings.

Widget Type
  • Control
Category
  • Controls

Who it’s for

Anyone setting a value from a control that looks like the equipment’s own — a rotary dial on a mimic panel, a setpoint knob on a machine overview, where the dashboard is meant to resemble the physical interface operators already use.

What it does

The Knob Control sends a value to the device as the operator turns a dial. The starting position is fetched by a configured action and each change sends its own, with a range, a decimal precision and a fallback for when the initial read returns nothing.

  • A rotary control that matches a physical panel, which makes a dashboard mimic read as the equipment rather than as a form.
  • The starting position is read back from the device rather than assumed, so the knob opens on the current setpoint.
  • A fallback initial value covers the case where the device has not yet reported, so the knob is never left in an undefined position.
  • The range and decimals are configured, so the knob cannot send a value the device will not accept.
  • A title captions the control.
  • The Knob Control sends on change: it has no confirm step, so a control where the wrong value is costly belongs on a stepper.

How to set up

Data keys

The Knob Control takes no data keys — its value and commands come from its configured actions.

AttributeScopeOperationDescription
Configured keyAny for read, Shared / Server for writeRead + WriteWith Initial value set to Get attribute the knob reads this key; with On value change set to Set attribute it writes it.
MethodDirectionParametersSent when
Value change methodOne-way or two-way, as configuredThe knob’s value, or the result of a convert functionWhenever the operator turns the knob

Range

SettingDefaultEffect
Initial valueUnsetHow the starting position is fetched
On value changeUnsetThe action triggered when the value changes
Range min / maxUnsetThe ends of the dial
Value decimalsUnsetThe precision displayed and sent
Fallback initial valueUnsetUsed when the initial read returns nothing
Knob titleUnsetThe caption on the control

Set the fallback initial value to the safe setting rather than to the minimum. It is what the knob shows on a device that has never reported, and an operator turning up from a position that was never real is a different problem from one adjusting a known setpoint.

How to customize

  • To start from the device’s current setting — set Initial value to the action matching how the device reports.
  • To command the device — set On value change to an RPC call, an attribute write or a time series write.
  • To constrain what can be sent — set Range min and Range max to the device’s real limits.
  • To control precision — set the value decimals.
  • To handle a device that has not reported — set the Fallback initial value to a safe setting.
  • To caption the control — set the Knob title.

Tips

  • Reach for a knob when the dashboard is a mimic of a physical panel and for a slider otherwise. A knob is harder to set precisely with a mouse, and that cost is only worth paying when the resemblance to the real equipment is doing work.
  • Keep the range narrow enough that a full turn is a meaningful adjustment. A knob spanning zero to ten thousand gives a few units of change per degree of rotation, which makes precise setting impossible and pushes operators back to typing.

Share Your Widget with the Community

Built a custom widget? Export it as a JSON from ThingsBoard and publish it to the IoT Hub through a simple 4-step wizard (Upload, Listing, Readme, Review & Submit). Share it with thousands of ThingsBoard developers worldwide and get featured in the catalog.