mirror of https://github.com/arendst/Tasmota.git
Updated Scripting Language (markdown)
parent
884e20bd88
commit
985fa2d06c
|
@ -24,7 +24,7 @@ USE_SCRIPT_SUB_COMMAND | enables invoking named script subroutines via the Conso
|
||||||
USE_SCRIPT_HUE | enable `>H` section (Alexa Hue emulation)
|
USE_SCRIPT_HUE | enable `>H` section (Alexa Hue emulation)
|
||||||
USE_SCRIPT_STATUS | enable `>U` section (receive JSON payloads)
|
USE_SCRIPT_STATUS | enable `>U` section (receive JSON payloads)
|
||||||
SUPPORT_MQTT_EVENT | enables support for subscribe unsubscribe
|
SUPPORT_MQTT_EVENT | enables support for subscribe unsubscribe
|
||||||
USE_SENDMAIL | enables support for sending e-mail
|
USE_SENDMAIL | enables support for sending e-mail and enables the `>m` section
|
||||||
USE_SCRIPT_WEB_DISPLAY | enable `>W` section (modify web UI)
|
USE_SCRIPT_WEB_DISPLAY | enable `>W` section (modify web UI)
|
||||||
USE_TOUCH_BUTTONS | enable virtual touch button support with touch displays
|
USE_TOUCH_BUTTONS | enable virtual touch button support with touch displays
|
||||||
USE_WEBSEND_RESPONSE | enable receiving the response of a [`WebSend`](Commands#websend) command (received in section E)
|
USE_WEBSEND_RESPONSE | enable receiving the response of a [`WebSend`](Commands#websend) command (received in section E)
|
||||||
|
@ -343,7 +343,7 @@ if ((a==b) and ((c==d) or (c==e)) and (s!="x"))
|
||||||
|
|
||||||
**E-mail**
|
**E-mail**
|
||||||
`#define USE_SENDMAIL`
|
`#define USE_SENDMAIL`
|
||||||
Requires [Tasmota TLS](TLS) to be enabled and configured.
|
(this also enables TLS as sendmail uses SSL)
|
||||||
`sendmail [server:port:user:passwd:from:to:subject] msg`
|
`sendmail [server:port:user:passwd:from:to:subject] msg`
|
||||||
|
|
||||||
The following parameters can be specified during compilation via `#define` directives in `user_config_override.h`:
|
The following parameters can be specified during compilation via `#define` directives in `user_config_override.h`:
|
||||||
|
@ -356,9 +356,29 @@ The following parameters can be specified during compilation via `#define` direc
|
||||||
To use any of these values, pass an `*` as its corresponding argument placeholder. For example:
|
To use any of these values, pass an `*` as its corresponding argument placeholder. For example:
|
||||||
`sendmail [*:*:*:*:*:to:subject] msg`
|
`sendmail [*:*:*:*:*:to:subject] msg`
|
||||||
|
|
||||||
Example:
|
if msg is a `*` character you may specify the email body in the >m section (must end with an `#` character)
|
||||||
`sendmail [smtp.gmail.com:465:user:passwd:sender@gmail.com:rec@gmail.com:alarm] %string%`
|
|
||||||
|
|
||||||
|
Example:
|
||||||
|
\>D 25
|
||||||
|
day1=0
|
||||||
|
et=0
|
||||||
|
to="\<mrx@gmail.com\>"
|
||||||
|
|
||||||
|
\>T
|
||||||
|
et=ENERGY#Total
|
||||||
|
|
||||||
|
\>S
|
||||||
|
; send on midnight
|
||||||
|
day1=day
|
||||||
|
if chg[day1]>0
|
||||||
|
then
|
||||||
|
`=>sendmail [*:*:*:*:*:%to%:energy report]*`
|
||||||
|
endif
|
||||||
|
|
||||||
|
\>b
|
||||||
|
email report at %tstamp%
|
||||||
|
your power consumption today was %et% KWh
|
||||||
|
\#
|
||||||
|
|
||||||
**Subscribe, Unsubscribe**
|
**Subscribe, Unsubscribe**
|
||||||
`#define SUPPORT_MQTT_EVENT`
|
`#define SUPPORT_MQTT_EVENT`
|
||||||
|
|
Loading…
Reference in New Issue