Iren Lorenzo Fonseca, Francisco Maciá Pérez, Alex Maciá-Fiteni, Lucía Arnau Muñoz
Institutional buildings still lack effective, real-time mechanisms to detect energy consumption anomalies, causing inefficiencies, higher costs and environmental impact. Many current solutions remain centralized or isolated, which limits real-time detection, Internet of Things (IoT) integration and distributed intelligence. This gap is addressed by the Electricity Consumption Anomaly Detector (eCAD), a system that combines multi-agent architectures, artificial intelligence, and IoT within an edge-computing infrastructure that enables autonomous, real-time anomaly detection with minimal latency and efficient use of resources. eCAD processes heterogeneous data sources, including Wi-Fi access-point data, temporal patterns, and occupant-related variables such as academic context. This comprehensive feature set enables context-aware, autonomous identification of anomalous consumption. The system was deployed on the Smart University platform at the University of Alicante, where distributed agents collect, process, and visualize energy data in real time. Experimental results show an accuracy of 91.02%, with low false-positive and false-negative rates. Unlike most prior approaches, the proposed architecture offers a distinctive contribution: a holistic and scalable framework that integrates data acquisition, analysis, and visualization at the edge, validated in a real-world academic environment. Complementary analyses further confirmed the stability, operational impact, and scalability of the system.