Worldwide increasing awareness of energy sustainability issues has been the main driver in developing the concepts of (Nearly) Zero Energy Buildings, where the reduced energy consumptions are (nearly) fully covered by power locally generated by renewable sources. At the same time, recent advances in Internet of Things technologies are among the main enablers of Smart Homes and Buildings. The transition of conventional buildings into active environments that process, elaborate and react to online measured environmental quantities is being accelerated by the aspects related to COVID-19, most notably in terms of air exchange and the monitoring of the density of occupants. In this paper, we address the problem of maximizing the energy efficiency and comfort perceived by occupants, defined in terms of thermal comfort, visual comfort and air quality. The case study of the University of Pisa is considered as a practical example to show preliminary results of the aggregation of environmental data.