diff --git a/source/_docs/mqtt/service.markdown b/source/_docs/mqtt/service.markdown index 5ad15fa9dbf..218a5a8ec1d 100644 --- a/source/_docs/mqtt/service.markdown +++ b/source/_docs/mqtt/service.markdown @@ -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/# +``` diff --git a/source/_integrations/mqtt.markdown b/source/_integrations/mqtt.markdown index 29a5034dd2c..ff854cbf556 100644 --- a/source/_integrations/mqtt.markdown +++ b/source/_integrations/mqtt.markdown @@ -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/)