The openHAB Documentation Has Moved

The documentation has moved to and

Please use the link below to be redirected to the new version of this article, and update your bookmarks.

MQTT Actions

Publish a message to a topic on an MQTT broker.


In addition to the MQTT Action service, the MQTT binding (1.x) must be installed and configured. The action can reference the broker(s) that are configured for the MQTT binding.


  • publish(String brokerName, String topic, String message): Publish the message to topic using the specified MQTT broker.