Skip to content

Commit 292c4a3

Browse files
chenninLandrash
authored andcommitted
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.
1 parent 030a4fd commit 292c4a3

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

source/_components/mqtt.markdown

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ mqtt:
3333
3434
Configuration variables:
3535
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.
3737
- **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.
4040
- **username** (*Optional*): The username to use with your MQTT broker.
4141
- **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`
4343
- **client_key** (*Optional*): Client key (example: `/home/user/owntracks/cookie.key`)
4444
- **client_cert** (*Optional*): Client certificate (example: `/home/user/owntracks/cookie.crt`)
4545
- **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
5050

5151
### {% linkable_title Embedded broker %}
5252

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:
5454

5555
| Setting | Value |
5656
| ------- | ----- |
@@ -77,7 +77,7 @@ mqtt:
7777

7878
### {% linkable_title Run your own %}
7979

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/).
8181

8282
```yaml
8383
# Example configuration.yaml entry
@@ -96,7 +96,7 @@ There is an issue with the Mosquitto package included in Ubuntu 14.04 LTS. Speci
9696

9797
### {% linkable_title Public broker %}
9898

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.
100100

101101
```yaml
102102
mqtt:
@@ -112,7 +112,7 @@ mqtt:
112112

113113
### {% linkable_title CloudMQTT %}
114114

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.
116116

117117
<p class='note'>
118118
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.
124124
3. From the control panel, click on the _Details_ button.
125125
4. Create unique users for Home Assistant and each phone to connect<br>(CloudMQTT does not allow two
126126
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'
129129
5. Copy the instance info to your configuration.yaml:
130130

131131
```yaml
@@ -186,19 +186,19 @@ logger:
186186

187187
## {% linkable_title Testing your setup %}
188188

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:
190190

191191
```bash
192192
$ mosquitto_pub -h 127.0.0.1 -t home-assistant/switch/1/on -m "Switch is ON"
193193
```
194194

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.
196196

197197
```bash
198198
$ mosquitto_pub -V mqttv311 -t "hello" -m world
199199
```
200200

201-
or if you are using a API password.
201+
or if you are using a API password:
202202

203203
```bash
204204
$ 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
225225
$ mosquitto_sub -h 127.0.0.1 -v -t "home-assistant/#"
226226
```
227227

228-
For the embeeded MQTT broker the command looks like the sample below.
228+
For the embedded MQTT broker the command looks like:
229229

230230
```bash
231231
$ mosquitto_sub -v -V mqttv311 -t "#"
@@ -235,7 +235,7 @@ Add the username `homeassistant` and your API password if needed.
235235

236236
## {% linkable_title Processing JSON %}
237237

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`.
239239

240240
| JSONPath query | JSON |
241241
| -------------- | ---- |

0 commit comments

Comments
 (0)