Configuring MQTT Settings
Once enabled MQTT can be configured at Configuration → Configure MQTT.
Field | Size | Default(user_config.h) | Notes |
---|---|---|---|
Host name | 32 | MQTT_HOST=domus1 | URL or ip address. Note that without a special firmware build SSL is NOT supported. |
Port | uint | MQTT_PORT=1883 | 0-65535 |
Client Id | 32 | MQTT_CLIENT_ID=DVES_%06X | Unique ID of this device, should be unique for every device; logged by the MQTT server |
Username | 32 | MQTT_USER=DVES_USER | Username for MQTT server authentication |
Password | 32 | MQTT_PASS=DVES_PASS | Password for MQTT server authentication |
Topic | 32 | MQTT_TOPIC=sonoff | User friendly topic name; ususally describes the location or use of this device; used in the MQTT commands and responses; should be unique |
Full Topic | 100 | %prefix%/%topic% | Format string used to assemble the MQTT commands |
Message Types
Message | Description |
---|---|
cmnd | Devices wishing to issue commands to the Sonoff device |
stat | The Sonoff device will report it's status using this message. |
tele | The Sonoff device will report telemetry data using this message |
MQTT Topics
Topic | Payload |
---|---|
cmnd/<DEVICE>/POWER | ON/OFF |
stat/<DEVICE>/POWER | ON/OFF |
tele/<DEVICE>/ | ... |
Reference
Reference | URL |
---|---|
Sonoff-Tasmota MQTT Overview | https://github.com/arendst/Sonoff-Tasmota/wiki/MQTT-Overview |