mirror of https://github.com/arendst/Tasmota.git
Formatting
parent
b6e7bf4f11
commit
5632d4c861
|
@ -45,7 +45,7 @@ Once enabled MQTT can be configured at Configuration -> Configure MQTT.
|
|||
|Client Id|32|MQTT_CLIENT_ID=DVES_%06X|FallBack topic of this device, will 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
|
||||
|Topic|32|MQTT_TOPIC=sonoff|User friendly topic name; usually 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
|
||||
|===
|
||||
|
||||
|
@ -59,19 +59,14 @@ Note: By default firmware will search for an MQTT broker using mDNS by searching
|
|||
|
||||
### General
|
||||
|
||||
See the wiki's https://github.com/arendst/Sonoff-Tasmota/wiki/Commands[command list]
|
||||
for the definitive list of operations that you can perform. The first word in the column marked
|
||||
`Command` is the text that
|
||||
you need to put at the end of a `cmnd` string when you issue a publication message. The 2nd word
|
||||
is the contents of the payload. If there is no 2nd word, you
|
||||
can simply send an empty payload. For example, the first line on the Commands page reads
|
||||
See the wiki's https://github.com/arendst/Sonoff-Tasmota/wiki/Commands[command list] for the definitive list of operations that you can perform. The first word in the column marked `Command` is the text that you need to put at the end of a `cmnd` string when you issue a publication message. The second word is the contents of the payload. If there is no second word, you can simply send an empty payload. For example:
|
||||
|
||||
[options="header"]
|
||||
|===
|
||||
|Command|Version|Description
|
||||
|Power | | Show current power state as On or Off
|
||||
|Power on | | Turn power On
|
||||
|Power off | | Turn power Off
|
||||
|Command | Description
|
||||
|Power | Show current power state as On or Off
|
||||
|Power on | Turn power On
|
||||
|Power off | Turn power Off
|
||||
|===
|
||||
|
||||
To execute these, issue (publish) these MQTT requests
|
||||
|
@ -92,7 +87,7 @@ If you have subscribed to these `stat` messages, you can be informed of changes
|
|||
|
||||
|
||||
#### Connecting to MQTT
|
||||
You'll need an MQTT server somewhere to communicate with your Sonoff. Some people use publicly available servers, such as iot.eclipse.org. There's a list at http://moxd.io/2015/10/public-mqtt-brokers/
|
||||
You'll need an MQTT server somewhere to communicate with your Sonoff. Some people use publicly available servers, such as iot.eclipse.org. http://moxd.io/2015/10/public-mqtt-brokers/[List of brokers]
|
||||
|
||||
Other people think the MQTT server should reside inside your private LAN. You could use a Raspberry/Orange Pi, or just about any Linux machine as the server/broker; you might even squeeze it into your router if you're using OpenWRT.
|
||||
|
||||
|
@ -103,7 +98,9 @@ At the time the sonoff connects with the MQTT server, the sonoff subscribes to +
|
|||
|
||||
|
||||
#### Creating your own MQTT server/broker
|
||||
See these sites: https://www.digitalocean.com/community/questions/how-to-setup-a-mosquitto-mqtt-server-and-receive-data-from-owntracks[Rufio howto] +
|
||||
See these sites:
|
||||
|
||||
https://www.digitalocean.com/community/questions/how-to-setup-a-mosquitto-mqtt-server-and-receive-data-from-owntracks[Rufio howto] +
|
||||
http://wingsquare.com/blog/setting-up-mqtt-mosquitto-broker-in-ubuntu-linux/[Wingsquare howto] +
|
||||
http://www.instructables.com/id/Installing-MQTT-BrokerMosquitto-on-Raspberry-Pi/[Instructables howto on Raspberry Pi]
|
||||
|
||||
|
@ -295,7 +292,7 @@ That's not covered in this how-to.
|
|||
### CONNECT FAILED
|
||||
MQTT: CONNECT FAILED x.x.x.x:x, rc {code}. Retry in 10 seconds
|
||||
|
||||
Status codes are mapped here http://pubsubclient.knolleary.net/api.html#state
|
||||
## http://pubsubclient.knolleary.net/api.html#state[Status codes]
|
||||
|
||||
-4: MQTT_CONNECTION_TIMEOUT - the server didn't respond within the keepalive time
|
||||
-3: MQTT_CONNECTION_LOST - the network connection was broken
|
||||
|
@ -308,5 +305,4 @@ Status codes are mapped here http://pubsubclient.knolleary.net/api.html#state
|
|||
4: MQTT_CONNECT_BAD_CREDENTIALS - the username/password were rejected
|
||||
5: MQTT_CONNECT_UNAUTHORIZED - the client was not authorized to connect
|
||||
|
||||
### Sniffer App on Android
|
||||
https://play.google.com/store/apps/details?id=mqttsnooper.mqttsnooper
|
||||
## https://play.google.com/store/apps/details?id=mqttsnooper.mqttsnooper[Sniffer App on Android]
|
||||
|
|
Loading…
Reference in New Issue