From bdc96b24fc30e026a3ba5b7ea5705b2f9c177f46 Mon Sep 17 00:00:00 2001 From: gemu Date: Tue, 17 Sep 2019 08:17:45 +0200 Subject: [PATCH] Updated Scripting Language (markdown) --- Scripting-Language.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Scripting-Language.md b/Scripting-Language.md index 7b35c7a7..68e2bb45 100644 --- a/Scripting-Language.md +++ b/Scripting-Language.md @@ -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 = name of variable to hold button state + txt1 = text of ON state of button + txt2 = text of OFF state of button +> - **Checkbox** ck(`` ``) + vn = name of variable to hold checkbox state + txt = label text +> - **Slider** sl(`` `` `` `` `` ``) + 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 = 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 `.