You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Edit mqtt.markdown and clarify 'certificate' option (home-assistant#962)
Edit mqtt topic for spelling/grammar/typos/clarity.
Importantly, clarify what `certificate` is used for. The current description implies it's used for encrypting communication, but that's what `client_key` and `client_cert` are for. `certificate` is which root certificate(s) to trust.
Copy file name to clipboardExpand all lines: source/_components/mqtt.markdown
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -33,13 +33,13 @@ mqtt:
33
33
34
34
Configuration variables:
35
35
36
-
- **broker** (*Required*): The IP address of your MQTT broker, e.g. 192.168.1.32.
36
+
- **broker** (*Required*): The IP address or hostname of your MQTT broker, e.g. 192.168.1.32.
37
37
- **port** (*Optional*): The network port to connect to. Default is 1883.
38
-
- **client_id** (*Optional*): Client ID that Home Assistant will use. Has to be unique on the server. Default is a random generated one.
39
-
- **keepalive** (*Optional*): The keep alive in seconds for this client. Default is 60.
38
+
- **client_id** (*Optional*): The client ID that Home Assistant will use. Has to be unique on the server. Default is a randomly generated one.
39
+
- **keepalive** (*Optional*): The time in seconds between sending keep alive messages for this client. Default is 60.
40
40
- **username** (*Optional*): The username to use with your MQTT broker.
41
41
- **password** (*Optional*): The corresponding password for the username to use with your MQTT broker.
42
-
- **certificate** (*Optional*): Certificate to use to encrypt communication with the broker.
42
+
- **certificate** (*Optional*): The certificate authority certificate file that is to be treated as trusted by this client. This file should contain the root certificate of the certificate authority that signed your broker's certificate, but may contain multiple certificates. Example: `/home/user/identrust-root.pem`
- **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.
@@ -50,7 +50,7 @@ The MQTT component needs you to run an MQTT broker for Home Assistant to connect
50
50
51
51
### {% linkable_title Embedded broker %}
52
52
53
-
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 Asssistant connects to it. Embedded broker default configuration:
53
+
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:
54
54
55
55
| Setting | Value |
56
56
| ------- | ----- |
@@ -77,7 +77,7 @@ mqtt:
77
77
78
78
### {% linkable_title Run your own %}
79
79
80
-
Most private option but requires a bit more work. There are two free and open-source brokers to pick from: [Mosquitto](http://mosquitto.org/) and [Mosca](http://www.mosca.io/).
80
+
This is the most private option but requires a bit more work. There are two free and open-source brokers to pick from: [Mosquitto](http://mosquitto.org/) and [Mosca](http://www.mosca.io/).
81
81
82
82
```yaml
83
83
# Example configuration.yaml entry
@@ -96,7 +96,7 @@ There is an issue with the Mosquitto package included in Ubuntu 14.04 LTS. Speci
96
96
97
97
### {% linkable_title Public broker %}
98
98
99
-
The Mosquitto project runs a [public broker](http://test.mosquitto.org). Easiest to setup but there is 0 privacy as all messages are public. Use this only for testing purposes and not for real tracking of your devices.
99
+
The Mosquitto project runs a [public broker](http://test.mosquitto.org). This is the easiest to set up, but there is no privacy as all messages are public. Use this only for testing purposes and not for real tracking of your devices.
100
100
101
101
```yaml
102
102
mqtt:
@@ -112,7 +112,7 @@ mqtt:
112
112
113
113
### {% linkable_title CloudMQTT %}
114
114
115
-
[CloudMQTT](https://www.cloudmqtt.com) is a hosted private MQTT instance that is free up to 10 connected devices. This is enough to get started with for example [OwnTracks](/components/device_tracker.owntracks/) and give you a taste of what is possible.
115
+
[CloudMQTT](https://www.cloudmqtt.com) is a hosted private MQTT instance that is free for up to 10 connected devices. This is enough to get started with for example [OwnTracks](/components/device_tracker.owntracks/) and give you a taste of what is possible.
116
116
117
117
<p class='note'>
118
118
Home Assistant is not affiliated with CloudMQTT nor will receive any kickbacks.
@@ -124,8 +124,8 @@ Home Assistant is not affiliated with CloudMQTT nor will receive any kickbacks.
124
124
3. From the control panel, click on the _Details_ button.
125
125
4. Create unique users for Home Assistant and each phone to connect<br>(CloudMQTT does not allow two
126
126
connections from the same user)
127
-
a. Under manage users, fill in username, password and click add
128
-
b. Under ACLs, select user, topic `#`, check 'read access' and 'write access'
127
+
1. Under manage users, fill in username, password and click add
128
+
2. Under ACLs, select user, topic `#`, check 'read access' and 'write access'
129
129
5. Copy the instance info to your configuration.yaml:
130
130
131
131
```yaml
@@ -186,19 +186,19 @@ logger:
186
186
187
187
## {% linkable_title Testing your setup %}
188
188
189
-
The `mosquitto` broker package is shipping commandline tools to send and recieve MQTT messages. As an alternative have a look at [hbmqtt_pub](http://hbmqtt.readthedocs.org/en/latest/references/hbmqtt_pub.html) and [hbmqtt_sub](http://hbmqtt.readthedocs.org/en/latest/references/hbmqtt_sub.html) which are provied by HBMQTT. For sending test messages to a broker running on localhost check the example below:
189
+
The `mosquitto` broker package ships commandline tools to send and recieve MQTT messages. As an alternative have a look at [hbmqtt_pub](http://hbmqtt.readthedocs.org/en/latest/references/hbmqtt_pub.html) and [hbmqtt_sub](http://hbmqtt.readthedocs.org/en/latest/references/hbmqtt_sub.html) which are provied by HBMQTT. For sending test messages to a broker running on localhost check the example below:
190
190
191
191
```bash
192
192
$ mosquitto_pub -h 127.0.0.1 -t home-assistant/switch/1/on -m "Switch is ON"
193
193
```
194
194
195
-
If you are using the embeeded MQTT broker, the command looks a little different because you need to add the MQTT protocol version.
195
+
If you are using the embedded MQTT broker, the command looks a little different because you need to add the MQTT protocol version.
196
196
197
197
```bash
198
198
$ mosquitto_pub -V mqttv311 -t "hello" -m world
199
199
```
200
200
201
-
or if you are using a API password.
201
+
or if you are using a API password:
202
202
203
203
```bash
204
204
$ mosquitto_pub -V mqttv311 -u homeassistant -P <your api password> -t "hello" -m world
@@ -225,7 +225,7 @@ For reading all messages sent on the topic `home-assistant` to a broker running
For the embeeded MQTT broker the command looks like the sample below.
228
+
For the embedded MQTT broker the command looks like:
229
229
230
230
```bash
231
231
$ mosquitto_sub -v -V mqttv311 -t "#"
@@ -235,7 +235,7 @@ Add the username `homeassistant` and your API password if needed.
235
235
236
236
## {% linkable_title Processing JSON %}
237
237
238
-
The MQTT switch and sensor platforms support processing JSON over MQTT messages and parse them using JSONPath. JSONPath allows you to specify where in the JSON the value resides that you want to use. The following examples will always return the value `100`.
238
+
The MQTT switch and sensor platforms support processing JSON over MQTT messages and parsing them using JSONPath. JSONPath allows you to specify where in the JSON the value resides that you want to use. The following examples will always return the value `100`.
0 commit comments