MQTT Publish

Publish values to a topic on an MQTT broker.

What it does

MQTT Publish sends a number out to an MQTT broker on a named topic. A number wired into Input goes out as a string payload each time the graph sends, bridging the node graph to lighting rigs, home-automation hubs, microcontrollers, or any other software listening on that broker.

Broker and Port point at the MQTT server, Topic is the channel other devices subscribe to, and Send fires the publish. The value also passes through Output for continued use downstream.

When to use it

ParameterTypeDefault
brokerString"localhost"
portNumber1883
topicString"control/brightness"
inputNumber
sendBooleanfalse

Gotchas

Worked example

  1. Add an MQTT Publish node. Set Broker to your MQTT server's hostname and Port to match (1883 is the common default).

  2. Set Topic to the channel your device or app is subscribed to, e.g. control/brightness.

  3. Wire a number, a slider, an audio level or a computed value, into Input.

  4. Switch Send on to start publishing that value out to the broker.

See also

MQTT Subscribe · OSC Output · DMX Output · Numbers, signals & audio