You are currently viewing a new version of our website. To view the old version click .
Sensors
  • Article
  • Open Access

22 November 2022

Toward an Intelligent Campus: IoT Platform for Remote Monitoring and Control of Smart Buildings

,
,
,
,
and
1
Department of Electronic Engineering, Universidad Técnica Federico Santa María, Valparaíso 2390123, Chile
2
Electrical Engineering Department, Faculty of Engineering, Mansoura University, Mansoura 35516, Egypt
3
Sustainable Energy Technologies Center, King Saud University, Riyadh 11421, Saudi Arabia
4
Departamento Ingeniería Informática, Universidad Católica de la Santísima Concepción, Concepción 4090541, Chile
This article belongs to the Special Issue Smart IoT System for Renewable Energy Resource

Abstract

With the growing need to obtain information about power consumption in buildings, it is necessary to investigate how to collect, store, and visualize such information using low-cost solutions. Currently, the available building management solutions are expensive and challenging to support small and medium-sized buildings. Unfortunately, not all buildings are intelligent, making it difficult to obtain such data from energy measurement devices and appliances or access such information. The internet of things (IoT) opens new opportunities to support real-time monitoring and control to achieve future smart buildings. This work proposes an IoT platform for remote monitoring and control of smart buildings, which consists of four-layer architecture: power layer, data acquisition layer, communication network layer, and application layer. The proposed platform allows data collection for energy consumption, data storage, and visualization. Various sensor nodes and measurement devices are considered to collect information on energy use from different building spaces. The proposed solution has been designed, implemented, and tested on a university campus considering three scenarios: an office, a classroom, and a laboratory. This work provides a guideline for future implementation of intelligent buildings using low-cost open-source solutions to enable building automation, minimize power consumption costs, and guarantee end-user comfort.

1. Introduction

The Chilean new energy efficiency law No. 21,305 was published on 13 February 2021, establishing Chile’s national energy efficiency plan. Among the main aspects of energy efficiency that the new law targets are the national energy efficiency plan, energy management of large consumers, energy labeling/rating for buildings, and efficiency standards for vehicles [1]. Considering that buildings are responsible for about 60% of the total global electricity consumption [2], information on energy usage is fundamental for the development of different energy management system (EMS) solutions [3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]. In particular, such solutions are critical for those users in charge of buildings administration. Knowing the different equipment power consumptions is vital for controlling the expenses associated with building operations.
The applications of IoT in smart homes [9,10,11,12,14] and smart buildings [2,3,4,5,6,7,8,13,15,16,17,18,19,20,21,22,23] have been discussed in many publications covering different domains, including surveys [6,7,10,11,12,15,18], architectures [5], frameworks [8,14], platforms [9], and algorithms [16]. However, most of the research is based on assumptions or simulations which ignore the practical issues from the real implementation. Examples of real implementation can be found in [3,4,9,12,19]. Furthermore, the condition of the electricity system differs between countries and regions, which then requires identifying the specific requirements and needs for each design. This work aims to fill the gap related to technical implementation in a realistic environment. The main objective of this work is to design and implement an IoT platform that integrates information from various smart sensor nodes and measuring devices connected to buildings for obtaining information related to power consumption in order to support energy management solutions. All collected data will be processed to deliver the relevant information to the end user, who can then perform remote actions accordingly. The main activities required to achieve the proposed objective are:
  • Define the system requirements for intelligent buildings and prioritize these requirements for developing the solution, including data collection from different sensor nodes and measurement devices.
  • Build the IoT platform for smart buildings, which includes four main layers: power layer, data acquisition layer, communication network layer, and application layer.
  • Implement the back-end and front-end systems. The proposed solution involves the development of a network of sensors and measurement devices and the integration of the processing unit and the databases. The front-end implementation phase consists of developing a user interface for interaction, visualization, and data analysis.
  • Implementation of the testbed and validation, where the designed prototype will be installed and tested in the context of a real application (Department of Electronic Engineering, Universidad Técnica Federico Santa María (UTFSM), Valparaíso, Chile), including an office, a laboratory, and a classroom to assess the functionality and usability of the proposed solution.
This paper is structured as follows: Section 2 presents a review of related work for smart buildings. Section 3 introduces the hierarchical energy management architecture for the intelligent campus. Section 4 presents the proposed IoT architecture for smart buildings. Section 5 discusses and analyses the proposed solution and the results. Section 6 presents the conclusion and future work.

3. IoT-Based Architecture for Smart Buildings

3.1. Hierarchical Energy Management Architecture for Intelligent Campus

A university campus generally consists of a group of buildings connected to the main power grid. The energy management approach can be classified into different levels: campus energy management system (CEMS), building energy management system (BEMS), and office/laboratory/classroom level. The CEMS operates as an energy manager for the campus by collecting energy consumption data from each building through intelligent BEMS (iBEMS), as shown in Figure 1.
  • Campus energy management system (CEMS): The CEMS monitors the power generation (renewable energy), energy storage, and consumption of university buildings and interacts with each BEMS to optimize energy usage. In addition, the CEMS receives the energy consumption data of each building, stores it in a database, and estimates the consumption and future generation based on historical data.
  • Building energy management system (BEMS): In general, university buildings consist of a group of offices, laboratories, and classrooms. The BEMS collects the energy data and other weather information collected by different smart meters and sensors located in the building and interacts with the building loads.
Figure 1. The schematic diagram for the intelligent campus. CEMS: campus energy management system; iBEMS: intelligent building energy management system; CS: charging station; PV: photovoltaic system.
The CEMS provides large-scale data acquisition, communication, and data processing for energy management in buildings which requires cooperation among each BEMS in order to meet the operator requirements for minimizing power consumption and costs. However, as the number of energy management units increases, many challenges are related to cost, latency and reliability. This work target one building (Building B) of the UTFSM Campus, Valparaiso, Chile.
The university campus (Casa Central, Valparaíso, Chile) was inaugurated in 1931. Nowadays, there is a lack of monitoring and control for energy consumption in university buildings. There is still a high cost for building automation systems for small and medium-sized buildings, which prohibits purchasing such solutions. Furthermore, there is still a limitation for compatibility with different vendors, devices, and communication technologies in case of relying on using a particular platform. The proposed IoT platform aims to develop a custom solution using cost-effective off-the-shelf sensors/devices for real-time monitoring and control of building energy consumption through a web interface. Three case studies are considered: an office, a laboratory, and a classroom. Three case studies are considered: an office, a laboratory, and a classroom.

3.2. IoT-Based Architecture for Smart Buildings

The main objective of this work is to design and implement an IoT platform for real-time monitoring and control of energy consumption in buildings to achieve an intelligent campus. There are different IoT architectures., such as three-layer (perception layer, network layer, and application layer), four-layer (perception layer, network layer, service layer, and application layer), and five-layer (perception layer, network layer, service layer, application layer, and business layer) [5,10,11,12,13,14]. Considering the various IoT-based architectures, Figure 2 shows the main components of a three-layers IoT-based architecture for smart buildings, which consist of the perception layer, network layer, and application layer. The perception layer usually emphasizes energy usage, occupant activities, and environmental condition. Different wired/wireless communication technologies could be used for data transmissions, such as WiFi, ZigBee, Bluetooth, and LoRa in the network layer. The application layer corresponds to business, application, and service management. The collected data at the application layer explains the actual building energy usage, energy management, occupant information, etc.
Figure 2. The schematic diagram for IoT-based architecture for smart buildings. iBEMS: intelligent building energy management system.
Figure 3 shows a detailed schematic diagram of the proposed IoT-based architecture for smart buildings. Our work aims to achieve building automation to minimize energy consumption costs and guarantee the comfort of the occupants. Our proposed architecture consists of four layers: power layer, data acquisition layer, communication network layer and application layer.
  • Power Layer: the power layer consists of power generation, power storage, and loads that are connected to the power grid. In this study, the campus buildings are connected to the power distribution network (provided by Chilquinta). Other power generation sources may include solar panels, wind turbines, and batteries for power storage. The main power consumption in buildings may consist of HVAC, lights, and vehicle charging stations.
  • Data Acquisition Layer: the data acquisition layer is responsible for capturing all the data coming from the power layer devices for making decisions. Examples of sensor nodes are measuring devices from light, temperature, power consumption, and meteorological station.
  • Communication Network Layer: Different communication technologies and protocols are defined from data acquisition devices in the communication network layer. The communication network layer receives the sensors’ data and sends them to the application layer. Data might need to be sent over various networks, such as the local area network (LAN) and building area network (BAN). The most common communication technologies are ZigBee, Bluetooth, WiFi, and LoRa, using different communication protocols such as MQTT, CoAP, and Web Socket.
  • Application Layer: the end-user can recognize the middleware services that allow data storage and interaction with building data in the cloud. All monitoring and status information received from the devices are stored and visualized. Real-time monitoring and control can then be achieved using different approaches such as energy management, safety, user comfort, and management of HVAC.
Figure 3. IoT-based architecture for the intelligent campus.

4. Smart Building Implementation

The proposed solution was implemented considering three locations with different needs. The details for each scenario and location are given below:
  • Office Room: The first scenario is office B-349. This is a representation of professors’ offices distributed in Jeonju pus. Most offices include computers with one or more monitors, printers, and plugs to charge mobile devices. All offices include fixed lighting activated by a switch on the wall. Because it is a relatively small space, the energy measurement of the entire room was not considered.
  • Laboratory Room: The second scenario is laboratory B-110. In this laboratory, there are at least four permanent workstations where a computer can be connected and external monitors for each of these positions. In addition, there is a shared space to carry out different activities. In this case, the implementation of smart plugs is proposed to monitor computers and other equipment connected to the power network. On the other hand, given the energy requirements of the space, it is suggested to install an energy meter in the electrical panel to monitor the total energy in the room.
  • Classroom: The third scenario is classroom B-213. This classroom has luminaires that can be controlled with smart switches, one projector that can be controlled with smart plugs, and several sockets that allow students and teachers to connect their personal devices. An energy meter can be used on the electric board. In addition, an environmental measuring device can be installed to monitor the air quality during the classes.
Figure 4 shows the locations of different scenarios, while Table 2 shows the list of appliances and sensors considered at each location.
Figure 4. Locations of different implantation scenarios: (a) Engineering building B; (b) Office B-349; (c) Laboratory B-110; and (d) Classroom B-213.
Table 2. List of appliances.

4.1. Selected Alternatives Solutions for Devices, Technologies, and Services

The implementation is carried out considering the proposed 4 layers discussed in the previous section. The description of equipment and technologies used in each layer are given in Table 3 and Figure 5. Although the system is proposed and designed for the three different scenarios in different locations, we organized and assembled a testbed shown in Figure 6. The testbed will allow us to collect data from various appliances individually and/or together for later using it to validate different machine learning algorithms.
Table 3. List of sensors and measuring devices used for the testbed.
Figure 5. Selected devices for data acquisition layer: (a) Raspberry Pi 4B; (b) PZEM-004t-100 A; (c) Sonoff Pow R2; and (d) Air quality LAQ4.
Figure 6. SThe schematic diagram for the testbed.
The testbed is powered by an external source connected directly to a small electrical panel. On the board, there is a pilot light to verify the electric power at the input, then a switch for protection in case of current overconsumption, and a tetrapolar bar to facilitate the connection of equipment on the testbed. The testbed also includes two circuits: the lighting circuit and the sockets circuit. Furthermore, other components include a small router that provides a local WiFi network for the equipment, a LoRa gateway, and a Raspberry Pi that implements the proposed architecture. Detailed characteristics, setup and comparison among different types of sensors, measuring devices, and network elements are given in Appendix A and Appendix B.

4.2. Power Layer

4.2.1. Monitoring Power Consumption of Appliances

For monitoring the power consumption of appliances, smart plugs of the “Sonoff POW R2” type are used [24]. All smart plugs were updated with ESPurna firmware and configured for wireless data transmission using WiFi [25]. Regarding the electric connection, the smart plugs need to be connected with electric cables and installed between the electric power supply and the appliances.
Different configurations for using smart plugs type “Sonoff POW R2” are considered for the testbed:
  • Control the complete circuit: In this case, the whole lighting circuit was passing through the smart plug, which allows measuring and control of the lights (highlighted with green color in Figure 6)
  • Control a socket: In this case, the connection was configured, which allows obtaining data from all equipment connected to the socket (highlighted with yellow color in Figure 6)
  • Control a single device: This configuration allows a single device to be connected (highlighted with blue color in Figure 6)

4.2.2. Monitoring Total Power Consumption

The total power consumption measurement is carried out using the pzem-004t-100a module. The module measures the input voltage of the electrical panel under study and a current transformer sensor for the current. The module is connected to the ESP32 platform for subsequent data sending.

4.2.3. Monitoring Photovoltaic System

The main parameters considered for monitoring the photovoltaic panel include measuring the current with a current transform (CT) sensor. The sensor delivers a current proportional to the measurement current and a voltage divider for voltage measurement. Both measurements are captured with ADC pins of the Arduino nano development board. Data is sent to the NodeMCU development board Amica, which has WiFi communication and send the data by MQTT along with the date and time they were captured using a real-time clock (RTC).

4.3. Data Acquistion Layer

4.3.1. Monitoring Indoor Environmental Condition

The air quality sensor type “Dragino LAQ4” was used to monitor indoor environmental conditions [26]. The main parameters measured are total volatile organic compound, CO2 equivalent, temperature, and relative humidity of the air. To obtain such indoor environmental data, the configuration of LoRa Gateway is required. In this work, we use the Dragino Gateway LG308 [27].

4.3.2. Monitoring Weather Station

The meteorological information was measured using Davis Advantage Pro 2 Plus weather station [28]. The weather station obtains the data from the sensors physically connected to the station, then sends data wirelessly to the Vantage Pro 2 console. If connected to the datalogger, we can connect the console with a USB cable to the computer. Please note that the weather station is a closed system that does not allow the external manipulation of the data obtained.

4.4. Communication Network Layer

4.4.1. Network Layer

The communication protocols for data transmission are MQTT and LoRa, which have been considered for implementing the communication network layer. For the smart plugs, the communication using MQTT is activated and configured by choosing the MQTT section from the side menu displayed in the web interface of the smart plugs with ESPurna firmware installed. In the case of general measurement devices and photovoltaic panels, the integration of the MQTT protocol is carried out within the code which we were programmed with. The configurations for all devices connecting via MQTT are similar; that is, they connect to the broker running on the Raspberry Pi with the IP 192:168:2:2 through port 1883 and are differentiated by the topic in which they publish. The topics were defined as a descriptive manner of the measurement and the locations where the data are taken and displayed, as shown in Table 4.
Table 4. Description of topics connected to MQTT.
In the case of the air quality measurement device (LAQ4), a procedure should be carried out for the configurations. An account is created on the things network server at (https://www.thethingsnetwork.org (accessed on 10 January 2022)) [29]; then, when registering, you must enter the start section (which leads to the address https://console.cloud.thethings.network/ (accessed on 10 January 2022)) where the Cluster “Nam1” located in the state of Carolina in United States was chosen, and once selected you enter the Gateways tab where you press the + add gateway button, filling in all the requested data, in particular, the Gateway ID which is the unique number associated with each gateway LoRa. For the case of this work, the names used are GatewayOfBuilding, and the gateway ID is gatewaylorabuilding01. Once the registration of the LoRa gateway is completed, one can return to the gateways tab and select the registered gateway to see information about this connection with the network server.
Once the gateway connection has been verified, we go to the applications tab and press the button + add application. Only 3 parameters must be filled, namely “Application ID”, “Application Name” and “Description” that, for this case is filled with the data of smart-“buildingslora-sensors-usmcc” in Application ID and “lora sensors in usmcc” in Application Name. Once the application has been created and when entering it, press the button + add end device and enter the data for the desired sensor, which in this case is the LAQ4. Then, data can be entered corresponding to the manufacturer and model of the device. Next, the sensor’s own parameters, called Registration Key, are entered. In addition, in this case, the value of “airqualitysensorusmcc” was added to the parameter End Device ID, and Register End Device was pressed. Once registration is complete, go back to the applications tab, and in the end devices, one can enter the newly created one. Finally, being inside the added device, it is possible to enter the side menu section Integrations and then MQTT, where the subscription data to the broker of the things network, data that will be used in the application layer to visualize the data.

4.4.2. Cloud Service

There are different service providers for the cloud layer (middleware). The major public service providers include Amazon, Microsoft, and Google [30,31]. Being leaders in the market, it is observed that the services are similar in almost all the services they provide. Due to the difficulty in calculating the costs associated with the service (the charge is made per hour of use and depends on the capabilities contracted), particularly when the project starts and the requirements can change; therefore, it was decided to use the service of virtual machines of Digital Ocean [32].
For this layer, a Raspberry Pi with the Raspberry Pi OS operating system is used, which is loaded into a micro-SD memory by downloading the installation software from (https://www.raspberrypi.com/software/ (accessed on 10 January 2022)), choosing the procedure to install and selecting the memory micro SD to use in the aforementioned Raspberry Pi. For later configuration, the system is accessed using a display with HDMI input and a mouse to activate the option to allow the connection by the SSH protocol. After doing this, it simply connects to the local network via the Ethernet cable. Then, on a computer within the same network, the connection is made via SSH (considering that the IP of the Raspberry Pi is 192.168.2.2).
Once the computer is connected to the Raspberry Pi via SSH, Mosquitto is installed as the selected MQTT broker [33]. Then, Node-RED is installed, with which the data is managed locally, following the official page’s recommendation (nodered.org). To access the node-red programming palette, it is enough to be within the same local network of the Raspberry Pi and go to http://192.168.2.2:1880. Then, once inside the programming palette, the division is made into 3 flows that correspond to smart plugs (see Figure 7a), the metering device alternating current (see Figure 7b) and the direct current measuring device (see Figure 7c). In the 3 flows, MQTT data is received from each device and forwarded using the same protocol (MQTT) to the server hosted at Digital Ocean.
Figure 7. Node-RED configuration for forwarding data received from different devices (a) smart plugs; (b) general energy measurement; (c) direct current measurement.

4.5. Application Layer

The application layer is entirely supported on a virtual machine contracted with the services of Digital Ocean. The system supports a machine with 2 Gb of RAM and 50 Gb of hard disk. To acquire these services, one must enter the provider’s page https://www.digitalocean.com/go/developer-brand (accessed on 10 January 2022) AND must be registered (considering that a valid credit card must be included during the registration process). After logging in to the page, a new project is generated, which, in this case, is called IoTPlatform4ManageEnergy and then the create button is pressed to create a new Droplet which is the way that Digital Ocean calls virtual machines, and this is created with 2 Gb of RAM, 50 Gb of hard disk and the Ubuntu 20.04 operating system is installed (LTS) x64. Once the Droplet has been created, it can be accessed with the fixed IP provided by the provider (165.232.139.50) via SSH. The Mosquitto broker was installed on this server to define communication via MQTT. In addition, Node-RED is installed to manipulate the data, and MySQL is installed to allow data storage. Figure 8 and Figure 9 show the configuration for Node-RED for control and data visualization, respectively.
Figure 8. Configuration for Node-RED for the control of smart plugs.
Figure 9. Configuration for Node-RED for data visualization: (a) Smart plugs; (b) Electric panel; (c) PV system; and (d) Air quality.
The schematic diagram for the complete system is shown in Figure 10. The experiments were carried out on 11 November 2022. Different electric appliances in the laboratory were connected to validate the operation of the platform (Plug01: Hair Drayer-SiEGEN-Model SG-3049, Illumination: Led bulb-9W, Desktop Computer: TV Monitor-LG-24TL520S-PS). The dashboard, shown in Figure 11, Figure 12 and Figure 13, shows an example for those observed from a computer; since Node-red is responsive, the visualization can adapt according to the display device, such as a smartphone or a tablet. Furthermore, with the implementation of the MYSQL database interaction block, the data is saved in the cloud.
Figure 10. Schematic diagram for the complete system.
Figure 11. Real-time monitoring data from an office room.
Figure 12. Real-time monitoring data from a laboratory room.
Figure 13. Real-time monitoring data from a classroom.

5. Discussion

This section provides a detailed analysis of the proposed IoT platform for building implementation and the future extension for large-scale performance on the university campus.

5.1. Analysis

The advances in IoT technologies will play a vital role in the development of different smart building solutions, such as smart lighting to minimize light load, smart HVAC to improve indoor comfort, smart plug loads to monitor and control usage, and smart energy management systems, toward achieving an intelligent campus. Among the key technologies which have been investigated in this work are smart plug loads to monitor and control various types of appliances (located in offices, labs, and classrooms), distributed energy resources including a PV system, outdoor data using a meteorological station, and indoor air quality monitoring. Detailed technical hardware/software configuration and implementations have been discussed, as well as the network connectivity among different subsystems. As real-time data monitoring is the first step toward transforming conventional buildings into smart buildings, the proposed solution will enable the building operator to view, analyze, and predict different appliance profiles and the occupancy of the buildings using a dashboard to visualize such real-time/historical data and alerts.
With respect to the cost, the proposed solution uses off-the-shelf components. The main electronic components used were Sonoff POW R2, PZEN-004T-100A, Raspberry Pi 4B, and Dragino LAQ4, which cost about CLP 20.900, CLP 26.812, CLP 78.390, and CLP 51.899, respectively. The total hardware cost of the proposed solution can be adapted for the university campus to support real-time data monitoring for power consumption from different buildings and environmental data with the objective of improving energy performance and building operation.
Given the experience gained during the development of the proposed IoT platform, the following are the guidelines that need to be considered for developing such a solution (in Chile or another region) that fits the user’s requirements.
  • Definition of requirements and services: This allows knowing the main problems and defining the objectives to be achieved during the full development of the proposed solution following the requirements:
  • Define a network architecture for smart sensors and meters. Structure a network architecture that connects nodes, gateways, and servers seamlessly and efficiently to measure real-time electricity consumption and transmit the information obtained for the end-user.
  • Develop a cloud storage server. This allows data storage and access to the information stored from anywhere through an API.
  • Develop a platform for visualization. This platform enables the visualization of real-time data from each device/appliance connected to the platform.

5.2. Technology Adoption

The way toward an intelligent campus requires the acceptance of new technologies and the opportunities they provide. User perceptions on the acceptance and adoption of smart energy management in the workplace is an essential aspect that needs to be investigated [20,21,34]. In this regard, the work in Ref. [20] identified different types of behavior change interventions that are successful in saving energy in the workplace, such as education, persuasion, incentivization, and training. Another study in Ref. [21] proposed seven design implications that guide the future design of smart energy management systems in the workplace, including internal and external influence, user appeal, user control, ease of use, reliability, personalized and contextualized information, and data privacy. Among the open research topics are conducting a large-scale study in multiple countries (different geographical contexts and cultures) to identify overlaps in user perceptions. In addition, expanding the scope for other workplaces such as hotels, retail stores, and industrial sites [21].

5.3. Future Direction

There are different directions to extend the current work. From the power layer point of view, we aim to extend the current prototype to support an electric vehicle charging station, a battery storage system, smart lighting (dimmer lights and lights coupled with motion sensors), sensors for motion detection, and magnetic sensors for the doors. From the data acquisition layer point of view, our ongoing work aims to develop a low-cost meteorological station using off-the-shelf components to be able to access and control the data obtained. From the communication network layer point of view, heterogeneous communication technologies could be integrated to support different short-/long-range communications across the campus.
As a short-term goal, we aim to demonstrate the feasibility of the proposed IoT platform in one complete building to collect power consumption data during the whole semester with everyday activities and during the vacation period. Before implementing such a system, two different dashboards need to be developed: one for the end-user, who can control their plug loads, and the other for the building administrator. There is also a need to define which control strategy should be selected, which can be a manual or predefined schedule. In this regard, the authors in Ref. [19] performed different plug load automation strategies for a university office space which could be a starting point for the office scenario.
Other challenges are related to the internal electrical wiring for the building, as each floor may share various offices and laboratories from different departments. In addition, the absence of historical power consumption data for buildings/floors/zones. Therefore, historical power consumption data will need to be collected from the main electric panels using smart meters for individual rooms/zones. This step is essential to define spaces with high energy consumption. Based on energy consumption data from different floors/areas, the performance will be evaluated before and after applying different plug load management strategies. Special attention should be given to privacy and security, which should be considered at every step during the platform design. Emerging technologies such as blockchain, machine learning, and artificial intelligence are opening new opportunities to mitigate such security vulnerabilities.

6. Conclusions

This work proposed a cost-effective IoT solution for smart buildings to enable remote monitoring and control of power consumption at the appliance level. The proposed architecture consists of four layers: power layer, data acquisition layer, communication network layer, and application layer. The physical layer was characterized by different subsystems such as plug circuits, lighting, and the photovoltaic system. For the acquisition layer, measurement devices were used for electrical panels, smart plugs, direct current energy metering devices, air quality monitoring, and a meteorological station. The network layer was defined to gather the information captured from the physical layer and forward it to the remote server. A fog layer was implemented on a Raspberry Pi, and the data was handled with NodeRED. The communication technologies defined to obtain the information from the installed equipment were WiFi and LoRa, and the communication protocol to the server was through the MQTT. The Digital Ocean Droplet service was used as a server where the MQTT Broker was installed. For data management, NodeRED was installed for the general management of the data messages and the visualization by the end user. MySQL was installed, which allows storing the information in tables that were defined for each data acquisition device. This project was implemented using a testbed defined to characterize equipment and conditions in three different locations in Engineering Building, Universidad Técnica Federico Santa María, Valparaíso, Chile, including an office, a classroom, and a laboratory. This testbed allowed the design, implementation, and testing of the complete system in reduced space. At the end of the development of this work, a functional platform was obtained that brings together energy consumption data that will contribute to energy awareness and conservation.

Author Contributions

Conceptualization, M.A.A., A.M.E. and Y.-C.K.; methodology, M.A.A., S.A.C., A.M.E., H.O.G., A.J.R. and Y.-C.K.; software, S.A.C.; validation, M.A.A., S.A.C., A.M.E., H.O.G., A.J.R. and Y.-C.K.; writing—original draft preparation, M.A.A. and S.A.C.; writing—review and editing, M.A.A., S.A.C., A.M.E., H.O.G., A.J.R. and Y.-C.K.; funding acquisition, M.A.A., H.O.G., A.J.R. and Y.-C.K. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by the Agencia Nacional de Investigación y Desarrollo (ANID) through the Proyecto Fondecyt de Iniciación en Investigación 2020 under Project ID11200178, Fondecyt Regular Grant project number 1220903 and Basal Center AC3E FB0008, and in part by the National Research Foundation of Korea (NSF) Grant through the Korean Government under Grant (2021R1I1A305872911).

Institutional Review Board Statement

Not applicable.

Data Availability Statement

Not applicable.

Acknowledgments

The authors would like to acknowledge Proyecto Fondecyt de Iniciacion en Investigacion 2020 under Project ID11200178 and the National Research Foundation of Korea (NSF) Grant through the Korean Government under Grant (2021R1I1A305872911). Hugo O. Garces acknowledges the financial support of the Chilean Agency of Research and Development ANID, Chile, under the Fondecyt Regular Grant, project number 1220903. Alejandro J. Rojas acknowledges Basal Center AC3E FB0008.

Conflicts of Interest

The authors declare no conflict of interest.

Nomenclature

IoTInternet of Things
EMSEnergy Management System
BEMSBuilding Energy Management System
CEMSCampus Energy Management System
HVACHeating, Ventilation, and Air Conditioning
HTTPHypertext Transfer Protocol
RESTRepresentational State Transfer
WiFiWireless Fidelity
HANHome Area Network
SLNSmart Load Node
CEMSCampus Energy Management System
CSCharging Station
PVPhotovoltaic
LoRaLong Range
BANBuilding Area Network
MQTTMessage Queuing Telemetry Transport
CoAPConstrained Application Protocol
TTNThe Things Network
CTCurrent Transformer
ADCAnalog to Digital Converter
RTCReal Time Clock
PIRPassive InfraRed

Appendix A

For all devices considered, the communication technology should be compatible with data acquisition, and great importance should be given to equipment and devices that are sold in the country (Chile). Table A1 shows the characteristics of the smart plugs. Due to their significant similarity, the only one that allows the power measurement of the device connected to it has been selected (Sonoff Pow R2). On the other hand, it is decided to use the same smart plug but connected in series to the lighting circuit.
Table A1. Characteristics of smart plug devices.
Table A1. Characteristics of smart plug devices.
ModelXiaomi
Smart Plug *
Sonoff Pow R2
Smart Plug **
S26 WiFi R2
Smart Plug ***
Maximum current16 A16 A16 A
Energy measurementNOYESNO
Connectivity WiFi 2.4 GHzWiFi 2.4 GHzWiFi 2.4 GHz
Price19.990 CLP20.990 CLP14.990 CLP
For the energy measurement device, pzem-004t-100a equipment has been selected, as shown in Table A2. In the case of the temperature and humidity measurement device, significant similarities are observed in the characteristics of all the proposed alternatives. Dragino LAQ4 has been selected, which reads the most number of variables, as shown in Table A3. Table A4 shows the alternative gateway that allows obtaining the data from the LoRa sensors, where minor differences are observed between each device. Since the LG308 LORAWAN gateway is available in the laboratory, it has been selected for this work.
Table A2. Characteristics of energy metering devices.
Table A2. Characteristics of energy metering devices.
ModelSonoff POW R3 *Vbestlife ZMAi-90 **PZEM ***
Voltage input/output100–240 V90–250 V80–260 V
Maximum current25 A60 A100 A
Price48.990 CLP38.570 CLP26.812 CLP
Table A3. Characteristics of devices with ambient sensors.
Table A3. Characteristics of devices with ambient sensors.
ModelLHT65 *Sonoff SNZB-02 **Sonoff TH16+AM2301 ***Dragino LAQ4 ****
ParametersTemperature
Humidity
Temperature
Humidity
Temperature
Humidity
CO2, Temperature
Relative Humidity
PowerBattery 2400 mAhCR2450—3VPower connected4000mAh Li-SOC12
ConnectivityLoRaZigBeeWiFi 2.4 GHzLoRa
Price37.890 CLP9.890 CLP14.990 CLP51.899 CLP
Table A4. Characteristics of LoRa gateway.
Table A4. Characteristics of LoRa gateway.
ModelLG308 *Laird RG191 **LIG16-915 ***
TransceiverSX1308/SX1276SX1301/SX1257SX1302
Frequency915 MHz915 MHz915 MHz
WiFi ConnectivityWiFi 2.4 GHzWiFi 2.4 GHzWiFi 2.4 GHz
Price249.900 CLP499.990 CLP154.690 CLP
The proposed alternatives for the local computing device with its main hardware characteristics are summarized in Table A5. Considering the highest percentage of the connectivity item and the cheap cost of the device, the Raspberry Pi 4B was chosen as the local computing device.
Table A5. Characteristics of computing devices.
Table A5. Characteristics of computing devices.
NameCore/RAMStorageConnectivityPrice
Raspberry Pi 4B *4/4-8SDGigabit Ethernet
WiFi, BLE
78.390 CLP
Odroid-xu4 **8/2Flash boardGigabit Ethernet99.990 CLP
Jetson Nano Nvidia ***4/4microSDGigabit Ethernet185.990 CLP

Appendix B

Figure A1a shows the setup of the smart plug device, while Figure A1b shows the setup of the module pzem-004t-100a. Figure A1c shows the configuration of the solar panel measurement device. The CT sensor must be connected by wrapping the positive cable of the panel, and the terminals of voltage test (brown → ground and red → VCC) are connected in parallel to the current bus of the photovoltaic panel system. Figure A1d shows the configuration of the Dragino LAQ4 device. Figure A2 shows the data obtained using the weather station.
Figure A1. Setup of sensors and measuring devices: (a) smart plug device; (b) pzem-004t-100a module for total power consumption; (c) monitoring the PV system; and (d) Dragino LAQ4 for indoor environmental data.
Figure A2. Weather station data obtained using Weather Link software.

References

  1. Energy Efficiency Law and Plan, Ministry of Energy. Available online: https://energia.gob.cl/ley-y-plan-de-eficiencia-energetica (accessed on 10 June 2022).
  2. Tushar, W.; Wijerathne, N.; Li, W.-T.; Yuen, C.; Poor, H.V.; Saha, T.K.; Wood, K.L. IoT for Green Building Management. arXiv 2018, arXiv:1805.10635. [Google Scholar]
  3. Nugur, A.; Pipattanasomporn, M.; Kuzlu, M.; Rahman, S. Design and Development of an IoT Gateway for Smart Building Applications. IEEE Internet Things J. 2019, 6, 9020–9029. [Google Scholar] [CrossRef]
  4. Alsuhli, G.; Khattab, A. A Fog-based IoT Platform for Smart Buildings. In Proceedings of the 2019 International Conference on Innovative Trends in Computer Engineering (ITCE), Aswan, Egypt, 2–4 February 2019; pp. 174–179. [Google Scholar]
  5. Eltamaly, A.M.; Alotaibi, M.A.; Alolah, A.I.; Ahmed, M.A. IoT-Based Hybrid Renewable Energy System for Smart Campus. Sustainability 2021, 13, 8555. [Google Scholar] [CrossRef]
  6. Jia, M.; Komeily, A.; Wang, Y.; Srinivasan, R.S. Adopting Internet of Things for the development of smart buildings: A review of enabling technologies and applications. Autom. Constr. 2019, 101, 111–126. [Google Scholar] [CrossRef]
  7. Vijayan, D.S.; Rose, A.L.; Arvindan, S.; Revathy, J.; Amuthadevi, C. Automation systems in smart buildings: A review. J. Ambient Intell. Humaniz. Comput. 2020, 1–13. [Google Scholar] [CrossRef]
  8. Zhang, X.; Pipattanasomporn, M.; Chen, T.; Rahman, S. An IoT-Based Thermal Model Learning Framework for Smart Buildings. IEEE Internet Things J. 2020, 7, 518–527. [Google Scholar] [CrossRef]
  9. Singh, S.; Roy, A.; Selvan, M.P. Smart Load Node for Nonsmart Load Under Smart Grid Paradigm: A New Home Energy Management System. IEEE Consum. Electron. Mag. 2019, 8, 22–27. [Google Scholar] [CrossRef]
  10. Saleem, Y.; Crespi, N.; Rehmani, M.H.; Copeland, R. Internet of Things-Aided Smart Grid: Technologies, Architectures, Applications, Prototypes, and Future Research Directions. IEEE Access 2019, 7, 62962–63003. [Google Scholar] [CrossRef]
  11. Abir, S.M.A.A.; Anwar, A.; Choi, J.; Kayes, A.S.M. IoT-Enabled Smart Energy Grid: Applications and Challenges. IEEE Access 2021, 9, 50961–50981. [Google Scholar] [CrossRef]
  12. Shakerighadi, B.; Anvari-Moghaddam, A.; Vasquez, J.; Guerrero, J. Internet of Things for Modern Energy Systems: State-of-the-Art, Challenges, and Open Issues. Energies 2018, 11, 1252. [Google Scholar] [CrossRef]
  13. Wu, Y.; Wu, Y.; Guerrero, J.; Vasquez, J.; Palacios-García, E.; Guan, Y. IoT-enabled Microgrid for Intelligent Energy-aware Buildings: A Novel Hierarchical Self-consumption Scheme with Renewables. Electronics 2020, 9, 550. [Google Scholar] [CrossRef]
  14. Choi, J.S. A Hierarchical Distributed Energy Management Agent Framework for Smart Homes, Grids, and Cities. IEEE Commun. Mag. 2019, 57, 113–119. [Google Scholar] [CrossRef]
  15. Aliero, M.S.; Asif, M.; Ghani, I.; Pasha, M.F.; Jeong, S.R. Systematic Review Analysis on Smart Building: Challenges and Opportunities. Sustainability 2022, 14, 3009. [Google Scholar] [CrossRef]
  16. Fanti, M.P.; Mangini, A.M.; Roccotelli, M.; Ukovich, W. A District Energy Management Based on Thermal Comfort Satisfaction and Real-Time Power Balancing. IEEE Trans. Autom. Sci. Eng. 2015, 12, 1271–1284. [Google Scholar] [CrossRef]
  17. Plageras, A.P.; Psannis, K.E.; Stergiou, C.; Wang, H.; Gupta, B.B. Efficient IoT-based sensor BIG Data collection–processing and analysis in smart buildings. Futur. Gener. Comput. Syst. 2018, 82, 349–357. [Google Scholar] [CrossRef]
  18. Yuan, F.; Yao, R.; Sadrizadeh, S.; Li, B.; Cao, G.; Zhang, S.; Zhou, S.; Liu, H.; Bogdan, A.; Croitoru, C.; et al. Thermal comfort in hospital buildings—A literature review. J. Build. Eng. 2022, 45, 103463. [Google Scholar] [CrossRef]
  19. Tekler, Z.D.; Low, R.; Yuen, C.; Blessing, L. Plug-Mate: An IoT-based occupancy-driven plug load management system in smart buildings. Build. Environ. 2022, 223, 109472. [Google Scholar] [CrossRef]
  20. Staddon, S.C.; Cycil, C.; Goulden, M.; Leygue, C.; Spence, A. Intervening to change behaviour and save energy in the workplace: A systematic review of available evidence. Energy Res. Soc. Sci. 2016, 17, 30–51. [Google Scholar] [CrossRef]
  21. Tekler, Z.D.; Low, R.; Blessing, L. User perceptions on the adoption of smart energy management systems in the workplace: Design and policy implications. Energy Res. Soc. Sci. 2022, 88, 102505. [Google Scholar] [CrossRef]
  22. Elsisi, M.; Tran, M.-Q.; Mahmoud, K.; Lehtonen, M.; Darwish, M.M.F. Deep Learning-Based Industry 4.0 and Internet of Things towards Effective Energy Management for Smart Buildings. Sensors 2021, 21, 1038. [Google Scholar] [CrossRef]
  23. Pandharipande, A.; Zhao, M.; Frimout, E. Connected Indoor Lighting Based Applications in a Building IoT Ecosystem. IEEE Internet Things Mag. 2019, 2, 22–26. [Google Scholar] [CrossRef]
  24. SONOFF Smart Plug Products. Available online: https://sonoff.tech/products/ (accessed on 10 January 2022).
  25. ESPurna Firmware. Available online: https://github.com/xoseperez/espurna (accessed on 10 January 2022).
  26. LoRaWAN Air Quality Sensor. Available online: https://www.dragino.com/products/lora-lorawan-end-node/item/174-laq4.html (accessed on 10 January 2022).
  27. LG308 Indoor LoRaWAN Gateway. Available online: https://www.dragino.com/products/lora-lorawan-gateway/item/140-lg308.html (accessed on 10 January 2022).
  28. Davis 6152 Wireless Vantage Pro2. Available online: https://www.davisinstruments.com/pages/vantage-pro2 (accessed on 10 January 2022).
  29. The Things Network. Available online: https://www.thethingsnetwork.org/ (accessed on 1 May 2022).
  30. Liu, Y.; Akram Hassan, K.; Karlsson, M.; Pang, Z.; Gong, S. A Data-Centric Internet of Things Framework Based on Azure Cloud. IEEE Access 2019, 7, 53839–53858. [Google Scholar] [CrossRef]
  31. Pierleoni, P.; Concetti, R.; Belli, A.; Palma, L. Amazon, Google and Microsoft Solutions for IoT: Architectures and a Performance Comparison. IEEE Access 2020, 8, 5455–5470. [Google Scholar] [CrossRef]
  32. Digital Ocean. Available online: https://www.digitalocean.com/, (accessed on 1 May 2022).
  33. Eclipse Mosquitto. Available online: https://mosquitto.org/, (accessed on 1 May 2022).
  34. Krishnamurti, T.; Schwartz, D.; Davis, A.; Fischhoff, B.; de Bruin, W.B.; Lave, L.; Wang, J. Preparing for smart grid technologies: A behavioral decision research approach to understanding consumer expectations about smart meters. Energy Policy 2012, 41, 790–797. [Google Scholar] [CrossRef]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.