###### Abstract  
Smart environments exploit rising technologies like Internet of Things (IoT) and edge intelligence (EI) to achieve unseen effectiveness and efficiency in every tasks, including air sanitization. The latter represents a key preventative measure-made even more evident by the COVID-19 pandemic-to significantly reduce disease transmission and create healthier and safer indoor spaces, for the sake of its occupants. Therefore, in this paper, we present an IoT-based system aimed at the continuous monitoring of the air quality and, through EI techniques, at the proactively activation of ozone lamps, while ensuring safety in sanitization. Indeed, these devices ensure extreme effectiveness in killing viruses and bacteria but, due to ozone toxicity, they must be properly controlled with advanced technologies for preventing occupants from dangerous exposition as well as for ensuring system reliability, operational efficiency, and regulatory compliance.  
s mart environment; edge intelligence; air quality monitoring; air sanitization; internet of things +
Footnote †: journal:  
0000-0001-4000-0000-0000-0000-0000-0000-0000-00000-00000-0000-0  
with proper temperature and humidity levels), these systems must be properly controlled with advanced technologies for preventing occupants from dangerous exposition while ensuring proper sanitization standards. Therefore, accurate presence monitoring systems, ubiquitous deployments of heterogeneous environmental sensors, adequate notifications systems, and dynamic actuators' operations are some of the functionalities that make the Internet of Things (IoT) [5] a key enabler for the healthiness and safety of smart environments (i.e., a physical space provided by a network of interconnected devices that collect data and use it to provide intelligent services to users) [6].  
In this article, we propose an IoT-based system that, through a continuous monitoring of the air quality within an indoor scenario (e.g., office, classroom, mall, museum), enables its sanitization by exploiting ozone lamps. By integrating different hardware and software technologies and distributing computation and storage tasks across the local and remote elements, the proposed system fully automates the operation of UV-C lamps in full safety: such approach advances the state-of-the-art solutions, which are, in most cases, exclusively focused on air quality monitoring and dependent on human operators for managing sanification actions (with obvious difficulties and costs if the target deployment is of a large scale). In particular, edge intelligence (EI) [7] techniques and the Amazon Web Services (AWS) [8] infrastructure are exploited to streamline the management of on-premise IoT devices and to distribute the processing of their data between the edge and the cloud, thus maximizing the effectiveness of UV-C lamps and their reliability, safety, and lifetime. Indeed, the analysis, design, and implementation phases of such hybrid edge-cloud systems are detailed by presenting both hardware and software components and their contribution to the implementation of the different system functionalities (monitoring, warning and notification, storage, etc.).  
The rest of this article is organized as follows: in Section 2, background concepts about smart environments, IoT, and EI are provided with a brief analysis of the related work. In Section 3, the application scenario is analyzed, its requirements elicited, and the resulting design choices illustrated, with benefits, limitations, and future work discussed in Section 4. Section 5 concludes the article with final remarks.