diff --git a/Scripting-Language.md b/Scripting-Language.md index 94fbf474..018fe8a1 100644 --- a/Scripting-Language.md +++ b/Scripting-Language.md @@ -18,16 +18,17 @@ These features are enabled by adding the following `#define` compiler directive | Feature | Description | | -- | -- | -USE_WEBSEND_RESPONSE | enable receiving the response of a [`WebSend`](Commands#websend) command (received in section E) +USE_BUTTON_EVENT | enable `>b` section (detect button state changes) USE_SCRIPT_JSON_EXPORT | enable `>J` section (publish JSON payload on [TelePeriod](Commands#teleperiod)) -USE_SCRIPT_WEB_DISPLAY | enable `>W` section (modify web UI) USE_SCRIPT_SUB_COMMAND | enables invoking named script subroutines via the Console or MQTT USE_SCRIPT_HUE | enable `>H` section (Alexa Hue emulation) USE_SCRIPT_STATUS | enable `>U` section (receive JSON payloads) -USE_BUTTON_EVENT | enable `>b` section (detect button state changes) SUPPORT_MQTT_EVENT | enables support for subscribe unsubscribe -SCRIPT_STRIP_COMMENTS | enables stripping comments when attempting to paste a script that is too large to fit +USE_SENDMAIL | enables support for sending e-mail +USE_SCRIPT_WEB_DISPLAY | enable `>W` section (modify web UI) 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) +SCRIPT_STRIP_COMMENTS | enables stripping comments when attempting to paste a script that is too large to fit USE_24C256 | enables use of 24C256 I2C EEPROM to expand script buffer (defaults to 4k) USE_SCRIPT_FATFS | enables SD card support (on SPI bus). Specify the CS pin number. Also enables 4k script buffer USE_SCRIPT_FATFS_EXT | enables additional FS commands @@ -339,7 +340,30 @@ Conditional expressions may be enclosed in parentheses. The statement must be on ``` if ((a==b) and ((c==d) or (c==e)) and (s!="x")) ``` - + +**E-mail** +`#define USE_SENDMAIL` +Requires [Tasmota TLS](TLS) to be enabled and configured. +`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`: +* `EMAIL_SERVER` +* `EMAIL_PORT` +* `EMAIL_USER` +* `EMAIL_PASSWORD` +* `EMAIL_FROM` + +To use any of these values, pass an `*` as its corresponding argument placeholder. For example: +`sendmail [*:*:*:*:*:to:subject] msg` + +Example: +`sendmail [smtp.gmail.com:465:user:passwd:sender@gmail.com:rec@gmail.com:alarm] %string%` + + +**Subscribe, Unsubscribe** +`#define SUPPORT_MQTT_EVENT` +`subscribe` and `unsubscribe` commands are supported. In contrast to rules, no event is generated but the event name specifies a variable defined in `>D` section and this variable is automatically set on transmission of the subscribed item + **SD Card Support** (+ 10k flash) `#define USE_SCRIPT_FATFS` `CARD_CS` `CARD_CS` = GPIO of card chip select @@ -369,7 +393,3 @@ Shows a web SD card directory (submenu of scripter) where you can upload and dow `frd("fname")` remove directory fname `fx("fname")` check if file fname exists `fe("fname")` execute script fname (max 2048 bytes, script must start with the '>' character on the first line) - -**Subscribe, Unsubscribe** -`#define SUPPORT_MQTT_EVENT` -`subscribe` and `unsubscribe` commands are supported. In contrast to rules, no event is generated but the event name specifies a variable defined in `>D` section and this variable is automatically set on transmission of the subscribed item \ No newline at end of file