Skip to content

Commit 263db7b

Browse files
DubhAdfabaff
authored andcommitted
Update MQTT broker docs for clarity (home-assistant#3573)
* Update MQTT broker docs for clarity Adding words to note that the reason a "run your own" broker is the most private is because the embedded broker doesn't support TLS/SSL. Also updating to use the new configuration tags. * Update to reference hbmqtt supporting TLS
1 parent 5985eee commit 263db7b

File tree

1 file changed

+50
-18
lines changed

1 file changed

+50
-18
lines changed

source/_docs/mqtt/broker.markdown

Lines changed: 50 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ The MQTT component needs you to run an MQTT broker for Home Assistant to connect
1717

1818
Home Assistant contains an embedded MQTT broker. If no broker configuration is given, the [HBMQTT broker](https://pypi.python.org/pypi/hbmqtt) is started and Home Assistant connects to it. Embedded broker default configuration:
1919

20-
| Setting | Value |
21-
| ------- | ----- |
22-
| Host | localhost
23-
| Port | 1883
24-
| Protocol | 3.1.1
25-
| User | homeassistant
26-
| Password | Your API [password](/components/http/)
20+
| Setting | Value |
21+
| -------------- | ----- |
22+
| Host | localhost
23+
| Port | 1883
24+
| Protocol | 3.1.1
25+
| User | homeassistant
26+
| Password | Your API [password](/components/http/)
2727
| Websocket port | 8080
2828

2929
```yaml
@@ -51,7 +51,7 @@ mqtt:
5151

5252
### {% linkable_title Run your own %}
5353

54-
This is the most private option but requires a bit more work. There are multiple free and open-source brokers to pick from: eg. [Mosquitto](http://mosquitto.org/), [EMQ](http://emqtt.io/), or [Mosca](http://www.mosca.io/).
54+
Along with the embedded broker this is the most private option, but it requires a bit more work. There are multiple free and open-source brokers to pick from: eg. [Mosquitto](http://mosquitto.org/), [EMQ](http://emqtt.io/), or [Mosca](http://www.mosca.io/).
5555

5656
```yaml
5757
# Example configuration.yaml entry
@@ -61,16 +61,48 @@ mqtt:
6161

6262
Configuration variables:
6363

64-
- **broker** (*Optional*): The IP address or hostname of your MQTT broker, e.g. 192.168.1.32.
65-
- **port** (*Optional*): The network port to connect to. Default is 1883.
66-
- **client_id** (*Optional*): The client ID that Home Assistant will use. Has to be unique on the server. Default is a randomly generated one.
67-
- **keepalive** (*Optional*): The time in seconds between sending keep alive messages for this client. Default is 60.
68-
- **username** (*Optional*): The username to use with your MQTT broker.
69-
- **password** (*Optional*): The corresponding password for the username to use with your MQTT broker.
70-
- **protocol** (*Optional*): Protocol to use: 3.1 or 3.1.1. By default it connects with 3.1.1 and falls back to 3.1 if server does not support 3.1.1.
71-
- **certificate** (*Optional*): Path to the certificate file, eg. `/home/user/.homeassistant/server.crt`.
72-
- **tls_insecure** (*Optional*): Set the verification of the server hostname in the server certificate.
73-
- **tls_version** (*Optional*): TLS/SSL protocol version to use. Available options are: `auto`, `1.0`, `1.1`, `1.2`. Defaults to `auto`.
64+
{% configuration %}
65+
broker:
66+
required: false
67+
description: The IP address or hostname of your MQTT broker, e.g. 192.168.1.32.
68+
type: string
69+
port:
70+
required: false
71+
description: The network port to connect to. Default is 1883.
72+
type: int
73+
client_id:
74+
required: false
75+
description: The client ID that Home Assistant will use. Has to be unique on the server. Default is a randomly generated one.
76+
type: string
77+
keepalive:
78+
required: false
79+
description: The time in seconds between sending keep alive messages for this client. Default is 60.
80+
type: int
81+
username:
82+
required: false
83+
description: The username to use with your MQTT broker.
84+
type: string
85+
password:
86+
required: false
87+
description: The corresponding password for the username to use with your MQTT broker.
88+
type: string
89+
protocol:
90+
required: false
91+
description: Protocol to use: 3.1 or 3.1.1. By default it connects with 3.1.1 and falls back to 3.1 if server does not support 3.1.1.
92+
type: string
93+
certificate:
94+
required: false
95+
description: Path to the certificate file, eg. `/home/user/.homeassistant/server.crt`.
96+
type: string
97+
tls_insecure:
98+
required: false
99+
description: Set the verification of the server hostname in the server certificate.
100+
type: boolean
101+
tls_version:
102+
required: false
103+
description: TLS/SSL protocol version to use. Available options are: `auto`, `1.0`, `1.1`, `1.2`. Defaults to `auto`.
104+
type: string
105+
{% endconfiguration %}
74106

75107
<p class='note warning'>
76108
There is an issue with the Mosquitto package included in Ubuntu 14.04 LTS. Specify `protocol: 3.1` in your MQTT configuration to work around this issue.

0 commit comments

Comments
 (0)