Revert c4c20a898677e719f5b9b894c9f79bb265d42a1f...d69e4aab07c4bd165558698250024a1ceccdfc06 on Commands

Michael Ingraham 2019-07-27 11:40:06 -04:00
parent 7a5e6cc98f
commit e986f63bbd
1 changed files with 27 additions and 28 deletions

@ -159,11 +159,11 @@ WebLog|`0` = disable web logging<BR> `1` = show only error messages<BR> `2` = sh
### [Wi-Fi](Troubleshooting#Wi-Fi-issues-arduino-core-versions-and-espressif-sdk)
<a id="tb-wifi">Command | Parameters
:--- | :---
|<a id="tb-wifi">Command | Parameters
|:--- | :---
AP|<a id="AP"></a>`0` = switch to other Wi-Fi Access Point<BR>`1`= select Wi-Fi Access Point 1<BR>`2`= select Wi-Fi Access Point 2<a id="Hostname"></a>
Hostname|`1` = reset hostname to `MQTT_TOPIC-<4digits>` and restart<BR>`<value>` = set hostname (32 char limit) and restart. If hostname contains `%` it will be reset to the default instead.<a id="IPAddress1"></a>
IPAddress1|`0.0.0.0` = use dynamic IP address (DHCP)<BR>`XXX.XXX.XXX.XXX` = set static IP address<a id="IPAddress2"></a>
IPAddress1|`0.0.0.0.` = use dynamic IP address (DHCP)<BR>`XXX.XXX.XXX.XXX` = set static IP address<a id="IPAddress2"></a>
IPAddress2|`XXX.XXX.XXX.XXX` = set gateway IP address<a id="IPAddress3"></a>
IPAddress3|`XXX.XXX.XXX.XXX` = set subnet mask<a id="IPAddress4"></a>
IPAddress4|`XXX.XXX.XXX.XXX` = set DNS server IP address<BR>*follow IPAddress commands with `restart 1` to apply changes*<a id="Password"></a>
@ -181,34 +181,33 @@ See also | [`SetOption55`](#Setoption55) - mDNS service control<BR>[`SetOption
<a id="tb-mqtt">Command | Parameters
:--- | :---
<a id="ButtonRetain"></a>
ButtonRetain|Show MQTT button retain state<BR>`0` = disable use of MQTT retain flag *(default)*<BR>`1` = enable MQTT retain flag on button press<a id="ButtonTopic"></a>
ButtonTopic|Show MQTT button topic state<BR>`<value>` = set MQTT button topic (32 chars max)<BR>`0` = disable use of MQTT button topic<BR>`1` = set MQTT button topic to device `%topic%`<BR>`2` = reset MQTT button topic to firmware default (`MQTT_BUTTON_TOPIC`) _(default = `0`)_<a id="FullTopic"></a>
FullTopic|Show MQTT full topic<BR>`1` = reset MQTT fulltopic to firmware default (`MQTT_FULLTOPIC`) and restart<BR>`<value>` = set MQTT fulltopic (100 chars max) using optional %topic% and %prefix% and restart<a id="GroupTopic"></a>
GroupTopic|Show MQTT group topic<BR>`1` = reset MQTT group topic to firmware default (`MQTT_GRPTOPIC`) and restart<BR>`<value>` = set MQTT group topic (32 chars max) and restart<a id="MqttClient"></a>
MqttClient|Show MQTT client, the device ID<BR>`1` = reset MQTT client to firmware config (`MQTT_CLIENT_ID`) and restart<BR>`<value>` = set MQTT client (32 chars max) and restart.<BR>You can use wildcard `%06X` to replace with last six characters of MAC address.<a id="MqttFingerprint"></a>
ButtonRetain|<a id="ButtonRetain"></a>`0` = disable use of MQTT retain flag *(default)*<BR>`1` = enable MQTT retain flag on button press<a id="ButtonTopic"></a>
ButtonTopic|`<value>` = set MQTT button topic (32 chars max)<BR>`0` = disable use of MQTT button topic<BR>`1` = set MQTT button topic to device `%topic%`<BR>`2` = reset MQTT button topic to firmware default (`MQTT_BUTTON_TOPIC`) _(default = `0`)_<a id="FullTopic"></a>
FullTopic|`1` = reset MQTT fulltopic to firmware default (`MQTT_FULLTOPIC`) and restart<BR>`<value>` = set MQTT fulltopic (100 chars max) using optional %topic% and %prefix% and restart<a id="GroupTopic"></a>
GroupTopic|`1` = reset MQTT group topic to firmware default (`MQTT_GRPTOPIC`) and restart<BR>`<value>` = set MQTT group topic (32 chars max) and restart<a id="MqttClient"></a>
MqttClient|`1` = reset MQTT client to firmware config (`MQTT_CLIENT_ID`) and restart<BR>`<value>` = set MQTT client (32 chars max) and restart.<BR>You can use wildcard `%06X` to replace with last six characters of MAC address.<a id="MqttFingerprint"></a>
MqttFingerprint | *TLS needs to be enabled in firmware for this command*<BR>`<value>` = set current fingerprint as 20 space separated bytes (59 chars max)<a id="MqttHost"></a>
MqttHost|Show MQTT Host address<BR>`0` = clear MQTT host field and allow mDNS to find MQTT host<BR>`1` = reset MQTT host to firmware default (`MQTT_HOST`) and restart<BR>`<value>` = set MQTT host (32 chars max) and restart<a id="MqttPassword"></a>
MqttPassword|Won't show actual password<BR>`0` = clear MQTT password<BR>`1` = reset MQTT password to firmware default (`MQTT_PASS`) and restart<BR>`<value>` = set MQTT password (32 chars max) and restart<a id="MqttPort"></a>
MqttPort|Show MQTT TCIP port<BR>`1` = reset MQTT port to firmware default (`MQTT_PORT`) and restart<BR>`<value>` = set MQTT port between 2 and 32766 and restart<a id="MqttRetry"></a>
MqttRetry|Show MQTT retry timer<BR>`10..32000` = set MQTT connection retry timer in seconds *(default = `10`)*<a id="MqttUser"></a>
MqttUser|Shows Mqtt user name<BR>`0` = clear MQTT user name<BR>`1` = reset MQTT user name to firmware default (`MQTT_USER`) and restart<BR>`<value>` = set MQTT user name (32 chars max) and restart<a id="PowerRetain"></a>
PowerRetain |Shows Mqtt power retain state<BR> MQTT [power retain state](PowerOnState-Configuration#side-effects-with-using-mqtt-messages)<BR> `0` / `off` = disable MQTT power retain on status update *(default)* <BR> `1` / `on` = enable MQTT power retain on status update <BR><a id="Prefix1"></a>
Prefix1|Show MQTT command subscription prefix 1<BR>`1` = reset MQTT command subscription prefix to firmware default (`SUB_PREFIX`) and restart<BR>`<value>` = set MQTT command subscription prefix (10 chars max) and restart<a id="Prefix2"></a>
Prefix2|Show MQTT command subscription prefix 2<BR>`1` = reset MQTT status prefix to firmware default (`PUB_PREFIX`) and restart<BR>`<value>` = set MQTT status prefix (10 chars max) and restart<a id="Prefix3"></a>
Prefix3|Show MQTT command subscription prefix 3<BR>`1` = Reset MQTT telemetry prefix to firmware default (`PUB_PREFIX2`) and restart<BR>`<value>` = set MQTT telemetry prefix (10 chars max) and restart<a id="Publish"></a>
MqttHost|`0` = clear MQTT host field and allow mDNS to find MQTT host<BR>`1` = reset MQTT host to firmware default (`MQTT_HOST`) and restart<BR>`<value>` = set MQTT host (32 chars max) and restart<a id="MqttPassword"></a>
MqttPassword|`0` = clear MQTT password<BR>`1` = reset MQTT password to firmware default (`MQTT_PASS`) and restart<BR>`<value>` = set MQTT password (32 chars max) and restart<a id="MqttPort"></a>
MqttPort|`1` = reset MQTT port to firmware default (`MQTT_PORT`) and restart<BR>`<value>` = set MQTT port between 2 and 32766 and restart<a id="MqttRetry"></a>
MqttRetry|`10..32000` = set MQTT connection retry timer in seconds *(default = `10`)*<a id="MqttUser"></a>
MqttUser|`0` = clear MQTT user name<BR>`1` = reset MQTT user name to firmware default (`MQTT_USER`) and restart<BR>`<value>` = set MQTT user name (32 chars max) and restart<a id="PowerRetain"></a>
PowerRetain | MQTT [power retain state](PowerOnState-Configuration#side-effects-with-using-mqtt-messages)<BR> `0` / `off` = disable MQTT power retain on status update *(default)* <BR> `1` / `on` = enable MQTT power retain on status update <BR><a id="Prefix1"></a>
Prefix1|`1` = reset MQTT command subscription prefix to firmware default (`SUB_PREFIX`) and restart<BR>`<value>` = set MQTT command subscription prefix (10 chars max) and restart<a id="Prefix2"></a>
Prefix2|`1` = reset MQTT status prefix to firmware default (`PUB_PREFIX`) and restart<BR>`<value>` = set MQTT status prefix (10 chars max) and restart<a id="Prefix3"></a>
Prefix3|`1` = Reset MQTT telemetry prefix to firmware default (`PUB_PREFIX2`) and restart<BR>`<value>` = set MQTT telemetry prefix (10 chars max) and restart<a id="Publish"></a>
Publish|`<topic> <payload>` = MQTT publish any topic and optional payload<a id="Publish2"></a>
Publish2|`<topic> <payload>` = MQTT publish any topic and optional payload with retain flag<a id="SensorRetain"></a>
SensorRetain|Show current sensor retain flag status<BR>`0` = disable use of sensor MQTT retain flag *(default)*<BR>`1` = enable MQTT retain flag on message `tele/%topic%/SENSOR`<a id="StateText1"></a>
StateText1|Show `OFF` state text value<BR>`<value>` = set `OFF` state text (10 chars max)<a id="StateText2"></a>
StateText2|Show `ON` state text<BR>`<value>` = set `ON` state text (10 chars max)<a id="StateText3"></a>
StateText3|Show `TOGGLE`state text value<BR>`<value>` = set `TOGGLE` state text (10 chars max)<a id="StateText4"></a>
StateText4|Show `HOLD` state text value<BR>`<value>` = set `HOLD` state text (10 chars max)<a id="SwitchRetain"></a>
SwitchRetain|Show current switch retain flag status<BR>`0` = disable use of MQTT retain flag *(default)*<BR>`1` = enable MQTT retain flag on switch press<a id="Subscribe"></a>
Subscribe|List all topics currently subscribed, if any<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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`Rule1 ON Event#BkLight=ON DO <command>ENDON`</li><li>`Subscribe DnTemp, stat/%topic%/SENSOR, DS18B20.Temperature`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;where the MQTT message payload is `{"Time":"2017-02-16T10:13:52", "DS18B20":{"Temperature":20.6}}`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`Rule1 ON Event#DnTemp>=21 DO <command> ENDON`</li><a id="SwitchTopic"></a>
SwitchTopic|Show switch topic <BR>`<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<a id="TelePeriod"></a>
TelePeriod|Show duration between two publications of sensors status<BR>`0` = disable telemetry messages<BR>`1` = reset telemetry period to firmware default (`TELE_PERIOD`)<BR>`10..3600` = set telemetry period in seconds *(default = `300`)*<a id="Topic"></a>
Topic|Show MQTT topic<BR>`1` = reset MQTT topic to firmware default (`MQTT_TOPIC`) and restart<BR>`<value>` = set MQTT topic (32 chars max) **and** `ButtonTopic` and restart<a id="Unsubscribe"></a>
SensorRetain|`0` = disable use of sensor MQTT retain flag *(default)*<BR>`1` = enable MQTT retain flag on message `tele/%topic%/SENSOR`<a id="StateText1"></a>
StateText1|`<value>` = set `OFF` state text (10 chars max)<a id="StateText2"></a>
StateText2|`<value>` = set `ON` state text (10 chars max)<a id="StateText3"></a>
StateText3|`<value>` = set `TOGGLE` state text (10 chars max)<a id="StateText4"></a>
StateText4|`<value>` = set `HOLD` state text (10 chars max)<a id="SwitchRetain"></a>
SwitchRetain|`0` = disable use of MQTT retain flag *(default)*<BR>`1` = enable MQTT retain flag on switch press<a id="Subscribe"></a>
Subscribe|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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`Rule1 ON Event#BkLight=ON DO <command>ENDON`</li><li>`Subscribe DnTemp, stat/%topic%/SENSOR, DS18B20.Temperature`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;where the MQTT message payload is `{"Time":"2017-02-16T10:13:52", "DS18B20":{"Temperature":20.6}}`<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`Rule1 ON Event#DnTemp>=21 DO <command> ENDON`</li><a id="SwitchTopic"></a>
SwitchTopic|`<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<a id="TelePeriod"></a>
TelePeriod|`0` = disable telemetry messages<BR>`1` = reset telemetry period to firmware default (`TELE_PERIOD`)<BR>`10..3600` = set telemetry period in seconds *(default = `300`)*<a id="Topic"></a>
Topic|`1` = reset MQTT topic to firmware default (`MQTT_TOPIC`) and restart<BR>`<value>` = set MQTT topic (32 chars max) **and** `ButtonTopic` and restart<a id="Unsubscribe"></a>
Unsubscribe|Unsubscribe from all topics currently subscribed using the [`Subscribe`](#subscribe) command<BR>`<eventName>` = unsubscribe from a specific MQTT topic<BR><BR>You must compile your own binary with `#define SUPPORT_MQTT_EVENT` in your `user_config_override.h` file.
See also | [`SetOption2`](#setoption2) - Add units to status messages<BR>[`SetOption4`](#setoption4) - Return MQTT response as RESULT or %COMMAND% topic<BR>[`SetOption10`](#setoption10) - Main topic change behaviour