Skip to content

Latest commit

 

History

52 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

EnvMon

Environmental Monitoring and Data Analysis Platform

Python Flask React Raspberry Pi SQLite

EnvMon is an IoT platform that combines a Raspberry Pi-based acquisition device with a web Ground Station for collecting, organizing, visualizing, and analyzing environmental data.

The system supports mobile and static monitoring missions through four operating profiles: Drone, Car, Bicycle, and Static Station.

Project Demonstration

EnvMon platform overview

Watch the full project demonstration

Overview

EnvMon covers the complete monitoring workflow, from acquiring measurements in the field to exploring them in a web application. Environmental readings, GPS coordinates, images, and mission metadata are recorded by the acquisition device and organized into separate monitoring missions.

After a mission is completed, its data can be imported into the Ground Station, stored in a local database, displayed on interactive maps, and analyzed through heatmaps, charts, and AI-assisted reports.

Key Features

  • Automatic discovery and management of EnvMon devices in the local network
  • Environmental telemetry acquisition using a BME680 sensor
  • GPS positioning and optional image capture
  • Drone, Car, Bicycle, and Static Station operating profiles
  • Mission configuration, execution, import, and local storage
  • Live mission tracking and telemetry visualization
  • Interactive routes, measurement points, and environmental heatmaps
  • Single-mission and multi-mission graphical analysis
  • AI-assisted mission reports
  • Simulation scenarios for testing without a physical deployment

System Architecture

EnvMon system architecture

The Raspberry Pi device collects environmental measurements, GPS data, and optional images. A local Flask REST API allows the Ground Station to check the device status, control missions, and import completed datasets.

The Ground Station backend manages synchronization, mission processing, and database access, while the React frontend provides the user interface for mission control, mapping, and analysis.

Operating Profiles

Profile Monitoring scenario GPS usage Image capture
Drone Mobile aerial monitoring Continuous Optional
Car Mobile road monitoring Continuous Usually disabled
Bicycle Low-speed mobile monitoring Continuous Usually disabled
Static Station Monitoring a fixed location Initial position Usually disabled

Application Highlights

Live Mission Monitoring

Live mission monitoring

Mission Control displays the active device, its current position, the recorded route, and live environmental telemetry during a monitoring mission.

Geospatial Visualization

Environmental data heatmap

Imported missions can be explored through GPS routes, measurement points, environmental heatmaps, and images captured during data collection. Heatmaps can represent local variations in temperature, humidity, atmospheric pressure, and gas resistance.

Mission Analytics

Environmental mission analytics

The Analytics module provides interactive charts for inspecting measurements over time and comparing data collected during different missions.

AI-assisted Mission Reports

AI-assisted mission report

EnvMon can generate structured mission summaries that highlight relevant environmental variations, GPS data quality, and possible observations. These reports complement the raw measurements and graphical analysis and are not intended to provide certified environmental conclusions.

Hardware Prototype

EnvMon hardware prototype - perspective view EnvMon hardware prototype - wide view EnvMon hardware prototype - top view

Hardware prototype of the EnvMon acquisition device

The acquisition device is built around a Raspberry Pi Zero 2 W and integrates:

  • BME680 environmental sensor for temperature, humidity, atmospheric pressure, and gas resistance
  • NEO-6M GPS module for associating measurements with geographic positions
  • Raspberry Pi Camera for optional image capture
  • Local storage for telemetry, images, and mission metadata

The current hardware is an experimental prototype intended for development, testing, and demonstration.

Technology Stack

Component Technologies
Acquisition Device Raspberry Pi Zero 2 W, Python, Flask, BME680, NEO-6M GPS, Raspberry Pi Camera
Ground Station Backend Python, Flask, Flask-CORS, SQLAlchemy, SQLite, Google Gemini API
Web Interface React, Vite, MapTiler SDK, Recharts, Tailwind CSS, DaisyUI, Axios
Communication and Storage REST API, HTTP, I2C, UART, CSI, CSV, JSON, SQLite

Project Repositories

EnvMon is divided into two main repositories:

  • envmon-app — Ground Station frontend, backend, database, maps, analytics, and AI-assisted reports
  • envmon-device — Raspberry Pi sensor acquisition, local mission recording, REST API, and simulation tools

Local Setup

View installation instructions

Requirements

  • Python 3
  • Node.js and npm
  • A MapTiler API key
  • An optional Google Gemini API key for AI-assisted reports
  • An EnvMon acquisition device or a compatible simulation instance

Backend

Navigate to the backend directory:

cd server
python -m venv .venv
mkdir data

Activate the virtual environment.

Windows PowerShell:

.venv\Scripts\Activate.ps1

Linux or macOS:

source .venv/bin/activate

Install the dependencies:

pip install -r requirements.txt

Create a file named server/.env:

DEFAULT_DEVICE_URL=http://DEVICE_IP:8000
DATABASE_URL=sqlite:///data/envmon.sqlite
GEMINI_API_KEY=your_gemini_api_key
GEMINI_MODEL=gemini-2.5-flash
AI_ANALYSIS_ENABLED=true

Set AI_ANALYSIS_ENABLED=false if AI-assisted reports are not required.

Start the backend:

python run.py

The backend will be available at:

http://127.0.0.1:5000

Frontend

Open a second terminal and navigate to the frontend directory:

cd client
npm install

Create a file named client/.env:

VITE_API_BASE_URL=http://127.0.0.1:5000/api
VITE_MAPTILER_KEY=your_maptiler_api_key

Start the development server:

npm run dev

Device installation and simulation details are available in the envmon-device repository.

Current Limitations

  • Communication is currently designed primarily for a local network
  • The prototype does not include a weather-resistant enclosure or autonomous field power system
  • BME680 gas resistance is a relative indicator rather than a certified measurement of individual pollutants
  • GPS availability and accuracy depend on signal and operating conditions
  • SQLite is appropriate for the prototype but not for a large multi-device deployment
  • AI-generated observations require interpretation alongside raw data and charts

Future Development

  • 4G, LoRaWAN, or cloud-based communication
  • Simultaneous monitoring of multiple acquisition devices
  • PostgreSQL migration for larger datasets
  • Integration of additional sensors such as PM2.5, PM10, CO₂, soil moisture, light, and noise sensors
  • Automated anomaly detection and cross-mission analysis
  • Automatic PDF mission reports

Project Background

EnvMon was developed as my bachelor's degree project in Computer Engineering. It brings together embedded systems, sensor integration, REST APIs, databases, web development, geospatial visualization, and AI-assisted data analysis in a complete functional prototype.

About

IoT platform for collecting, visualizing, and analyzing environmental sensor data.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages