In this paper, we present a privacy-preserving scheme for Overgrid, a fully distributed peer-to-peer (P2P) architecture designed to automatically control and implement distributed Demand Response (DR) schemes in a community of smart buildings with energy generation and storage capabilities. To monitor the power consumption of the buildings, while respecting the privacy of the users, we extend our previous Overgrid algorithms to provide privacy preserving data aggregation (PP-Overgrid). This new technique combines a distributed data aggregation scheme with the Secure Multi-Party Computation paradigm. First, we use the energy profiles of hundreds of buildings, classifying the amount of “flexible” energy consumption, i.e., the quota which could be potentially exploited for DR programs. Second, we consider renewable energy sources and apply the DR scheme to match the flexible consumption with the available energy. Finally, to show the feasibility of our approach, we validate the PP-Overgrid algorithm in simulation for a large network of smart buildings.