Skip to content
Stand with Ukraine flag

Horizontal Ball Valve

Horizontal ball valve SCADA symbol

This widget belongs to the Traditional SCADA fluid system bundle — a collection of pipe segments, fittings, valves, pumps, and gauges designed for building fluid system diagrams on ThingsBoard dashboards.

The Horizontal ball valve widget represents a quarter-turn ball valve mounted on a horizontal pipe segment in a SCADA fluid system diagram. It visualizes the open or closed state of the valve and supports click-to-open and click-to-close commands sent directly to the connected device.

  • Visualize the open or closed state of a valve in real time.
  • Animate the valve symbol between open and closed positions using configurable rotation angles.
  • Send open or close commands to the device when the user clicks the valve symbol.
  • Apply custom colors for the open and closed states independently.
  • Receive state data from device attributes, time series, alarm status, or dashboard state.
  1. Open the dashboard and switch to edit mode.
  2. Click Add widget at the top, or the Add new widget icon in the center of the screen.
  3. Open the Traditional SCADA fluid system widget bundle.
  4. Select the valve widget for your use case.
  5. Configure the widget settings, then click Add.

The widget connects to a single data source: either a Device or an Entity alias that resolves to a device. This device provides the telemetry or attribute values used to drive the widget’s visual state.

The SCADA symbol defines the visual shape of the widget. Each valve widget has a pre-selected symbol from the Traditional SCADA fluid system bundle. To use a different symbol, click Browse SCADA symbol from gallery and choose one from the library, or upload your own.

Behavior parameters define what the widget displays and how it responds to user interaction, driven by real-time data from the connected device.

ParameterDefaultDescription
OpenedUse attribute 'open'Whether the valve is currently open. True = open state (symbol rotates to the opened angle and shows the opened color); False = closed state. See Data source configuration.
OpenSet 'open' attribute to: trueCommand sent to the device when the user clicks the valve to open it. See Click action configuration.
CloseSet 'open' attribute to: falseCommand sent to the device when the user clicks the valve to close it. See Click action configuration.

Applies to Open and Close. Click the edit icon to configure the command sent to the device when the user clicks the valve symbol.

  • Execute RPC

    Send an RPC command to the device.

    ParameterDescription
    MethodRPC method to call, like setState.
    ParametersCommand value: true for Open, false for Close.
  • Set attribute

    Write a value to a device attribute.

    ParameterDescription
    Attribute scopeWhere the attribute is stored: Shared, Client, or Server.
    Attribute keyAttribute name to write, like open.
    ValueAttribute value: true for Open, false for Close.
  • Add time series

    Write a value to a time series key.

    ParameterDescription
    Time series keyTime series key to write, like state.
    ValueTime series value: true for Open, false for Close.

Applies to Opened. Click the edit icon to open its configuration dialog. When Action is set to Do nothing, set the Value directly:

ParameterValue
OpenedTrue or False

For all other actions, the configuration dialog reads the valve state dynamically from the device:

  • Execute RPC

    Read the parameter value from an RPC response.

    ParameterDescription
    MethodRPC method to call, like getState or getValveStatus.
    Action result converterNone — parameter is activated when the result matches the value you specify; Function — parameter is activated when your f(data) returns true.
    ’[parameter]’ when result isThe value or condition that activates this parameter.
    RPC request timeout (ms)How long to wait for a device response before timing out (Advanced settings).
    RPC request persistentStores and retries the command until the device comes online (Advanced settings).
  • Get attribute

    Read the parameter value from a device attribute.

    ParameterDescription
    Attribute scopeWhere the attribute is stored: Any, Client, Server, or Shared.
    Attribute keyAttribute name to read, like open or valveOpen.
    Action result converterNone — parameter is activated when the attribute equals the value you specify; Function — parameter is activated when your f(data) returns true.
    ’[parameter]’ when result isThe value or condition that activates this parameter.
  • Get time series

    Read the parameter value from the latest telemetry reading.

    ParameterDescription
    Time series keyTelemetry key to monitor, like open or state.
    Action result converterNone — parameter is activated when the telemetry value equals what you specify; Function — parameter is activated when your f(data) returns true.
    ’[parameter]’ when result isThe value or condition that activates this parameter.
  • Get alarm status

    Activate the parameter when a specific alarm is active on the device.

    ParameterDescription
    Alarm severityWhich severity levels trigger the active state: Critical, Major, Minor, Warning, or Indeterminate.
    Alarm typesAny alarm, or a specific alarm type.
  • Get dashboard state id

    Activate the parameter based on which dashboard state is currently open.

    ParameterDescription
    Action result converterNone — parameter is activated when the state name matches the text you enter; Function — parameter is activated when your f(data) returns true.
    ’[parameter]’ when result isThe state name or condition that activates this parameter.
  • Get dashboard state object

    Activate the parameter using the full dashboard state context; use this when you need to evaluate multiple state parameters at once.

    ParameterDescription
    Parse value functionA f(data) function that receives the current dashboard state object. Use data.id to read the active state name, or data.params to inspect state parameters.
    ’[parameter]’ when result isThe expected type and value that activates the parameter. Choose String, Integer, Double, Boolean (then select True or False), or JSON.

The Appearance section controls the widget title, valve state colors, and the rotation angle of the symbol in each state.

SettingDefaultDescription
TitleWidget nameWidget title displayed in the header. Supports entityName and entityLabel variables.
Card iconIcon shown in the widget header. Configure its size and color.
Opened colorGreenColor of the valve symbol when in the open state.
Closed colorGrayColor of the valve symbol when in the closed state.
Opened rotation angle0Rotation angle (degrees) of the symbol when the valve is open.
Closed rotation angle90Rotation angle (degrees) of the symbol when the valve is closed.

The Card appearance section controls the widget container style.

SettingDefaultDescription
BackgroundTransparentCard background color.
Show card buttonsFullscreenButtons shown on the card when hovered.
Card border radius0pxRounding of card corners.
Card padding12pxInner spacing between the card edge and widget content.

Widget shows no state change or shows the wrong state

CauseSolution
Opened action is set to Do nothingOpen the Opened edit dialog, set the correct Action, and specify the attribute or time-series key.
Attribute or telemetry key mismatchVerify that the key name in the Opened configuration matches exactly what the device reports.
Target device is not connectedConfirm that the selected device is online and actively sending data.

Clicking the valve does not send a command to the device

CauseSolution
Open or Close action is not configuredOpen the Open or Close edit dialog and set the action type (Execute RPC, Set attribute, or Add time series).
Attribute key or RPC method is incorrectVerify the key name or method name matches what the device expects.
Target device is not connectedConfirm that the selected device is online.

These widgets are used in the following ready-made solution templates built on the Traditional SCADA fluid system bundle:

  • SCADA Swimming pool — a complete swimming pool monitoring dashboard built with pipe, pump, valve, and gauge widgets from the Traditional SCADA fluid system bundle.