Environmental Monitoring System for I Giganti della Sila β Riserva Naturale Biogenetica di Fallistro
SmartPark IoT is a full-stack Internet of Things (IoT) system developed as part of an IoT university course project. The system focuses on real-time environmental monitoring and visitor support for I Giganti della Sila β Riserva Naturale Biogenetica di Fallistro, a protected ancient forest located in Sila National Park, Calabria, Italy.
The reserve contains 58 monumental Laricio pine trees (Pinus nigra subsp. laricio), some over 350 years old and reaching heights of up to 45 metres. The area is managed by FAI β Fondo Ambiente Italiano and represents one of the most ecologically significant forest ecosystems in southern Italy.
The platform integrates IoT sensing devices, environmental data collection, backend services, a visitor-facing web application, and an administrative monitoring dashboard.
- Project Overview
- System Architecture
- Repository Structure
- Technology Stack
- Prerequisites
- Getting Started
- Environment Variables
- Services & Ports
- Project Modules
- API Reference
- Project Contributions
- Troubleshooting
- License
- About the Reserve
The SmartPark IoT platform collects environmental and meteorological data from IoT sensors deployed across the reserve. Sensor readings are ingested by a backend API, stored in a time-series database, and made accessible through two dedicated interfaces.
- π‘ Real-time sensor data ingestion from IoT devices deployed in the field
- π‘οΈ Environmental monitoring β temperature, humidity, air quality, and weather conditions
- πΊοΈ Trail recommendations based on live weather data and visitor preferences
- π User authentication via Firebase for personalised visitor experience
- π Administrative dashboard for park staff to monitor system and sensor status
- π Time-series visualisation via Grafana for historical data analysis
The system follows a two-tier architecture: an Edge Tier (sensors and gateway with on-device ML inference),and a Cloud Tier (remote management, cloud sync, and web applications).
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β EDGE TIER β
β β
β S6000U Sensor ββ(Modbus RTU / RS485)βββΊ Robustel EG5120 β
β (Temp, Humidity, Pressure, Light, β β
β Noise, ToF, GPS) β App Center β
β ββ Node-RED β
β β (orchestration,β
β β Modbus poll, β
β β GPS parsing, β
β β ML exec) β
β ββ InfluxDB β
β β (local time-β
β β series DB) β
β ββ Grafana β
β β (on-device β
β β dashboard) β
β ββ
ββββββββββββββββββββββββββββββββ€ββββββββββββββββββββββββββββββββ
β HTTPS / 4G-5G Cellular
ββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ
β CLOUD TIER β
β β
β βββββββββββββββββββ ββββββββββββββββββββββββββββ β
β β InfluxDB Cloud β β Firebase Firestore β β
β β (AWS region) β β - User auth & prefs β β
β β Long-term β β - Trail tags & metadata β β
β β telemetry β β - Recommendations β β
β ββββββββββ¬βββββββββ ββββββββββββ¬ββββββββββββββββ β
β β β β
β βΌ βΌ β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β FastAPI Backend β β
β β - Data ingestion & validation β β
β β - REST endpoints for both frontends β β
β ββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ β
β β β
β ββββββββββββ΄βββββββββββ β
β βΌ βΌ β
β βββββββββββββββββ ββββββββββββββββββββββββββββββββββββ β
β β Admin Dashboardβ β Visitor Web Application β β
β β (Vue.js 3) β β (HTML5 / CSS3 / Vanilla JS) β β
β β β β β β
β β - Station map β β - Weather dashboard β β
β β - Live sensor β β - Interactive map (Leaflet.js) β β
β β readings β β - Firebase Auth β β
β β - Historical β β - Trail recommendations (CBF) β β
β β trends β β
β β - RAG Chatbot β β β β
β βββββββββββββββββ ββββββββββββββββ¬βββββββββββββββββββββ β
β β β
β βββββββββΌβββββββββββ β
β β ML Engine β β
β β (Node.js/Express)β β
β β Content-Based β β
β β Filtering (CBF) β β
β βββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1. Hardware Layer β The Robustel EG5120 (ARM Cortex-A7, 512 MB RAM, 4G LTE) acts as the central edge computing hub. The S6000U multi-purpose sensor connects via RS485/Modbus RTU and measures temperature, humidity, pressure, light, noise, ToF distance, and orientation.
2. Edge Processing Layer β Node-RED runs on the EG5120 and orchestrates the entire local pipeline: it polls the S6000U every 60 seconds via Modbus, parses GPS NMEA sentences, runs the Random Forest predictor (predictor.py) via an exec node, fuses sensor + GPS + ML results, writes to local InfluxDB, and syncs to the cloud.
3. ML Inference (Edge) β A Random Forest multi-label classifier trained on one year of historical weather data from Open-Meteo classifies current conditions into "Weather Vibe" categories (Frosty, Brisk, Crisp, Moody, Serene, Sun-Drenched). The model runs directly on the EG5120 and pushes trail tags to Firebase Firestore.
4. Storage Layer β Local InfluxDB on the gateway provides edge buffering. InfluxDB Cloud (AWS) stores long-term telemetry. Firebase Firestore holds user data, trail metadata, and recommendation outputs.
5. Application Layer β The FastAPI backend serves both frontends, handles data ingestion, and integrates a RAG-based AI chatbot (Groq API + Llama-3.3-70b + ChromaDB + LangChain). The Visitor Web App and Admin Dashboard consume these services. Trail recommendations are generated by a dedicated Node.js/Express CBF engine.
smart-park-iot/
β
βββ Dockerfile # Root Dockerfile
βββ compose.yaml # Main Docker Compose configuration
βββ compose.debug.yaml # Debug/development Compose override
βββ nginx.conf # Nginx reverse proxy configuration
β
βββ IoT_ProjectWeatherForcast/
β βββ app/ # FastAPI backend application
β β βββ main.py # Application entry point
β β βββ routers/ # API route handlers
β β βββ models/ # Data models / schemas
β β βββ services/ # Business logic layer
β β βββ database/ # InfluxDB client & queries
β βββ weather/ # Admin dashboard (Vue.js)
β β βββ src/
β β β βββ components/ # Reusable Vue components
β β β βββ views/ # Page-level views
β β β βββ stores/ # State management (Pinia)
β β βββ vite.config.js
β βββ Robustel EG5120/ # IoT gateway configuration files
β βββ Robustel EG5120 ML/ # Gateway ML integration config
β βββ requirements.txt # Python dependencies
β βββ .env.example # Environment variable template
β
βββ web-app/ # Visitor-facing web application
β βββ index.html
β βββ assets/
β βββ public/
β βββ src/
β
βββ ml-engines/ # Machine learning recommendation engine
β βββ generate_recom.js.js
β βββ server.js
β βββ package.json
β
βββ firebase-config/ # Firebase project configuration
βββ database/ # Database schemas and seed data
βββ docs/ # Project documentation and diagrams
| Layer | Technology | Purpose |
|---|---|---|
| IoT Sensor | Robustel S6000U (RS485 / Modbus RTU) | Multi-parameter environmental sensing |
| IoT Gateway | Robustel EG5120 (ARM Cortex-A7, 4G LTE, GPS) | Edge computing hub; data acquisition & forwarding |
| Edge Orchestration | Node-RED (on EG5120 App Center) | Modbus polling, GPS parsing, ML exec, cloud sync |
| Edge ML Inference | Python 3, scikit-learn Random Forest, joblib | Weather Vibe classification at the edge |
| Edge Monitoring | Grafana + InfluxDB (on EG5120) | Local real-time dashboards and data buffering |
| Backend API | Python 3.11+, FastAPI, Uvicorn | Data ingestion, REST API, RAG chatbot |
| Trail Recommendation | Node.js 18+, Express, Content-Based Filtering (CBF) | Personalised trail ranking from user preferences |
| Visitor Web Application | HTML5, CSS3 (Bootstrap 5), Vanilla JS, Leaflet.js | Visitor-facing UI: weather, map, recommendations |
| Admin Dashboard | Vue.js 3, Vite, Pinia | SPA for park administrators |
| Cloud Time-Series DB | InfluxDB Cloud (AWS) | Long-term telemetry storage and analytics |
| User Data & Sync | Firebase Firestore + Firebase Authentication | User profiles, trail tags, recommendations |
| Infrastructure | Docker, Docker Compose, Nginx | Containerisation, routing, static file serving |
| Remote Device Management | Robustel RCMS | OTA updates, remote Node-RED deploy, diagnostics |
Before running the project, ensure the following tools are installed on your machine:
| Tool | Minimum Version | Installation |
|---|---|---|
| Docker | 24.x | https://docs.docker.com/get-docker/ |
| Docker Compose | 2.x (plugin) | Included with Docker Desktop |
| Git | 2.x | https://git-scm.com/ |
git clone https://github.com/jhenals/smart-park-iot.git
cd smart-park-iotCopy the environment variable template and fill in the required values:
cp IoT_ProjectWeatherForcast/.env.example IoT_ProjectWeatherForcast/.envOpen .env in your editor and configure the values. See the Environment Variables section for a full description of each variable.
docker compose up --buildTo run in detached (background) mode:
docker compose up --build -dThe first build may take several minutes as Docker pulls base images and installs dependencies.
docker compose psAll services should show a status of running. If any service has exited, check its logs:
docker compose logs <service-name>| Service | URL |
|---|---|
| Visitor Web Application | http://localhost:8081 |
| FastAPI Backend | http://localhost:8000 |
| Admin Dashboard | http://localhost:5173 |
| InfluxDB | http://localhost:8086 |
| Grafana Dashboard | http://localhost:3001 |
docker compose downTo also remove all volumes (database data will be lost):
docker compose down -vThe following variables must be set in IoT_ProjectWeatherForcast/.env:
| Variable | Description | Example |
|---|---|---|
INFLUXDB_URL |
URL of the InfluxDB instance | http://influxdb:8086 |
INFLUXDB_TOKEN |
InfluxDB authentication token | your-influxdb-token |
INFLUXDB_ORG |
InfluxDB organisation name | smartpark |
INFLUXDB_BUCKET |
InfluxDB bucket for sensor data | sensor_data |
FIREBASE_PROJECT_ID |
Firebase project ID | smartpark-iot |
FIREBASE_CREDENTIALS |
Path to Firebase service account JSON | ./firebase-config/key.json |
GRAFANA_ADMIN_USER |
Grafana admin username | admin |
GRAFANA_ADMIN_PASSWORD |
Grafana admin password | changeme |
β οΈ Never commit the.envfile or any Firebase credentials to version control.
The system is composed of several containerised services managed through Docker Compose:
| Service | Container Name | Description |
|---|---|---|
webapp |
smartpark-webapp | Visitor-facing web application served by Nginx |
fastapi |
smartpark-api | Backend API for data ingestion and REST endpoints |
adminfrontend |
smartpark-admin | Vue.js administrative dashboard |
mlengine |
smartpark-ml | Node.js trail recommendation engine |
influxdb |
smartpark-influx | Time-series database storing sensor telemetry |
grafana |
smartpark-grafana | Monitoring dashboards and data visualisation |
A lightweight, static web interface designed for park visitors. It provides:
- Environmental conditions panel β live temperature, humidity, and air quality readings retrieved from the backend API
- Weather information β current and forecast data relevant to the reserve
- Trail recommendation system β suggests trails based on current weather conditions and visitor-selected preferences
- User authentication β visitors can log in via Firebase to save preferences and view personalised suggestions
The application is served by Nginx and is intentionally lightweight to ensure fast load times, even on mobile networks.
A FastAPI-based REST API responsible for:
- Receiving and validating data from IoT sensors and the Robustel EG5120 gateway
- Writing telemetry to InfluxDB using the InfluxDB Python client
- Exposing REST endpoints consumed by both the visitor web app and the admin dashboard
- Providing automatic interactive API documentation at
/docs(Swagger UI) and/redoc(ReDoc)
A Vue.js 3 single-page application providing park administrators with:
- Real-time and historical sensor data visualisation
- System health and connectivity status for each IoT device
- Chart-based exploration of environmental trends over time
A Node.js module that:
- Analyses current and forecast weather data retrieved from the backend
- Combines environmental data with visitor-submitted preferences (duration, difficulty, accessibility)
- Produces ranked trail recommendations returned to the visitor web application
The Robustel EG5120 acts as an industrial-grade cellular IoT gateway deployed in the field. It aggregates data from connected environmental sensors and forwards readings to the backend over the mobile network. The Robustel EG5120 ML/ directory contains additional configuration for edge-side ML pre-processing.
The FastAPI backend automatically generates interactive documentation. Once the system is running, visit:
- Swagger UI β http://localhost:8000/docs
- ReDoc β http://localhost:8000/redoc
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/weather/forecast/?minutes={minutes}&measurement={name} |
minutes={minutes}&measurement={name}Retrieve sensor data for the specified time window and measurement |
Full request/response schemas are available in the interactive documentation.
This project was developed as a group assignment for a university IoT course. The system was built collaboratively, with team members contributing to different components of the stack.
Group contributions covered:
- IoT device configuration and gateway setup (Robustel EG5120)
- FastAPI backend development and InfluxDB integration
- Admin dashboard (Vue.js)
- System integration, Docker Compose orchestration, and deployment
My individual contribution focused on the visitor-facing layer of the system:
- Designed and implemented the visitor web application (HTML, CSS, JavaScript)
- Integrated the web interface with the FastAPI backend to display live environmental data
- Connected the application to the ML engine for trail recommendations
- Integrated Firebase Authentication for user login and personalised experience
- Modified and adapted existing backend endpoints where necessary to meet frontend requirements
- Contributed to system integration testing across the full stack
Parts of the backend and infrastructure in this repository originate from the original group project and have been adapted where needed to support the web application integration.
Check the logs for that specific service:
docker compose logs fastapi
docker compose logs influxdbEnsure the INFLUXDB_TOKEN, INFLUXDB_ORG, and INFLUXDB_BUCKET values in your .env file match the values used when InfluxDB was initialised. If running for the first time, InfluxDB may take a few seconds to become ready β the backend will retry automatically.
If a port is already in use on your machine, edit compose.yaml and change the host-side port mapping. For example, to change the web app from port 8081 to 9081:
ports:
- "9081:80"The admin dashboard (adminfrontend) runs a Vite development server. If it is slow to start, wait 15β20 seconds after docker compose up and then refresh the browser.
docker compose up --buildTo force a full clean rebuild:
docker compose down
docker compose build --no-cache
docker compose upThis project was developed for educational purposes as part of a university IoT course. It is not intended for production deployment without further security hardening.
I Giganti della Sila β Riserva Naturale Biogenetica di Fallistro is a protected forest located in Sila National Park, near Camigliatello Silano in the province of Cosenza, Calabria, southern Italy.
The reserve takes its name from its most remarkable feature: a stand of ancient Laricio pine trees (Pinus nigra subsp. laricio) planted in the 17th century. Some trees reach 45 metres in height and nearly 2 metres in trunk diameter, making them among the largest and oldest individual trees in Italy.
The forest floor hosts a rich understorey of ferns, mosses, and flowering plants, while the broader Sila plateau supports a diverse ecosystem including wolves, deer, and a wide variety of bird species.
The reserve is managed by FAI β Fondo Ambiente Italiano (Italian Environment Fund) and is open to visitors from April to November.
π Location: Near Camigliatello Silano, Province of Cosenza, Calabria, Italy
π More information: fondoambiente.it/i-giganti-della-sila-eng
Developed as part of an IoT course project β academic year 2025/2026.