This repository contains an IoT-enabled Forest Fire Detection System designed to monitor environmental conditions and predict fire risk in real time. It includes a Flutter-based mobile application, sensor data fetching using NodeMCU, and a basic machine learning model - xgboost for fire prediction.
The system monitors temperature, humidity, and smoke levels, and visualizes the data in a user-friendly mobile interface.
- Real-Time Monitoring: Tracks temperature, humidity, and smoke levels from sensors.
- Mobile Dashboard: Flutter app displays live data and predictions in a clean UI.
- ML-Based Prediction: XGBoost model trained to classify whether sensor readings indicate fire.
- IoT Integration: NodeMCU fetches and transmits data using Wi-Fi.
- Database Storage: Sensor values and predictions are stored in a MySQL database.
- Resident Alert System: Button in the app to notify nearby residents with safety instructions.
- Expandable: Future integration with AR/VR fire spread simulations and remote server dashboards.
- Flutter: For the mobile UI.
- NodeMCU: For data collection from DHT11, MQ-2 sensors, etc.
- Python & jupyter: For training and running the ML model.
- MySQL: For storing and syncing sensor data.
- C and Arduino IDE: For programming microcontrollers.
| Technology | Purpose |
|---|---|
| Flutter | Mobile app for real-time monitoring |
| NodeMCU | IoT microcontroller for sensor interfacing |
| MQ-2 Sensor | Smoke detection |
| DHT11 Sensor | Temperature and humidity measurement |
| Python | Machine learning model development |
| XGBoost | ML model for fire risk classification |
| MySQL | Backend database |
| C (Arduino IDE) | Microcontroller programming |
To run this project, ensure you have the following installed:
- Flutter SDK (latest version)
- Python 3.7+
- Arduino IDE (for NodeMCU)
- Hardware: DHT11, MQ-2, NodeMCU, Breadboard, Jumper wires
- Database: MySQL account for backend data storage
-
Sensor Layer
The DHT11 and MQ-2 sensors measure environmental conditions and transmit data via NodeMCU. -
Data Transmission
NodeMCU sends sensor readings over Wi-Fi to a backend server (or directly to the mobile app via Firebase/MySQL). -
Prediction Engine
The ML model (XGBoost) predicts fire risk using the incoming data. -
User Interface
A Flutter-based mobile app displays:- Live data (temperature, humidity, smoke)
- Fire prediction result
- Alert functionality for residents
- Algorithm: XGBoost Classifier
- Input Features: Temperature, Humidity, Smoke Levels
- Training Dataset: Custom collected sensor readings under fire and non-fire conditions
- Accuracy: ~96.4%
- Evaluation Metrics: Precision, Recall, F1-score, Confusion Matrix
The model is lightweight and optimized for fast predictions on limited hardware setups.
| Installation and Setup |
|---|
![]() |
| Demo of the Project |
|---|
| https://github.com/Bevinaa/Forest-Fire-Detection-System/demo.mp4 |
| Mobile Application | Fire Prediction |
|---|---|
![]() |
![]() |
| Analytics Dashboard |
|---|
![]() |
![]() |
Author: Bevina R
Email: bevina2110@gmail.com
GitHub: Bevinaa




