CITS4419 Sensor Networks Lab (week 5)

Concepts and Preparation

In this lab you will learn some gateway and front end technologies for sensor network applications in preparation for the cits4419 project.

Before the lab you should review the lecture material and papers on MQTT from week 5.

Lab Tasks

    Publish Subscribe

  1. Set up an MQTT broker or choose one of the free public online brokers. Some are listed in the lecture notes. Create some clients, both publishers and subscribers, and start sending messages. Use the MQTT last will and testament in your system. Document your experiments in a simple how-to guide which could be used as a tutorial by other students (or to remind yourself at some later date).
  2. Using a Raspberry Pi or a laptop or lab computer, write an MQTT publisher to forward sensor messages to your MQTT broker. Write a python script using, for example the paho.mqtt.client library from https://www.eclipse.org/paho/clients/python/. Also see some examples for using this library at https://github.com/websense/wsnloggerpi. Use simulated sensor messages to test your publisher client.
  3. Once your MQTT publisher is working, link it to a sensor network node, for example using the Mannheim temperature/humidity system from the week 2 lab. You will be doing this as part of your cits4419 project, so no need to complete it in the lab today. But try to design steps 1 and 2 so they are ready to be used.

    Data Store

  4. MQTT publish and subscribe streams live data. If you want to store historical data you need to add a database to your system. You can use example code from https://github.com/websense/wsnloggerpi on a Raspberry pi or laptop. Or write your own code for your favourite database tool.

    Visualisation

  5. There are many tools for visualising sensor data including dashboards and database front ends. Search for some tools (based on your programming strengths) and build a simple dashboard. Document your experiments in a simple how-to guide which could be used as a tutorial by other students (or to remind yourself at some later date).
When you have completed your lab report upload it to cssubmit (wk4 lab). Your report should be a single file in pdf format. Labs do not count towards your assessed marks but I will provide formative feedback on your lab reports. Submissions for the assessed project will be in a similar format.
UWA Department of Computer Science and Software Engineering