Overview Block Switch universal

This control element is a simple button with the states on and off – for switching, as a push button or to send a fixed value. It adapts to the style of the block control elements and is therefore well suited to build your own control elements in block style together with the Block Frame. On request a PIN is asked for before switching.

Operation

Switch universal on the page
  1. Off / On: in the state on, background and font colour are swapped, the button looks pressed. The caption can change as well, e.g. “Off” and “On”, and so can the symbol.
  2. PIN: if a PIN is set up, the first tap opens the PIN prompt. After the correct entry the element can be switched; it stays unlocked until nobody has tapped it for 10 seconds.

What a tap does depends on the setup:

Short tap

Toggle Every tap toggles: if the element is on, it goes off, otherwise on.
Push button As long as the finger rests on the button it is on; when released it goes off again.
Value on Every tap switches on – switching off happens elsewhere, for instance by the device itself.
Push button (on only) Pressing switches on, the button looks pressed as long as the finger rests on it. Nothing is sent on releasing.

Long press

Toggle After holding for 1.5 seconds it toggles. A short tap does nothing – so nothing is switched by accident.
Push button After holding for 1.5 seconds the button goes on, when released off again.
Value on After holding for 1.5 seconds it switches on.
Push button (on only) After holding for 1.5 seconds it switches on, nothing is sent on releasing.

Note: a long press is not possible on every device – under Windows in tablet mode, for instance, the operating system handles a long press on the screen itself.



Setup

This section is meant for the installer of the system.

The control element works without a function block, the addresses are linked directly at the control element. When it counts as on is set by the parameter Switch pressed when, by default when the value of the address equals the parameter Value for on. This way, for instance, 0 and 100 can also be sent as off and on.

Colours and symbols always come from the active style. If you need your own colours, use the Universal switch.

Parameters

Display

Text off / Text on Caption in the state off or on, default “Off” and “On”. Its size scales with the element, a line break is inserted with \n.
Background / Font Only for elements from older projects that use their own colours instead of the style. In the state on they are swapped.

Function

Switch type
  • Toggle (default): if the value differs from Value for off, Value for off is sent, otherwise Value for on.
  • Push button (on/off): on pressing Value for on is sent, on releasing Value for off.
  • Value on (static): only Value for on is sent.
  • Push button (on only): on pressing Value for on is sent, nothing on releasing. The button only looks pressed as long as the finger rests on it.
Switch pressed when When the element is shown as on:
  • Value equals value on (default): the value of the address equals Value for on.
  • Value not equal to value off: the value of the address is not Value for off.
  • Value not equal to 0: the value of the address is not 0.
If Value for on is 1 and 10 comes back, for instance, the element only counts as on with the second or third option.
Type switch Short (default): the function acts on a tap. Long: the function only acts after holding for 1.5 seconds, see the table above.
Value for on Value for the state on, default 1.
Value for off Value for the state off, default 0.
PIN Optional, up to four digits. Empty (default): switching without prompt.

Graphic

Symbol on / Symbol off Optional. Symbol of the program, coloured like the text to match the style. Symbol off empty: the symbol for on is also shown in the state off. Both empty (default): no symbol.
Alignment hor. / Alignment vert. Position of the symbol: left, centred or right, or top, middle or bottom. Default left and middle, leaving room for the text.
Zoom Size of the symbol in percent of the element height or width (the smaller one counts), default 100 %.
OffsetX / OffsetY Moves the symbol by a share of the width or height of the element, default 0 %.

Frame

Frame See General properties of all control elements.

Address links

Switch Value for on and Value for off are sent here. Without this address a tap does nothing.
Status switch Optional. Feedback of the device, it determines the state shown. Not linked: the value of the address Switch applies.

See also General properties of all control elements.