From fa277980f66a788d96c41386d62b2c392e75351b Mon Sep 17 00:00:00 2001 From: Fredrik <944065+fohlsso2@users.noreply.github.com> Date: Mon, 11 Nov 2019 05:36:55 +0100 Subject: [PATCH] Update testing.markdown (#11144) matches the new MQTT tab in developer tools --- source/_docs/mqtt/testing.markdown | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/source/_docs/mqtt/testing.markdown b/source/_docs/mqtt/testing.markdown index f294ba83610..7e686e550b3 100644 --- a/source/_docs/mqtt/testing.markdown +++ b/source/_docs/mqtt/testing.markdown @@ -16,19 +16,26 @@ If you are using the embedded MQTT broker, the command looks a little different $ mosquitto_pub -V mqttv311 -u homeassistant -P -t "hello" -m world ``` -Another way to send MQTT messages by hand is to use the "Developer Tools" in the Frontend. Choose "Call Service" and then `mqtt.publish` under "Available Services". Enter something similar to the example below into the "Service Data" field. - -```json -{ - "topic":"home-assistant/switch/1/on", - "payload":"Switch is ON" -} -``` - -The message should appear on the bus: +Another way to send MQTT messages by hand is to use the "Developer Tools" in the Frontend. Choose the "MQTT" tab. Enter something similar to the example below into the "Topic" field. ```bash -... [homeassistant] Bus:Handling + home-assistant/switch/1/power + ``` + and in the Payload field + ```bash + ON +``` +In the "Listen to a topic" field, type # to see everything, or "home-assistant/switch/#" to just follow the published topic. Press "Start Listening" and then press "Publish". The result should appear similar to the text below + +```bash +Message 23 received on home-assistant/switch/1/power/stat/POWER at 12:16 PM: +ON +QoS: 0 - Retain: false +Message 22 received on home-assistant/switch/1/power/stat/RESULT at 12:16 PM: +{ + "POWER": "ON" +} +QoS: 0 - Retain: false ``` For reading all messages sent on the topic `home-assistant` to a broker running on localhost: