Institute of Computer Science
  1. Courses
  2. 2021/22 fall
  3. Mobile Computing and Internet of Things (LTAT.06.009)
ET
Log in

Mobile Computing and Internet of Things 2021/22 fall

  • Main
  • Lectures
  • Labs
  • Homeworks & Assignments
  • Results
  • Task submission
  • Extra Materials
  • Best Practices
  • Projects
    • Teams & Topics
    • Presentations & Report

Lab 11: IoTempower

In this lab, install and use the IoT Framework IoTempower.

Refer to IoTempower's main repository.

This lab needs a Linux installation with a working network connection that exposes (not blocks and eventually forwards) the ports 1880, 1883, 8001, and 8266 (this one as UDP and TCP) inside the local network your computer is connected to. If the first part of Lab 10 was successful, you should face no major problems in this lab.

If you use WSL 2, there could be problems with accessing the over the air update (OTA) function. Therefore we suggest using WSL 1 instead. A native Linux or virtual machine with bridged network should have no problems. You should also test if you can access the serial port from your Linux machine - this should be (apart from maybe some permission problems) work out of the box in native Linux and should also work ok in WSL 1 (in a virtual machine you have to forward/pass-through usb devices to the machine). If you are successful with WSL 2, both with networking and also flashing via serial ports on the host Windows machine, please share your journey and let us consider giving extrapoints for that.

We also highly encourage you to use the lab WiFi router in this lab or your own cell phone hotspot (mciot, ask for password your instructor).

Please scroll down for a second and take a look at the last task to get an idea where all your work will lead today. You will finish this lab with a full fledged access control system.

1. Installing IoTempower

Follow the IoTempower installation manual and do all subtasks (1-5) described there.

2. Exploring IoTempower Services and Commands

  1. Study about tool support in IoTempower - Which commands are there, write down your first idea what they do and if or where you could use them (some of them give you extra information, when you call them with help)
  2. Start the documentation server (iot doc serve). Attention, the search does not work as it is a local webserver without CGI support (extra credit for good suggestion/PR to make the python webserver do CGI). Open "Commands" and search how to use the rfid reader, PWM, a servo motor, ultrasonic distance sensor (RCWL-1601), and a single rgb led (you probably don't even need Google here, but if you are interested about more, feel free to find some more information about the hardware you are actually using) - note the example code you intend to use for both as well as some important remarks about wiring.
  3. Start the mqtt broker from IoTempower. It will complain about IP-Address settings. These will later (in next task) be derived automatically, but for now type the following before starting the broker and mqtt tools: export IOTEMPOWER_MQTT_HOST={your-ip-address_here} and show that it works with using mqtt_listen and mqtt_send
  4. Start your own Node-RED service (as in Lab 10) and make it listen to a mqtt topic and display values on a chart in the dashboard. Show that it is connected to the mqtt broker from IoTempower sending several values with mqtt_send to that topic.
  5. Optional: write a script (in Windows you might have to use powershell) that opens and starts all necessary services (maybe even detects the correct IP addresses and puts them into system.conf or iotempower.conf) with just one command - Extrapoint for sharing your solution to this point

3. First Node

Follow the First Node manual and do all subtasks. For the step "Next deployments" connect the node to external USB power as suggested and show that the deploy step still works.

4. Second Node

Follow the manual here and do all subtasks.

  • Institute of Computer Science
  • Faculty of Science and Technology
  • University of Tartu
In case of technical problems or questions write to:

Contact the course organizers with the organizational and course content questions.
The proprietary copyrights of educational materials belong to the University of Tartu. The use of educational materials is permitted for the purposes and under the conditions provided for in the copyright law for the free use of a work. When using educational materials, the user is obligated to give credit to the author of the educational materials.
The use of educational materials for other purposes is allowed only with the prior written consent of the University of Tartu.
Terms of use for the Courses environment