Inspiration
On June 1st, 2025, when I was informed of the hackathon and decided to join, I was looking to work on an imminent real-world problem that's affecting myself, my community, and probably the whole world—one that could be resolved by tech and showcased in this hackathon. That's why, the next day when I was heading to downtown Toronto for an event, I was inspired by the problem and the solution that came to me right after it. That morning, the beautiful skyline of the city was shrouded in a sad gaze of haze and smoke that had reached the city from burning wildfires up in the north, increasing polluted air alerts across many Canadian cities, including my own. The feeling of helplessness in the face of such a massive environmental challenge was the direct inspiration for this project: to empower ordinary citizens with technology to become the first line of defense against wildfires.
What it does
The Citizen-Assisted Wildfire Detection & Prevention System is an end-to-end platform designed to create a dense, low-cost, and resilient early-warning network for forests. It works through four key layers:
- Low-Cost Sensor Nodes: Battery-powered devices equipped with smoke and flame sensors are deployed by citizen volunteers. Each sensor is assigned a unique geographic coordinate as its ID, eliminating the need for expensive and power-hungry GPS modules.
- Dual-Protocol Communication: The sensors feature a resilient communication system. They first attempt to report status and alerts via the long-range Sigfox network. If Sigfox coverage is unavailable, they automatically failover to a decentralized LoRa Meshtastic network, relaying messages through other nearby sensors until they reach a gateway.
- Intelligent Edge Gateway & AI Hub: A powerful hub, built on an NVIDIA Jetson AGX Orin, acts as the bridge between the off-grid LoRa mesh and the cloud. It not only relays data but also serves as a Federated Learning Hub, training predictive AI models on local sensor data without ever compromising the raw data itself.
- Central Management Portal: A comprehensive web portal serves as the command center.
- Citizens can register, select deployment coordinates on a map, and use a groundbreaking WebUSB tool to provision their sensors directly from their browser—no technical skill required.
- Fire Crews have an admin dashboard to view a real-time map of all sensors, receive instant alerts, attest to fire events, and manage the network.
- Blockchain Rewards: The system integrates with the Algorand blockchain to automatically reward citizens for validated, successful fire alerts, creating a powerful incentive for community participation.
How we built it
We designed a full-stack solution, combining embedded systems, edge AI, cloud infrastructure, and a modern web front-end.
Sensor Node Hardware: We chose the STMicroelectronics NUCLEO-WL55JC1 for its powerful and efficient dual-mode Sub-GHz radio. We coupled this with an MQ-2 Smoke Sensor, an IR Flame Sensor, and a standard 18650 Li-Ion battery for power.
Firmware: The sensor firmware was developed in C/C++ using the STM32CubeIDE. We utilized ST's Hardware Abstraction Layer (HAL) and official middleware to implement the complex logic of dynamically switching the radio between Sigfox (DBPSK modulation) and LoRa (LoRa modulation) for our failover system.
Gateway & AI Hub: We used an NVIDIA Jetson AGX Orin running a Linux-based OS. A Meshtastic-compatible LoRa board (like a TTGO T-Beam) was connected via USB. The software, written in Python, runs two main services:
- A Meshtastic daemon that bridges all received LoRa packets to an MQTT broker.
- A Federated Learning service using the Flower framework and PyTorch to train an AI model on the ingested sensor data.
Backend: We architected the backend on Supabase, leveraging its PostgreSQL database (with TimescaleDB extension for sensor data), Auth, and serverless Edge Functions.
- An Edge Function acts as a secure webhook to receive data from the Sigfox Cloud.
- A separate Node.js MQTT Bridge service listens to our MQTT broker and pipes the Meshtastic data into Supabase, creating a unified data pipeline.
Frontend: The web portal, built with React and deployed on Netlify, communicates with our Supabase backend. It uses the Supabase.js client for real-time data subscriptions to power the live map and the WebUSB API for our direct-from-browser device provisioning feature.
Challenges we ran into
Hardware & Firmware Mismatch: Our initial plan was to use the NUCLEO-WL55JC1 board for all nodes. We quickly discovered that while the hardware is capable, stable, community-built Meshtastic firmware for it does not yet exist. This forced a crucial design pivot: we specified the NUCLEO board for its excellent Sigfox support and designated standard, well-supported ESP32 boards (like the T-Beam) for the dedicated Meshtastic gateway role. It was a powerful lesson in verifying software support before finalizing hardware.
Real-time Data Unification: Our system ingests data from two completely different sources (a Sigfox webhook and an MQTT stream). Displaying this on the frontend in real-time was a challenge. We solved this by designing our backend to funnel both data streams into a single Supabase table. The frontend then only needed to subscribe to this one table using Supabase Realtime, which greatly simplified our logic.
WebUSB Implementation: Building the browser-based provisioning tool was complex. It required a deep understanding of the WebUSB API, the STM32 DFU (Device Firmware Upgrade) bootloader protocol, and writing JavaScript code to safely "patch" a unique ID into a raw firmware binary without corrupting it. Debugging this a-synchronous process was a significant, but ultimately rewarding, challenge.
Accomplishments that we're proud of
The WebUSB Provisioning System: This is our proudest accomplishment. By allowing any user to configure a complex IoT device with just a few clicks in their browser, we feel we've truly captured the "citizen-assisted" spirit of the project and made it scalable for a non-technical audience.
Resilient Dual-Protocol Communication: Designing and implementing the Sigfox-to-LoRa failover logic at the firmware level was a major success. It makes our network robust and practical for deployment in the real world, where connectivity is never guaranteed.
End-to-End System Integration: We successfully designed and demonstrated a complete system that spans from low-level embedded programming and radio protocols to edge AI on a Jetson, cloud infrastructure, a full-featured web app, and blockchain integration.
What we learned
The User Experience is Everything: Our pivot to the WebUSB flashing tool was a key learning moment. We realized that for a community project to succeed, the onboarding process must be incredibly simple. Lowering the barrier to entry is more important than almost any other feature.
The Power of a Unified Data Pipeline: Our decision to funnel both Sigfox and Meshtastic data into a single database table before sending it to the frontend saved us countless hours of development and complexity. Abstracting the data source away from the UI is a powerful design pattern.
Edge AI is Accessible: We learned that running a legitimate Federated Learning hub on an edge device like the Jetson Orin is not just theoretical—it's practical. It opens up incredible possibilities for building privacy-preserving, predictive AI models using live data from the field.
What's next for Citizen-Assisted Wildfire Detection & Prevention System
Our vision for this project is just beginning. The next steps are to move from prototype to a production-ready system.
Pilot Program & Partnerships: We plan to partner with conservation authorities and fire departments in Ontario to deploy a pilot network of 100-200 nodes in a high-risk area to test the system's effectiveness and gather real-world data.
Hardware Miniaturization: We will design a custom PCB that integrates the STM32WL microcontroller, sensors, and power management onto a single, smaller, and more cost-effective board, optimizing it for mass production.
Advance the AI Model: As more data is collected, we will enhance the Federated Learning model on the Jetson Hub to move beyond simple detection and begin predicting high-risk conditions before a fire starts, based on micro-climate trends.
Develop a Native Mobile App: A mobile app for iOS and Android will provide a more seamless experience for volunteers and offer critical push notifications for instant alerts to fire crews.
Built With
- autonomaline
- c
- ci/cd
- cyber-physical-ai
- federated-machine-learning
- firmware
- flow
- hpc-gateway
- lora
- node.js
- script
- sigfox
- sql
- supabase
- typescript
Log in or sign up for Devpost to join the conversation.