Updated Scripting Language (markdown)

gemu 2019-09-17 08:17:45 +02:00
parent ce67bcceff
commit bdc96b24fc
1 changed files with 23 additions and 0 deletions

@ -100,6 +100,29 @@ Executed on restart. p vars are saved automatically after this call
>`>W`
The lines in this section are displayed in the web UI main page. Requires compiling with `#define USE_SCRIPT_WEB_DISPLAY`.
you may put any html code here. vars may be substituted by the usual %var%
html lines are put into the sensor section of the main page or if preceeded with a `@` on top of the page.
USER IO elements are put on top of the page
>additionally a WEB user interface may be generated: toggle button, check box, slider or text input.
> - **Button** bu(`<vn>` `<txt1>` `<txt2>`)
vn = name of variable to hold button state
txt1 = text of ON state of button
txt2 = text of OFF state of button
> - **Checkbox** ck(`<vn>` `<txt>`)
vn = name of variable to hold checkbox state
txt = label text
> - **Slider** sl(`<min>` `<max>` `<vn>` `<ltxt>` `<mtxt>` `<rtxt>`)
min = slider minimum value
max = slider maximum value
vn = name of variable to hold slider value
ltxt = label left of slider
mtxt = label middle of slider
rtxt = label right of slider
> - **Textinput** ck(`<vn>` `<txt>`)
vn = name of string variable to hold text state
txt = label text
>`>J`
The lines in this section are published via MQTT in a JSON payload on [TelePeriod](Commands#teleperiod). Requires compiling with `#define USE_SCRIPT_JSON_EXPORT `.