quad.shutter
Device shutter
Parameters
{{ quad.shutter(id, linetext, item_move, item_stop, item_pos, item_shift, item_angle, item_saved, min, max, step, mode, background, value_pos_1, value_pos_2, move_on_longpress, live, item_uzsu, uzsu_attribs, item_plot, icon_plot, item_auto, extpopup, linetext_widget, indicator, column_order) }}
id
unique id for this widget
linetext
text for the whole line
item_move
an item for the up and down movement (optional, value_top/value_bottom will be sent to item_pos if omitted). Long press results in moving, short press in stopping - if not defined otherwise with the parameter "move_on_longpress"
item_stop
an item for stopping the movement (optional)
item_pos
an item for the absolute position of the blinds
item_shift
an item for increase and decrease of the blade (optional, for future use)
item_angle
an item for the absolute angle of the blade (optional)
item_saved
an item for some saved positions (optional)
min
the value for opened (optional, default 0)
max
the value for closed (optional, default 255)
step
step between two values (optional, default 5)
mode
'half' blade turns from -1 to +1, 'full' blade turns from 0 to +1 (optional, default 'half')
background
a background image url (relative to smartVISU directory or absolute); optimal size is 100px x 180px (optional)
value_pos_1
the value to send for position 1 (optional, default 0)
value_pos_2
the value to send for position 2 (optional, default 1)
move_on_longpress
Move on long press and stop on short press on up/down buttons
live
'live mode': if enabled, values will be sent during sliding. '0' sends values only when sliding is stopped, after click into track or if value is edited in input field. (optional, default = 1)
item_uzsu
a gad/item for UZSU
uzsu_attribs
Array with standard UZSU parameters: pic_on, pic_off, valueType, valueParameterList, color_on, color_off. (optional)
item_plot
array with all plot.period attributes to show a plot in popup. Alternatively just the item to be plotted.
icon_plot
icon triggering the plot popup
item_auto
"root item" which holds stateengine information. show current state of stateengine/stateengine item. Adjust icons and states below accordingly
extpopup
Array of arrays for extended popup window. Use this to create an icon to open a popup with switches, sliders, flips or select menues.
First entry can either be "stateengine" to make the stateengine plugin icon the trigger for the popup or an icon (e.g. time_automatic).
After that you have to create an array for each line of the popup. In this array you first define the elements like switch, text, etc.,
followed by the attributes for each element as you would for the basic widget.
Possible elements are: header, text, slider, flip, switch, select
Example: ['stateengine', ['header', 'Suspendzeit'], [['switch', 'slider'], [switch_item, 'icon', [0,1], ['secur_open','secur_locked']],
[slider_item, slider_min, slider_max, slider_step, '', 'handle']]
linetext_widget
Widget(s) to be shown right after linetext. Can be used to show a countdown or other additional information. Example: basic.symbol('', 'licht.og.essen.sa') - don't put basic.symbol() in high commas! (optional)
indicator
activity indicator which is active until response (or a timeout is reached); pass either a color, icon class, 'blink' or 'simulate'. Timeout is 3s by default and can be set globally using the configuration key "indicator_duration". Add a colon and integer number to specify an individual timeout, e.g. 'blink:15' (optional)
You can also set an indicator icon, text and color by passing these as additional parameters in the icon, text and color arrays. Just provide one icon more than you have values to switch. A dynamic icon can be used also along with the 'simulate' option.
The indicator options will not be applied to the select element of type 'menu' which will convert all options to 'blink'.
column_order
array with element description: Reorder elements to your liking (esp. relevant for smartphones as several columns might be too much)
possible elements are: 'move_down', 'move_up', 'stop', 'pos_slider', 'pos_shutter', 'pos_shutter_ext' (with the two saved positions), 'pos_popup_shutter', 'pos_popup_blind', 'pos1', 'pos2', 'stateengine', 'uzsu', 'plot', 'extpopup'
For empty columns either use ' ' or a number to define the column width (e.g. '40' = 40 pixels width)
Combine elements in one column by putting them in arrays. Standard is [['move_down', 'move_up'], 'pos_popup_shutter', 'stateengine', 'plot', 'uzsu']
Example
['extpopup', 'pos_shutter_ext']
{{ quad.shutter('shutter1', 'Shutter with picture', 'shutter.lz', 'shutter.kz', 'shutter.hoehe', 'shutter.kz', 'shutter.lamellen', 'shutter.hoehe', 0, 100, 1, 'full', '', 50, 80, '', '', 'shutter.hoehe.zeitschalter', '', 'shutter.hoehe', '', 'shutter.automatik', ['edit_favorites.svg', ['switch', ['item1.lock', 'icon', [0,1], ['secur_open.svg','secur_locked.svg']]], ['flip', ['item1.flip', 'on', 'off', '0', '1']] ], 'place3', 'place4', ['extpopup', 'pos_shutter_ext']) }}
-
No column order defined. Due to setting the last parameter to false, a short press on move icons moves the blind immediately up/down, otherwise only a long press will move the blind.
{{ quad.shutter('shutter2', 'Shutter, Standard', 'shutter.lz', 'shutter.kz', 'shutter.hoehe', 'shutter.kz', 'shutter.lamellen', 'shutter.hoehe', 0, 100, 1, 'full', '', 50, 80, false) }}
Author: Niko Will, Onkel Andy