*3.2. The HOLSYS Internet of Things Platform Setup*

The HOLSYS platform has been in development and passed from many stages namely, the use of Kaa project IoT platform and the upgrade to the ThingsBoard open source IoT platform. It allows configuring, supervising, and acquiring connected sensing and actuating nodes. Its aim is to allow the development and deployment of IoT based scenarios related to smart energy efficient buildings as well as eHealth and Smart Mobility. The HOLSYS platform follows the general architecture presented in Figure 2. The four layers define the different general sections/aspects of an IoT platform, namely, Sensing/actuating, Data Acquisition, Processing, and Visualization.

**Figure 2.** General architecture of an Internet of Things platform.

3.2.1. Sensing and Actuation Layer

Sensors and actuators represent all embedded sensors and actuators together with control units considered as one device and presented to the platform as an IoT node. This latter is capable of receiving and sending stream data while ensuring the execution of all control strategies sent by the platform. The communication between deployed nodes and the HOLSYS platform may pass through wired or wireless protocols. In this paper, only MQTT, REQUEST and REST have been used as the EEBLab is accessible in the campus network either wirelessly or through an ethernet connection.

The deployed IoT devices (nodes) are built using low-cost microcontrollers (e.g., NodeMCU, Arduino, STM32S) and presented to the platform using Raspberry Pi 3 and 4 B+ (RPi). A set of nodes can be connected in serial mode (USB), Serial Peripheral Interface (SPI), Inter-Integrated Circuit (I2C) or Bluetooth to the RPi gateway where NodeRed controls the inputs and the outputs of the set. NodeRed is a flow-based platform, developed originally by IBM, for facilitating the process of wiring hardware devices together with Application Programming Interfaces (APIs) and online services as part of the Internet of Things. A NodeRed flow is a set of connected logical NodeRed nodes linked together to form a processing logic with inputs and outputs. The resulting logic flow ensures gathering input data from wired or wireless IoT nodes, pre-processing and aggregating them to finally output structured data into local or remote storage systems.

Figure 3 presents the deployed sensors and actuators used in this study. (a) represents the Indoor air quality node connected to an RPi via a USB cable. It gathers the indoor CO2 concentration in Part Per Million (PPM) using an MH-Z14A sensor with an accuracy of ±50 PPM +3% reading value; (b) shows the control node of both inlet and outlet fans used to ventilate the EEBLab. The 12 V and 440 m3/h fans are controlled with PWM generated from an Arduino nano. Speed can be controlled from 0, for OFF mode, to 255 PWM for max speed (ON mode). However, a relay has been added to completely turn OFF the fans if 0 PWM has been triggered to save energy; (c) presents the deployed RPi based weather station with wind speed and direction, solar irradiance, ambient temperature and relative humidity sensors for outdoor environmental data. Used sensors are, respectively, an analog anemometer and magnetic direction sensors, SR20 pyranometer and DHT22 together with DS18B20; (d) depicts gate door motion sensors to determine the true occupants' number inside the EEBLab. They are based on infrared emitters and receivers, which are aligned together at the door entrance, to detect the exact occupants' number.

**Figure 3.** The deployed IoT devices; (**a**) Indoor CO2, temperature and humidity node; (**b**) Inlet and outlet ventilator speed control node; (**c**) Weather station node for outdoor air quality; (**d**) Occupants' number node.
