## 2 System Architecture
### The PROMET&O Architecture  
The overall system architecture consists of three primary components, as shown in Figure 1. Firstly, the IoT layer encompasses the monitoring devices, networking devices, and connectivity equipment. It is comprised of ad hoc designed multi-sensors devices, which are responsible for measuring physical quantities associated with thermal, lighting, acoustic, and air quality. In such a way, a continuous and real-time indoor monitoring of several physical parameters can be achieved. The acquired data are preprocessed by the multi-sensors devices themselves prior to be sent to the cloud server for further processing and visualization. A modern enables the creation of a WiFi network, to which the monitoring devices are connected, and provides access to the cloud platform via a 3G/4G connection. The data transfer between each multi-sensor unit and the cloud server is accomplished through the message queuing telemetry transport (MQTT) protocol, which is a publish-subscribe protocol popular among IoT applications. Such a protocol allows devices, such as the PROMET&O multi-sensors, to specify topics of interest, serving as communication channels for sharing (publishing) measurements of the various environmental parameters. Devices can also subscribe to these topics to receive the messages containing the published data.  
The data processing layer provides the storage of raw sensor data, performs analytics derived from this data, and exposes an Application Programming Interface (API) for querying purposes. All MQTT messages are conveyed to the broker, a software application that is in charge of managing the MQTT communication. It receives messages published on the different topics and redirects them to all the subscribers. A Python-based software application acts as an MQTT client, subscribing to the topics of all the PROMET&O multi-sensors to receive their measurements. All received data are stored in a database, where a Python-based scheduler is in charge of periodically running software jobs that perform data aggregation and enrichment. A web API allows external access to stored information.  
Lastly, the data visualization layer assumes responsibility for data visualization and dashboard creation for end-users, in conjunction with security layers that regulate access exclusively to authorized entities. As far as the the data visualization layer is concerned, a key aspect is the integration of a dashboarding web application, namely Grafana (v10.4.2) [35], and an Identity and Access Management software (IAM), exemplified by Keycloak (v24.0) [36], into a primary web application developed in React (v18.2) [37].  
While the predominant approach among low-cost IoT monitoring systems [31; 32] involves providing end-users with the same data visualization interface accessible within the backend dashboarding application, it is worth noting that such interfaces are primarily tailored for professionals. In this work, on the contrary, the web application enables the embedding of charts within the organization's website, ensuring consistency in User Interface (UI) style and navigation patterns. In addition, the IAM software offers a fine -grained authentication system, granting selective access to both internal staff and third-party users.