Web UI

Michael Ingraham 2019-09-17 09:33:28 -04:00
parent 8a6800eab8
commit 9aaf60c4b4
1 changed files with 26 additions and 24 deletions

@ -100,35 +100,37 @@ Executed on restart. p vars are saved automatically after this call
>`>W` >`>W`
The lines in this section are displayed in the web UI main page. Requires compiling with `#define USE_SCRIPT_WEB_DISPLAY`. 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. > You may put any html code here.
USER IO elements are put on top of the page >- Variables may be substituted using %var%
>- HTML statements are displayed in the sensor section of the main page
>- HTML statements preceded with a `@` are displayed at the top of the page
>additionally a WEB user interface may be generated: toggle button, check box, slider or text input. >- USER IO elements are displayed at the top of the page
> - **Button** bu(`<vn>` `<txt1>` `<txt2>`) >
vn = name of variable to hold button state >A web user interface may be generated containing any of the following elements: toggle button, check box, slider, or text input.
txt1 = text of ON state of button >- **Button:** `bu(<vn> <txt1> <txt2>)`
txt2 = text of OFF state of button `<vn>` = name of variable to hold button state
> - **Checkbox** ck(`<vn>` `<txt>`) `<txt1>` = text of ON state of button
vn = name of variable to hold checkbox state `<txt2>` = text of OFF state of button
txt = label text >- **Checkbox:** `ck(<vn> <txt>)`
> - **Slider** sl(`<min>` `<max>` `<vn>` `<ltxt>` `<mtxt>` `<rtxt>`) `<vn>` = name of variable to hold checkbox state
min = slider minimum value `<txt>` = label text
max = slider maximum value >- **Slider:** `sl(<min> <max> <vn> <ltxt> <mtxt> <rtxt>)`
vn = name of variable to hold slider value `<min>` = slider minimum value
ltxt = label left of slider `<max>` = slider maximum value
mtxt = label middle of slider `<vn>` = name of variable to hold slider value
rtxt = label right of slider `<ltxt>` = label left of slider
> - **Textinput** ck(`<vn>` `<txt>`) `<mtxt>` = label middle of slider
vn = name of string variable to hold text state `<rtxt>` = label right of slider
txt = label text >- **Text Input:** `tx(<vn> <txt>)`
`<vn>` = name of string variable to hold text state
`<txt>` = label text
>`>J` >`>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 `. 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 `.
>`>M` >`>M`
[Smart Meter Interface](smart-meter-interface). [Smart Meter Interface](smart-meter-interface)
If a variable does not exist, `???` is displayed for commands If a variable does not exist, `???` is displayed for commands