Internet Of Things2020-Assignment 2

Elective in Internet of Things

(A. A. 2019/2020)

Second Assignment

In this assignment we will built on-top of the cloud-based components developed in the first assignment. Now we will replace the virtual environmental stations developed using Python/Java, or any other language you decided, with new ones built using the RIOT-OS and MQTT-SN protocol. You will use the native emulator of RIOT-OS to run your stations and generate values over MQTT-SN that need to arrive to the cloud via the MQTT. You will also use IOT-LAB to execute your RIOT-OS application on real devices.

Virtual Station

Using RIOT-OS develop an application that represents a virtual environmental station that generates periodically a set of random values for 5 different sensors:

  1. temperature (-50 ... 50 Celsius)
  2. humidity (0 ... 100%)
  3. wind direction (0 ... 360 degrees)
  4. wind intensity (0 ... 100 m/s)
  5. rain height (0 ... 50 mm / h)

The virtual environmental station uses a unique ID (identity) to publish these random values on an MQTT-SN channel. You need to have at least 2 such virtual stations running using the native emulator of RIOT-OS and publishing their values on the MQTT-SN channel.

MQTT-SN broker

You need to setup an MQTT-SN broker where the RIOT-OS applications are publishing their values over UDP/IPv6. One such broker is RSMB presented during Lectures 6 and 7. Here is a tutorial on how to connect your RIOT-OS emulator over IPv6 to RSMB.

MQTT-SN/MQTT transparent bridge

You need to develop, using the programming language of your choice, an MQTT-SN/MQTT transparent bridge. The goal of the bridge is to subscribe to a predefined set of topics on the MQTT-SN broker (e.g., RSMB) and forward all messages received to the same topic on the MQTT broker that is controlled by the cloud-based backend (i.e., publish them). We will use the MQTT broker configured during the previous assignment (i.e., via AWS IoT, Azure IoT, Google IoT or ThingsBoard).

The values generated by the emulated RIOT-OS application developed in the previous steps should be visible through the website/webapp developed in the previous assignment.

Testbed deployment

Using IOT-LAB you need to deploy your RIOT-OS application on at least two nodes:

  1. Replace you code so that the values are not generated randomly but instead are connected to the real hardware sensors provided by the testbed infrastructure.
  2. Make sure you properly setup your network so that the MQTT-SN broker and MQTT-SN/MQTT transparent forwarded properly connect and forward the packets received from the IPv6 sensor network to the cloud.

What/How to submit

  • Create a YouTube video with a 3 minute demonstration of your system.
  • Create a Blog Post where you present a hands-on tutorial on how to setup and run your system, first using the native emulator and then using the IoT-Lab facility.
  • Extend the GitHub repository of the previous assignment to push all your code and scripts that are need to realize the above assignment.
  • Make sure that you re-organize your repository so that the code used in the previous assignment along with the new code are properly structured and interoperable. The website should be able to receive value via the cloud-based infrastructure either from a set of virtual stations using MQTT, or via RIOT-OS emulated stations using MQTT-SN or via real hardware deployed on the real-world testbed.
  • Update the README.md file where you provide links to your video and post of the new assignment, and also those of the previous one in a structured way.