MQTT is a so simple and widespread messaging system between applications that libraries and examples can be found in every programming language and in many devices.
The openhabian-config includes an installation script for Mosquitto, the most common broker, that allows the CM3-Home to be independent from outside on exchanging data between bindings and applications.
In this distribution it is used in several examples:
Once the MQTT binding has been installed, it has to be configured with the name to use in the clients:
Define also the event bus binding if it’s needed to publish/receive all states/commmands directly on the openHAB eventbus:
The correct working of the system can be verified subscribing:
with mqtt-spy or with the Google chrome App [MQTTlens