Add mqtt.dump docs (#11955)

This commit is contained in:
Paulus Schoutsen 2020-02-03 02:14:49 -08:00 committed by Franck Nijhof
parent 9fb3a8b51c
commit a71e254ea9
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
2 changed files with 15 additions and 2 deletions

View File

@ -37,7 +37,7 @@ payload_template: {{ states('device_tracker.paulus') }}
```yaml
topic: home-assistant/light/1/state
payload: "{\"Status\":\"off\", \"Data\":\"something\"}"
```
```
Example of how to use `qos` and `retain`:
@ -47,3 +47,16 @@ payload: on
qos: 2
retain: true
```
### Service `mqtt.dump`
Listen to the specified topic matcher and dumps all received messages within a specific duration into the file `mqtt_dump.txt` in your config folder. This is useful when debugging a problem.
| Service data attribute | Optional | Description |
| ---------------------- | -------- | ----------- |
| `topic` | no | Topic to dump. Can contain a wildcard (`#` or `+`).
| `duration` | no | Duration in seconds that we will listen for messages. Default is 5 seconds.
```yaml
topic: openzwave/#
```

View File

@ -44,7 +44,7 @@ This allows you to connect to the MQTT broker with user `homeassistant` and pass
- [Certificate](/docs/mqtt/certificate/)
- [Discovery](/docs/mqtt/discovery/)
- [Publish service](/docs/mqtt/service/)
- [Publish & Dump services](/docs/mqtt/service/)
- [Birth and last will messages](/docs/mqtt/birth_will/)
- [Testing your setup](/docs/mqtt/testing/)
- [Logging](/docs/mqtt/logging/)