The first goal of our project is to have two RaspberryPis communicating to each with MQTT protocol. MQTT an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium.

To have a more interesting infrastructure, we setup an IoT gateway with Kura on a RaspberryPi that will manage all the connections between IoT edges and reduce Cloud-end computing resouces.

The Kura gateway also hosts publisher(s) that will publish data received from RaspberryPis boards / sensors to all the following subscibers.

We also need to have a cloud service that will host an MQTT broker. To this end we used the Kapua framework that we installed locally following this tutorial.

At the beginning, connecting Kura to Kapua was very challenging because we have to

(1) Create an account in Kapua and add users with the "broker" permission

(2) Setup properly the cloud connection to Kapua from Kura interface

(3) Installing a kura publisher bundle and configure it properly to communicate with the Kapua broker

(4) We also used the eclipse Paho project to create a publisher and test the communication to the broker