Authors - Marco Vinicio Lopez R., Maria Cristina Espin Melendez, Jeanette Elizabeth Jordan Buenano, Santiago Vayas Castro, Segundo Moises Toapanta Toapanta, Ruben Nogales Portero, Juan Escobar Naranjo, Diego Gustavo Andrade Armas, Rodrigo Del Pozo Durango Abstract - Connecting more devices to monitor energy and the environment creates serious hurdles for data security, integrity, and scale. This research presents a system merging blockchain with IoT, built specifically to respect Ecuador’s Organic Law on Personal Data Protection (LOPDP). The setup uses ESP32 microcontrollers and sensors to track environmental and power data, sending it over the MQTT protocol to a database. Digital fingerprints created with SHA-256 are locked onto a private blockchain using Proof-of-Authority to keep every record permanent and unchangeable. A 10-day experiment in two indoor spaces generated roughly 96,000 records to test how the system holds up in the real world. Results demonstrate the system's viability, achieving a median end-to-end latency of 182 ms (P95 < 240 ms), a Node Availability Index (NAI) of 98.6%, and an Anomaly Detection Rate (ADR) of 91.4%. Furthermore, the blockchain integration introduced a computational and energy overhead of less than 7%. The study concludes that this architecture provides a verifiable link between physical sensors and digital records, highlighting the bidirectional need for technology to comply with national privacy laws while urging regulatory frameworks to evolve and formalize smart contract applications.