From 5d73b728b4128171207b2b2a993a53bc8f04a1c4 Mon Sep 17 00:00:00 2001 From: Michael Ingraham <34340210+meingraham@users.noreply.github.com> Date: Mon, 14 Oct 2019 14:01:19 -0400 Subject: [PATCH] Updated MQTT (markdown) --- MQTT.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MQTT.md b/MQTT.md index 0b2c1671..866c029b 100644 --- a/MQTT.md +++ b/MQTT.md @@ -95,12 +95,14 @@ While most MQTT commands will result in a message in JSON format the power statu Telemetry data will be sent by prefix ```tele``` like ```tele/sonoff/SENSOR {"Time":"2017-02-16T10:13:52", "DS18B20":{"Temperature":20.6}}``` ## MQTT Topic definition -Until version 5.0.5 the MQTT topic was defined rigidly by using the commands ``Prefix`` and ``Topic`` resulting in a command topic string like ``cmnd/sonoff/Power``. +Until version 5.0.5, the MQTT topic was defined rigidly by using the commands ``Prefix`` and ``Topic`` resulting in a command topic string like ``cmnd/sonoff/Power``. -Starting with version 5.0.5 the MQTT topic is more flexible using command ``FullTopic`` and tokens to be placed within the user definable string up to 100 characters in size. The provided tokens are: +Starting with version 5.0.5, the MQTT topic is more flexible using command ``FullTopic`` and tokens to be placed within the user definable string up to 100 characters in size. The provided tokens are: - ``%prefix%`` to be dynamically substituted by one of three prefixes as defined by commands ``Prefix1`` (default: "cmnd"), ``Prefix2`` (default: "stat") and ``Prefix3`` (default: "tele"). - ``%topic%`` to be dynamically substituted by one of five topics as defined by commands ``Topic``, ``GroupTopic``, ``ButtonTopic``, ``SwitchTopic`` and ``MqttClient``. +If ``FullTopic`` does not contain `%topic%`, the device will not subscribe to ``GroupTopic`` and ``FallbackTopic``. + Using the tokens the following example topics can be made: - ``FullTopic %prefix%/%topic%/`` being the legacy situation up to version 5.0.5 - ``FullTopic tasmota/%topic%/%prefix%/``