Smarter with open source

Too Clever

Lead Image © Andrey Kiselev,

Lead Image © Andrey Kiselev,

Article from Issue 206/2018

Making the city of Messina, Italy, smarter with open source and IoT.

Imagine you are driving downtown in the middle of the night. Rows of red lights shine ahead. Traffic is thin, almost non-existent, and you wish you could turn all the red lights green and arrive home earlier. What if you could pull your phone out, automatically connect to the nearby lights, and turn them green?

That's precisely what a team at the University of Messina, Italy, tried to do. "It worked. It was very precise in real time, but there are so many rules, laws, and regulations to comply with before even being considered for actual usage in the streets," said Giovanni Merlino, research fellow in the Department of Engineering, University of Messina. Merlino delivered a talk about his team's work at the Boston OpenStack Summit 2017.

Messina is one of the largest cities on the island of Sicily and is home to more than 300,000 inhabitants. A city that size has its own set of civil challenges – environmental pollution, wear and tear on roads, safety and security of citizens, traffic monitoring and optimization, and potholes.

The modern way of solving these problems is by building an infrastructure that collects data through Internet of Things (IoT) devices spread across the city. That data is then analyzed to find the solutions to different problems. Take, for example, potholes. If sensors installed in vehicles or on mobile devices carried by people with the appropriate app can notify the municipality of the pothole locations, these potholes could be fixed. If the city can monitor the air, acoustic pressure, brightness, humidity, and other environmental aspects, officials could improve the quality of life.


Traditionally, solutions to these problems start with municipalities; however, they don't usually have the resources or incentives to invest in IT to find solutions. SmartMe.IO, an academic spin-off born out of a team of researchers from the Mobile and Distributed Systems Lab (MDSLab) at the University of Messina, tries to change that by coming up with vendor-neutral, open source solutions that can help a city "on a shoestring budget."

SmartMe.IO kick-started a smart city-related crowdfunded project [1] aimed at encouraging "a conversation with the municipality of Messina in order to spur the creation of a novel virtual ecosystem based upon the paradigm of the Internet of Things."

This SmartMe.IO initiative started with some prototypes that used Arduino-based sensors to collect environmental data, such as humidity, brightness, and carbon dioxide level. However, they didn't want it to remain a research project. They wanted to expand and scale it out so that it could serve people beyond the city of Messina. The team ran a successful crowdfunding project to grow the project.

In a nutshell, the SmartMe.IO project has three core components: IoT or edge devices scattered across the city to collect different kinds of data, an Infrastructure as a Service (IaaS) platform to collect and process the data, and data processing to offer more refined services to the city and other stakeholders.


The SmartMe.IO team created a fully open source framework called Stack4Things, which is a complete solution to manage the fleet of IoT devices remotely. The framework has two agents: one for the server side and one for edge devices. The server/cloud-side agent is called IoTronic [2], and the node-side (IoT edge device) agent is called Lightning-Rod.

IoTronic is an IoT resource management service for OpenStack Cloud, traditionally known for hyperscale cloud computing and massive infrastructure. SmartMe.IO wanted to build an IaaS-oriented solution for these IoT devices, an infrastructure that can be scaled on the basis of demand. At the same time, they wanted to expand the scope of OpenStack beyond the data center, toward the management of sensing and actuation resources. Initially, the software was written in Node.js, but the researchers have been porting it to Python to make it OpenStack compliant. The cloud currently runs in the University data center.

On the client side, Lightning-Rod runs on edge devices powered by single-board computers like Raspberry Pi, running a customized version of the OpenWrt/LEDE flavor of Linux developed in-house, an environment common to all the supported SmartMe.IO edge devices. These edge devices are called Arancino and are armed with a wide range of commodity sensors to collect different kinds of data. The University once hosted one of the Arduino labs. As the lab was shut down, the university absorbed the human expertise from the lab, bringing valuable resources to the SmartMe.IO team that enabled them to work on Arancino. More than 100+ IoT devices spread across the city are actively collecting valuable data.

Virtual Points

In addition to the physical boxes on the map are virtual boxes, which represent points of interest that could be either landmarks or most-clicked areas. These areas won't have any physical boxes installed.

"The virtual box would then be just flagged/labeled/colored differently to let the user know data is extrapolated/predicted, but not actually sampled. The predictive engine analyzes and correlates time series from neighboring boxes (say, four or more surrounding the location of the virtual one) and predicts expected values of homogeneous metrics (say, humidity values from four neighboring humidity sensors), or even heterogeneous ones (say, temperature values from a mix of neighboring and/or co-located humidity/brightness sensors). Use cases [include] faulty sensors (incomplete time series) [and] sparsely covered areas," said Merlino.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Programming Snapshot – Power Outages

    A power failure can cause the IQ of a smart home to plummet suddenly. An emergency power supply and a script on the SmartThings platform can prevent a total outage and inform the owner. The polyglot Perlmeister embarks on a foray into the territory of the Groovy scripting language in this issue.

  • SSH Reverse Tunnels

    We’ll show you a practical project for monitoring home energy usage with SSH and OpenWrt.

  • EVO Smart Console: Playstation Competition?

    With its EVO Smart Console, Envizions Computer Entertainment Corporation out of Atlanta, Georgia, has brought a Linux-based console to market that should appeal to both gamers and multimedia fans alike.

  • LINUX World News
  • Smart Home with Zigbee

    The RaspBee II module turns your Raspberry Pi into a smart control center for Zigbee devices.

comments powered by Disqus