
Introduction
In 2024, Next Trend LAB received a research grant from DeepFunding, a funding initiative within the SingularityNET ecosystem, to investigate whether decentralized artificial intelligence could be meaningfully integrated with IoT devices for smart energy optimization. The question was not abstract. Energy inefficiency is a measurable problem; the International Energy Agency estimates that nearly 30 percent of energy consumed globally is wasted. For households in Lagos and across Nigeria, where energy costs are high and grid reliability is inconsistent, a system that could intelligently reduce waste without compromising data privacy had real value.
What followed was a three-milestone research program that moved from feasibility study to prototype to real-world pilot deployment. This post summarizes what we built, how it performed, and what we learned.
The Problem With Centralised AI
Most existing smart home systems, like Amazon Alexa, Google Nest, IBM Watson IoT route device data to central cloud servers for processing. This creates three compounding problems. First, latency: data must travel to a server and back before a decision is made, often exceeding 1,200 milliseconds in standard implementations. Second, privacy: raw household energy data is stored and processed by third parties. Third, single points of failure: if the network connection drops or the cloud service experiences downtime, the system stops working.
Decentralized AI addresses all three by moving computation to the edge, the device itself, using techniques like federated learning, where each device trains a model on its own local data and shares only the model parameters, never the raw data, with other nodes in the network.
Milestone 1: Feasibility Research
Our first milestone was a comprehensive feasibility study. We reviewed existing literature on decentralized AI algorithms and IoT protocols, conducted user surveys, and ran experiments with consumer smart home devices, including Amazon Echo, Philips Hue smart bulbs, Nest Learning Thermostat, Wyze cameras, and Ring Doorbell, connected through Raspberry Pi 4 and NVIDIA Jetson Nano edge processors.
We tested three decentralized AI approaches:
Federated Learning: on Raspberry Pi 4 for Wyze camera feeds demonstrated that on-device video analysis was achievable without transmitting raw footage. Privacy was preserved, but the Raspberry Pi struggled with real-time high-definition processing, producing delays in object recognition.
Reinforcement Learning: on NVIDIA Jetson Nano for the Nest thermostat and Philips Hue lights showed strong adaptability to user behavior patterns. The system learned occupancy schedules and adjusted lighting and temperature accordingly. Computational demands during training were higher than anticipated.
Swarm Intelligence: coordinating Amazon Echo, Philips Hue, and Ring Doorbell across a Zigbee and Z-Wave mesh network produced measurable energy coordination gains, but latency increased as the device count grew beyond fifteen units on the same network.
Our survey of 21 respondents found that 47.62% expressed great concern about data privacy in cloud-based smart home systems. Only 4.76% reported no concerns at all. Willingness to pay was split: 38.1% would pay slightly more for privacy-preserving devices, while 33.33 percent wanted current market pricing. The research confirmed both the technical feasibility and the market demand for a decentralized approach and identified the need for more power-efficient edge hardware than the Raspberry Pi 4 for production deployment.
Milestone 2: Prototype Development
Building on the feasibility findings, we designed and built a purpose-built prototype using ESP32-S3 microcontrollers, selected over Raspberry Pi for their superior energy efficiency, built-in Wi-Fi 6 support, and compatibility with TinyML frameworks.
The hardware stack:
ESP32-S3 dual-core microcontroller with 4MB PSRAM
PZEM-004T power sensor measuring voltage, current, and power with less than 0.5 percent error margin
DHT sensor for ambient temperature and humidity
SD card module for local data logging
Relay module for automated load control
Thread Border Router replacing Zigbee to address the latency and scalability issues identified in Milestone 1
The software stack:
Edge Impulse for training a Decision Tree classifier at 12KB RAM footprint
Federated Learning via the Flower framework
MQTT-TLS for encrypted model update transmission
ESP-NOW for low-latency device-to-device communication without requiring active Wi-Fi
The Federated Learning workflow ensured that no raw energy data left any device. Each ESP32 trained its decision tree model locally on approximately 10,000 collected samples, then transmitted only the encrypted model weight updates to a federated server, which aggregated them into an improved global model and redistributed it to all devices.
Performance under controlled laboratory conditions with five devices managing a cumulative 500W load:
Metric | Result | Target |
|---|---|---|
Energy savings | 22.3% | 20% or more |
Response latency | 450ms (15 devices) | Under 500ms |
Device power consumption | 3.2W per device | Under 5W |
Predictive accuracy | 89% F1 score | 85% or above |
An independent penetration test confirmed no critical vulnerabilities in the data transmission protocols. AES-256 encryption added only 12ms of overhead. The prototype was confirmed to be GDPR compliant.
Milestone 3: Pilot Testing in Real Homes
The final milestone moved the system out of the lab and into three residential environments in Nigeria over four weeks with nine participants:
Home A: Single-occupant apartment
Home B: Family home with four occupants
Home C: Smart hostel with five occupants
Results:
Home | Energy Savings | Notes |
|---|---|---|
Home A | 18.7% | Lower baseline device usage |
Home B | 26.1% | Peak-hour optimisation most effective |
Home C | 31.4% | High automation density maximised efficiency |
Average | 25.4% | Exceeded 22% lab projection |
AI model accuracy improved from 90 percent in the lab to 94.6 percent in the field, driven by real-world data diversity through the federated learning cycle. Each inference took 85 milliseconds. System response latency held at 320 milliseconds across all three homes.
Three issues were identified and resolved during the pilot. Dashboard load times experienced minor lag, addressed through code optimization and caching. The AI produced occasional false positives in load detection, resolved by retraining on the updated real-world dataset. Initial device setup was found complex by some users, resolved through live virtual onboarding sessions.
User satisfaction at the end of the four weeks:
Criteria | Positive |
|---|---|
Ease of use | 83.3% |
System reliability | 85% |
Security and privacy | 85% |
Overall satisfaction | 92.6% |
What We Learned
Three things stood out across all three milestones.
First, hardware choice is decisive. The move from Raspberry Pi 4 to ESP32-S3 was not incidental, it was the difference between a system that struggled with real-time inference and one that ran reliably at 85ms per inference on 3.2W of power. For edge AI to work in homes, especially in contexts with unreliable power supply, the compute unit must be efficient before anything else.
Second, federated learning is practically viable, not just theoretically elegant. In both the lab and the field, the system improved its model without ever transmitting raw user data. The privacy guarantees were not a marketing claim, they were a structural property of the architecture, confirmed by independent penetration testing.
Third, energy savings scale with automation density. The smart hostel achieved 31.4 percent savings compared to 18.7 percent in the single-occupant home. This suggests that the technology's value proposition grows significantly in multi-device, multi-occupant environments, which is precisely the profile of the residential and commercial buildings that consume the most energy.
What Is Next
The pilot confirmed readiness for broader deployment. Our recommendation following Milestone 3 is to scale to 100 or more users across diverse residential and commercial environments, implement continuous AI-driven monitoring, and expand the feature set based on the feedback collected.
This research was conducted under a DeepFunding grant within the SingularityNET ecosystem. The full milestone reports, test data, and user feedback documentation are available on the DeepFunding Platform.
Next Trend LAB is a predecessor organization to NexTrium. This research represents the kind of grounded, evidence-based work that NexTrium continues to pursue.