mirror of https://github.com/arendst/Tasmota.git
Updated Commands (markdown)
parent
eb02e96eed
commit
5dfbf88bef
|
@ -213,7 +213,7 @@ StateText2<a id="StateText2"></a>|`<value>` = set `ON` state text (10 chars max)
|
|||
StateText3<a id="StateText3"></a>|`<value>` = set `TOGGLE` state text (10 chars max)
|
||||
StateText4<a id="StateText4"></a>|`<value>` = set `HOLD` state text (10 chars max)
|
||||
SwitchRetain<a id="SwitchRetain"></a>|`0` = disable use of MQTT retain flag *(default)*<BR>`1` = enable MQTT retain flag on switch press
|
||||
Subscribe<a id="Subscribe"></a>|List all topics currently subscribed<BR>`<eventName>, <mqttTopic> [, <key>]`<BR>The `<key>` parameter is optional. It is specified to parse a key/value pair from a JSON payload in the MQTT message. In order to parse a value from a multi-level JSON pair, you can use one dot (`.`) syntax to split the key into sections.<BR><BR>Subscribes to an MQTT topic and assigns an [`Event`](#event) name to it. You must compile your own binary with `#define SUPPORT_MQTT_EVENT` in your `user_config_override.h` file.<BR><BR>**Examples:**<li>`Subscribe BkLight, stat/%topic%/POWER`<BR> `Rule1 ON Event#BkLight=ON DO <command>ENDON`</li><li>`Subscribe DnTemp, stat/%topic%/SENSOR, DS18B20.Temperature`<BR> where the MQTT message payload is `{"Time":"2017-02-16T10:13:52", "DS18B20":{"Temperature":20.6}}`<BR> `Rule1 ON Event#DnTemp>=21 DO <command> ENDON`</li>
|
||||
Subscribe<a id="Subscribe"></a>|List all topics currently subscribed<BR>`<eventName>, <mqttTopic> [, <key>]`<BR>The `<key>` parameter is optional. It is specified to parse a key/value pair from a JSON payload in the MQTT message. In order to parse a value from a multi-level JSON pair, you can use one dot (`.`) syntax to split the key into sections.<BR><BR>Subscribes to an MQTT topic and assigns an [`Event`](#event) name to it. You must compile your own binary with `#define SUPPORT_MQTT_EVENT` in your `user_config_override.h` file.<BR><BR>**Examples:**<li>`Rule1`<BR> `ON System#Boot DO Subscribe BkLight, stat/%topic%/POWER ENDON`<BR> `ON Event#BkLight=ON DO <command> ENDON`</li><li>`Rule1`<BR> `ON System#Boot DO Subscribe DnTemp, stat/%topic%/SENSOR, DS18B20.Temperature ENDON`<BR> `ON Event#DnTemp>=21 DO <command> ENDON`<BR> where the MQTT message payload is `{"Time":"2017-02-16T10:13:52", "DS18B20":{"Temperature":20.6}}`</li>
|
||||
SwitchTopic<a id="SwitchTopic"></a>|`<value>` = set MQTT switch topic (32 chars max)<BR>`0` = disable use of MQTT switch topic<BR>`1` = set MQTT switch topic to device `%topic%`<BR>`2` = reset MQTT switch topic to firmware default (`MQTT_SWITCH_TOPIC`) _(default = `0`)_<BR>[Read more](Buttons-and-switches) about this
|
||||
TelePeriod<a id="TelePeriod"></a>|`0` = disable telemetry messages<BR>`1` = reset telemetry period to firmware default (`TELE_PERIOD`)<BR>`10..3600` = set telemetry period in seconds *(default = `300`)*
|
||||
Topic<a id="Topic"></a>|`1` = reset MQTT topic to firmware default (`MQTT_TOPIC`) and restart<BR>`<value>` = set MQTT topic (32 chars max) **and** `ButtonTopic` and restart
|
||||
|
|
Loading…
Reference in New Issue