Expanded MQTT section to include embedded broker option, added new example and links

Balazs Keresztury 2018-10-23 01:17:50 +02:00
parent fb90cc5021
commit 3e8dc2a84d
1 changed files with 18 additions and 2 deletions

@ -21,7 +21,21 @@ In the examples shown the Sonoff-Tasmota parameters are set:
## MQTT broker
As Sonoff-Tasmota is MQTT based you will need to configure Home Assistant to [connect to an MQTT broker](https://home-assistant.io/components/mqtt/). You can use the following configuration to an MQTT server with the hostname ``domus1``.
As Sonoff-Tasmota is [MQTT](https://www.home-assistant.io/components/mqtt/) based you will need to configure Home Assistant to connect to an MQTT broker.
Home Assistant comes with an [embedded MQTT broker](https://www.home-assistant.io/docs/mqtt/broker#embedded-broker) which is easy to set up but you may want to opt for a [separate MQTT broker](https://www.home-assistant.io/docs/mqtt/broker#run-your-own) instead for better stability. A popular choice for this is the open-source [Eclipse Mosquitto](https://mosquitto.org/).
### Configure the embedded broker
```yaml
# Example configuration.yaml entry
mqtt:
password: hello
```
Default username is `homeassistant` while port defaults to `1883`.
### Configure an external broker
In the following configuration example an external MQTT server is used with the hostname ``domus1``:
```yaml
mqtt:
broker: domus1
@ -43,7 +57,9 @@ mqtt:
retain: false
```
Retained messages explanation: [video](https://youtube.com/watch?v=31IyfM1gygo)
The `retain` option plays an important role in persisting states over restarts and other disruptions. If you experience that states are out of sync you probably want to review your configuration.
An in depth explanation about MQTT `retain` is available [in this video](https://youtube.com/watch?v=31IyfM1gygo).
## Switch