In this series of articles we treat a MQTT message broker installed on BeagleBone Black; this componet allows to manage various esp8266 devices, to which we connect various probes such as temperaure sensors, relays.
All this is handled with the help of apps on Android and a Dashboard installed on Apache on BeagleBone.
We start from the message MQTT broker (Message Queue Telemetry Transport); here there is the description of the protocol
In particular in the FAQ section there are the first indications on the protocol and its use
The system is formed by three components:
- MQTT Broker: relays the messages published to all subscribers.
- Publisher: Publish messages in the registered topics on MQTT Broker.
- Subscriber: Receives messages for its registered topics from MQTT Broker.
The following shows the topology for two topics used in our example
The system is composed of a MQTT broker on BeagleBone. In this MQTT broker server you can define topics; different devices can be registered to these topics. For each topic the action can be subscription and publishing. By subscribing you receive all messages of topics, while with the publishing we can perform actions on the topic (for example, turn on a relay, restart a device, send sensor measurement,etc.). In the example we treat there will be, for example, a queue for the temperature monitor, hooked to esp8266 temperature reading device, another for the management of a relay, always run with esp8266. The MQTT broker relays the received messages among all subscribers/ publishers for each topic.
We can subcribe/publish to the topics on the MQTT broker using Android apps; the apps can receive messages and send commands to the esp8266 end device (Turn onRelay, Restart sensor, etc.).
installed on the Beablebone Apache web server we can monitor in real time the end devices.
For more informations on MQTT system, consult the web site listed above.
In the next article we’ll start by installing the MQTT broker on BeagleBone Black