Portal - Control Widgets
The control widgets in our web portal are designed for advanced users, offering a structured and technical approach to interact with sensors and actuators. These widgets adapt dynamically based on unit types and sensor data, ensuring compatibility with a wide range of devices. The system adheres to a generic design to meet evolving requirements, supporting three primary control types: Single Buttons, Toggle Buttons, and Sliders.
All controls display incoming actuator values, which automatically adjust the widget state (e.g., toggling buttons or moving sliders) to reflect the current valid actuator value. Actuators follow a naming convention where they are prefixed with SET_
(e.g., SET_BRIGHTNESS
for the BRIGHTNESS
sensor). This allows seamless integration of sensor values into the controls. For example, the SET_BRIGHTNESS
actuator enables brightness adjustments for a light, while also displaying the actual brightness from the sensor — useful when internal device logic modifies the output.
Widget Behavior
Single Button (MIN = MAX)
-
A single button is created when the actuator configuration defines identical
MIN
andMAX
values. -
Pressing the button sends this predefined value.
-
If a corresponding sensor is available, its value is displayed.
Toggle Buttons (Unit = ON_OFF, MIN ≠ MAX)
-
Two buttons allow users to send either
MIN
orMAX
values by clicking. -
The button corresponding to the last sent actuator value is highlighted across the platform.
-
If a sensor is available, its value is displayed alongside the buttons.
Sliders (Unit ≠ ON_OFF)
-
Sliders are used for continuous values and include both a slider and an input field.
-
Adjusting the slider updates the input field, and vice versa.
-
Users can send their desired actuator value via a dedicated send button.
-
Both elements update automatically when new actuator values are received across the platform.
-
If
min
/max
values are undefined, they default to the datatype’s range. -
If a sensor is available, its value is displayed.