Three widgets read and write system variables, the numeric values stored on a zencontrol controller (for example a temperature setpoint, a lux reading, an energy figure or a mode number). Each value is stored as a whole number from 0 to 65535 and can be scaled for display.
| Widget | Shows the value | Changes the value | Control |
|---|---|---|---|
| Variable | Yes | No | Read-only display |
| Data slider | Yes (Read + Write) | Yes | Slider |
| Adjustable data | Yes (Read + Write) | Yes | + and - buttons |
In My targets, open the Variable tab under Site targets and add the variables you need (see Linking widgets to your site with My targets).
Select the widget and click Use my targets under Targeting. Only variable targets are offered; if none have been added, the list shows No matching targets.
Transforms convert between the stored number and what the user sees.
| Transform | Example |
|---|---|
| None (raw value) | Stored 215 shows as 215 |
| Divide by | Divide by 10: stored 215 shows as 21.5 |
| Multiply by | Multiply by 0.1: same result as divide by 10 |
| Add / Subtract | Add or remove an offset |
| Custom formula | An expression using x, for example x / 4 + 10 |
Transform stored value to display is used when reading.
Transform display value to stored (for writing) is used when the user changes the value, and should be the inverse (for example Divide by 10 to display, Multiply by 10 to store).
Type a number in the Preview field to check the result before you save.
Set Display precision (0 to 4 decimal places) and a Value unit (for example °C, lux, W, %) to finish the display.
Default size: 3 x 2 cells, labelled Data.
Show feedback value turns the value on; -- shows when no value is available.
Value colour and Value font style can differ from the label.
Only the display transform applies.
Default size: 1 x 6 cells, vertical.
| Setting | Notes |
|---|---|
| Slider Range: Min value / Max value | Display range of the slider |
| Step size | How far each step moves; for example 500 on a 0 to 65535 range |
| Access mode | Read + Write: the slider follows the live value. Write only: it shows the last value the user set |
| Appearance | Thickness, Orientation, Slider ends, Slider button, Track icons |
Default size: 3 x 2 cells, thermometer icon, + and - buttons.
| Setting | Notes |
|---|---|
| Show + button / Show - button | Hide one for an increment-only or decrement-only control |
| Button layout | Split sixths (- data +), Stack right (data with +/- stacked), Bottom bar (data over - +), each also in a circle-button version |
| Access mode | Read + Write (shows the live value) or Write only |
| Step size | Default amount each press changes the value |
| + button increment / - button decrement | Optional overrides, for example +1 but -5 |
| Min value / Max value | Clamps the displayed value (default 0 to 65535) |
A controller stores a setpoint in tenths of a degree (215 = 21.5 °C).
Add Adjustable data and link it to the setpoint variable.
Display transform Divide by 10; write transform Multiply by 10.
Display precision 1 decimal, Value unit °C.
Step size 0.5, Min value 16, Max value 28.
Each press of + now adds 0.5 °C and the value stops at 28.
Use Variable for anything the user should see but not change.
Test transforms with the Preview field: a missing inverse write transform is the most common cause of wrong values.