Installing the MQTT server
The last step of this wide IoT project is installing the MQTT server. As you already know, this is the link between the publisher and the subscriber. We added this step at the end because it is not the main focus of this chapter, but it is important to know how to do it so that you gain a deep knowledge about MQTT and the steps necessary to implement an IoT ecosystem that exchanges data and information using MQTT protocol. As stated before, this IoT project uses Mosquitto an open source MQTT broker (https://mosquitto.org/). There are several versions working on different operating systems. You can find more information about the platforms supported at this link (https://mosquitto.org/download/). In this project, we will use the Raspberry Pi 2, anyway, you are free to use any version you like according to your needs.
Installing the MQTT broker
To install the MQTT broker you have to connect to Raspberry Pi 2 and follow these steps:
- The first step is adding a repository...