Configuring MQTT Settings

Once enabled MQTT can be configured at Configuration → Configure MQTT.

FieldSizeDefault(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

MessageDescription
cmndDevices wishing to issue commands to the Sonoff device
statThe Sonoff device will report it's status using this message.
teleThe Sonoff device will report telemetry data using this message

MQTT Topics 

TopicPayload
cmnd/<DEVICE>/POWERON/OFF
stat/<DEVICE>/POWERON/OFF
tele/<DEVICE>/...


Reference

ReferenceURL
Sonoff-Tasmota MQTT Overviewhttps://github.com/arendst/Sonoff-Tasmota/wiki/MQTT-Overview



  • No labels