mirror of https://github.com/arendst/Tasmota.git
Updated MQTT (markdown)
parent
ce4f67dc43
commit
5d73b728b4
6
MQTT.md
6
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<x>`` 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<x>`` 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%/``
|
||||
|
|
Loading…
Reference in New Issue