mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-10 10:56:49 +00:00
minor changes
This commit is contained in:
parent
1bf0f068ef
commit
8a011576ae
@ -17,8 +17,7 @@ To integrate MQTT into Home Assistant, add the following section to your `config
|
|||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
mqtt:
|
mqtt:
|
||||||
broker: 127.0.0.1
|
broker: IP_ADDRESS_BROKER
|
||||||
topic: home-assistant
|
|
||||||
```
|
```
|
||||||
There are more optional entries available if your broker is using different settings or you have a special need.
|
There are more optional entries available if your broker is using different settings or you have a special need.
|
||||||
|
|
||||||
@ -33,10 +32,10 @@ mqtt:
|
|||||||
retain: 0
|
retain: 0
|
||||||
```
|
```
|
||||||
<img src='/images/supported_brands/preferences-system-sharing.png' class='brand pull-right' />
|
<img src='/images/supported_brands/preferences-system-sharing.png' class='brand pull-right' />
|
||||||
For debbuging purposes `mosquitto` is shipping commandline tools to send and recieve MQTT messages. For sending test messages to a broker running on localhost:
|
For debugging purposes `mosquitto` is shipping commandline tools to send and recieve MQTT messages. For sending test messages to a broker running on localhost:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ mosquitto_pub -h 127.0.0.1 -t home-assistant/switch/1/on -m "Switch is ON"
|
mosquitto_pub -h 127.0.0.1 -t home-assistant/switch/1/on -m "Switch is ON"
|
||||||
```
|
```
|
||||||
|
|
||||||
Another way to send MQTT messages by hand is to use the "Developer Tools" in the Frontend. Choose "Call Service" and then `mqtt/mqtt_send` under "Available Services". Enter something similar to the example below into the "Service Data" field.
|
Another way to send MQTT messages by hand is to use the "Developer Tools" in the Frontend. Choose "Call Service" and then `mqtt/mqtt_send` under "Available Services". Enter something similar to the example below into the "Service Data" field.
|
||||||
@ -57,7 +56,7 @@ The message should appear on the bus:
|
|||||||
For reading all messages sent on the topic `home-assistant` to a broker running on localhost:
|
For reading all messages sent on the topic `home-assistant` to a broker running on localhost:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ mosquitto_sub -h 127.0.0.1 -v -t "home-assistant/#"
|
mosquitto_sub -h 127.0.0.1 -v -t "home-assistant/#"
|
||||||
```
|
```
|
||||||
|
|
||||||
<p class='note'>
|
<p class='note'>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user