1. Introduction
Embedded computing and low-power wireless communication provide physical objects with Internet connectivity, forming the Internet of Things (IoT) [
1]. The IoT offers services that lay at the core of many fields, such as smart homes, smart cities, smart industries and smart agriculture. Many products in the IoT use dedicated software tightly coupled with proprietary devices and interfaces, creating
silo solutions that make the IoT suffer from a lack of interoperability. The Web of Things (WoT) paradigm uses open Web standards to connect things to the Internet and publish their data through an application layer. Reusing technologies and standards of the World Wide Web makes it possible to create interoperable infrastructures between the cyber-world and the physical-world [
2].
One of the fields where the IoT plays a great role is air quality monitoring (AQM). Air quality refers to the concentration of several pollutants -such as carbon monoxide (CO), carbon dioxide (CO2), sulphur dioxide (SO2), nitrogen dioxide (NO2), and ozone (O3)- released by human activities and natural sources into air. Most of the IoT devices and services developed for AQM depend on proprietary platforms or technologies, making it hard to develop a wide accessible application.
In this paper we design and develop a low-cost, indoor air quality monitoring (IAQM) sensor following the recommendations of the Word Wide Web Consortium (W3C) WoT Working Group. The main benefit of this sensor is the interoperability with other IoT-based AQM platforms. This sensor is worldwide accessible through a standard Web browser or any HTTP-based application.
2. The Web of Things
Two decades ago, Web technologies for embedded systems were envisioned to create intelligent devices worldwide connected and managed from Web browsers [
3]. More recently, [
4] report the changes on the Internet because of the IoT and state that the IoT should be considered as part of the overall Internet of the future. Modern solutions create proxies to bridge heterogeneous Web services from the Internet into IoT networks, as in the solution proposed by [
5].
The Web of Things emerges from the application of Web standards and technologies to access information and services of physical objects in the IoT. Zeng et al. [
2] survey architectural concepts and some key enabling technologies of the WoT. As in IoT each physical object possesses a digital counterpart referred as “Thing”, in the WoT each physical object is commonly referred as “Web Thing” [
6]. A Web Thing commonly exposes an HTML or JSON representation, implements an API to access its properties, and defines an OWL-based (Web Ontology Language) semantic description.
In the WoT, all the things are abstracted as Web resources, and RESTful services is preferred because their low complexity and loose-coupling stateless interaction. The key characteristics of a RESTful design are: (i) identification of resources via URI; (ii) uniform interfaces to read and manipulate the resources, using four basic HTTP operations: GET, POST, PUT and DELETE; (iii) representation of the resources in different formats, such as HTML, JSON or XML; and (iv) stateless interaction.
Some organizations and standards focused on using Web technologies to counter IoT interoperability issues are:
OGC Sensor Web Enablement. The Open Geospatial Consortium (OGC), founded in 1994, is an international organization focused on open standards for the global geospatial community. The OGC’s Sensor Web Enablement (SWE) [
7] is a suite intended to make all types of sensors, transducers and sensor data repositories discoverable, accessible and useable through the Web.
Open Connectivity Foundation. In February 2016, the Open Connectivity Foundation (OCF) was established as an industry group dedicated to ensuring secure interoperability through a standard communication platform, a bridging specification, an open source implementation and a certification program [
8]. OCF sponsors IoTivity, an open source project hosted by the Linux Foundation focused on developing standard specifications, promoting interoperability guidelines and providing a certification program to enable IoT. In October 2016, this project was merged with AllJoyn, an open source framework to connect and discover devices.
W3C Web of Things. In December 2016, the W3C launched the Web of Things Working Group [
9] to propose recommendations and develop a set of standards for the WoT, with the following goals: (i) counter the fragmentation of the IoT; (ii) reduce the cost of development of IoT solutions; and (iii) lessen the risks to both investors and customers. These recommendations are based on scripting languages like JavaScript, data encodings like JSON, and protocols like HTTP and WebSockets. The W3C WoT is devised as the application layer of the IoT, interconnecting existing IoT platforms and complementing available standards.
3. Indoor Air Quality Monitoring
Air quality monitoring is a common application of sensor networks and IoT. Postolache et al. [
10] proposed a sensor network for AQM which is able to monitor air quality from different locations and publish it on the Web. Bhattacharya et al. [
11] proposed a wireless sensor network based on Libelium nodes (composed of a gas sensor board and the Waspmote processing board) to compute an air quality index used to command heating, ventilating and air conditioning systems. Abraham and Li [
12] proposed an AQM wireless sensor network based on Arduino, XBee modules and low-cost micro gas sensors. Yu and Lin [
13] used wireless sensor networks to develop an IAQM wireless system able to measure temperature, relative humidity and CO
2 concentration levels, which is able to analyze and predict air quality in an indoor working environment. Benammar et al. [
14] designed a real-time IAQM system using wireless sensor networks, emphasizing the use of a gateway in processing collected air quality data and its reliable dissemination to end-users through a Web server. This system uses the Raspberry Pi 2 model B for the gateway, the open-source IoT platform Emoncms for the Web server for live monitoring, and Libelium sensor nodes (composed of calibrated sensors, the Gas Pro sensor board and the Waspmote processing board).
All the previously reviewed systems are capable of wirelessly monitoring the quality of the air of a given indoor environment. However, all of them create silos in the IoT ecosystem since they are conceived as standalone systems with restricted and/or proprietary communications among sensor boards and Web servers or gateways. Therefore, they are not able to communicate with each other, even though some of them use the same processing and gas boards. The sensors of a system can only communicate with the gateways of that specific system. If they were able to communicate among themselves, they would be able to lay the foundation of a global wireless network system for air quality monitoring.
The IAQM sensor designed in this work uses current Web standards and technologies to avoid interoperability issues. The proposed sensor is a low-cost node based on a low-power system-on-chip microcontroller, running a Web server. It is based on the W3C recommendations for WoT Architecture, implementing a minimal servient (a software stack that implements the W3C WoT building blocks). This sensor consists of: (i) Processing Board: the core of the servient is the Espressif ESP32 system-on-chip microcontroller. This system runs MicroPython, a full compiler and runtime of the Python 3 programming language optimized to run on microcontrollers. On top of it, a RESTful API is exposed by means of picoWeb, an asynchronous, non-threaded Web framework; and (ii) Sensor board: the gas sensor is chosen taking power consumption into account. We use the MH-Z16 infrared CO2 sensor in the proposed IAQM sensor. Temperature and relative humidity are measured using the fully calibrated SHT25 sensor.
The proposed sensor (see
Figure 1) can be worldwide accessible from any standard Web browser using several URIs. For instance, requesting a temperature reading from the sensor would require accessing the following
http://WoTthing/temperature, given that WoTthing links to the root directory of the Web server of the sensor.
4. Conclusions
In this work we deal with the recommendations of the W3C WoT Working Group to counter the interoperability issues in IoT platforms. W3C WoT tries to augment or interface with existing standards and platforms. We designed and developed a low-cost, indoor air quality monitoring sensor which publishes air quality measurements on the Internet through a REST API, accessible using standard Web browsers or HTTP-based applications. Regardless of the minimal servient architecture implemented in this system, the sensor can be worldwide accessible. This makes the sensor really accessible, compatible, and also transparent for programmers to use. The main benefit of the sensor proposed in this work is the interoperability with other IoT-based air quality monitoring platforms, since the sensor can provide a description about its features, and thus, any platform can retrieve measurements from this sensor despite the manufacturer.
Future work will involve creating more building blocks for the system, as defined by the W3C WoT Architecture.