From 5c97692eb093c7320e63c2fd78115718fbdfd5ae Mon Sep 17 00:00:00 2001 From: Martijn Braam Date: Sun, 14 Nov 2021 02:58:09 +0100 Subject: [PATCH] docs: add examples to the mqtt module --- docs/proxy.rst | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/proxy.rst b/docs/proxy.rst index 98a9a81..bb321cf 100644 --- a/docs/proxy.rst +++ b/docs/proxy.rst @@ -188,4 +188,17 @@ The `topic-subscribe` is an optional setting that sets the path the proxy will s messages back. If this is not set the subscribe topic will be the same as the `topic` setting used to send messages. The `allow-writes` setting defaults to false. If this setting is changed to true it will make the proxy subscribe to -a topic and allow changing the switcher state my sending MQTT messages to that topic. \ No newline at end of file +a topic and allow changing the switcher state my sending MQTT messages to that topic. + +.. code-block:: shell-session + + # Switch to input 4 using MQTT + $ mosquitto_pub -t atem/mini/program-input -m '{"index":0, "source": 4}' + + # Switch to a named input on the hardware + $ mosquitto_pub -t atem/mini/program-input -m '{"index":0, "source": "PC"}' + + # Receive all MQTT messages from the proxy + $ mosquitto_sub -F '\e[92m%t \e[96m%p\e[0m' -t "atem/#" + +The MQTT module uses the MQTTv5 protocol \ No newline at end of file -- 2.34.2