MakeHaus MQTT Reference
Once you have your hardware plugged in and connected it to the Tiles Hub, you may want to connect the whole thing to a MQTT broker. This can be configured in the file
app/config/globals.cfg in the Tiles Hub directory. Open it and find these 3 lines (it may be that the lines are not directly below each other.):
mqtt.enabled=true mqtt.broker.address.host=test.mosquitto.org mqtt.broker.address.port=1883
Enable MQTT in the first line. The above example uses the free Mosquitto test server. You may want to set your own MQTT broker host and port in the lines 2 and 3. After that, (re)start the Tiles Hub.
MakeHaus MQTT Topic Components and their Commands
Some widgets consist of several components These components are addressed as separate elements in MQTT and understand certain commands. For example, you can press an encoder like a button. That event will be sent accordingly by the BUTTON component of the encoder.
The table below illustrates this concept.
MakeHaus MQTT Payload Conventions
Below is an overview of the commands used, which the various widgets send or receive on events. The format, value range and meaning of the payload value and extra data (if available) are also explained and illustrated with an example.
MQTT Topic / Payload Examples
Last but not least, here are a few examples of MQTT messages that you can receive or send. The three "..." in the topic that follow "MakeHaus/" stand for the board ID. We have omitted this rather long UUID here for reasons of clarity.
Of course you can also use Node-RED to communicate with the Tiles Hub via MQTT or create applications for it. Have a look at MakeHaus MQTT and Node-RED.