An open-source, modular, and scalable weather station network designed for real-time climate monitoring. Built with affordability and replicability in mind โ each unit costs under โฌ200 and can be deployed anywhere.
๐ฎ๐น Leggi in italiano
Climate change is increasing the frequency and intensity of severe convective weather โ supercells, hailstorms, tornadoes โ across Northern Italy. National forecast models (ARPA, ECMWF, ICON) run at spatial and temporal resolutions too coarse to nowcast these fast-developing, localized events: by the time a model grid cell updates, the storm has often already passed.
LegmaMiteo closes that gap with a dense, low-cost network of micro-meteorological stations built for nowcasting โ short-term, hyperlocal prediction โ focused initially on Lombardia. More stations means finer-grained, faster-updating ground truth than any single national model can provide, and an open dataset that grows with the community deploying it. Existing weather station networks are sparse, expensive, and often closed; LegmaMiteo aims to democratize severe weather monitoring by enabling anyone to build, deploy, and contribute data to a global open network.
Real-time and historical data from station-001, visualized in Grafana:
- Modular design โ base unit + swappable expansion modules
- Dual connectivity โ WiFi (primary) + LoRa mesh (Phase 2, remote areas)
- Solar powered โ fully autonomous, no grid required
- Self-hosted โ your data stays on your server
- Open data โ all measurements publicly accessible via REST API
- Under โฌ200 per unit โ affordable and replicable worldwide
| Module | Sensors | Use Case | Status |
|---|---|---|---|
| BASE | SHT45, MCP9808, BMP580, VEML7700, MLX90614ESF, Rain gauge, Anemometer + wind vane | Everywhere | โ Deployed (station-001) |
| MOD-AIR | PMS5003/PMS7003, SCD41 | Urban / Industrial | ๐ง Dashboard ready, firmware WIP |
| MOD-STORM | AS3935 | Storm monitoring | ๐ง Dashboard ready, firmware WIP |
| MOD-HYDRO | Ultrasonic level, flow sensor, turbidity | Rivers / Flood zones | ๐ Planned |
| MOD-SOIL | Capacitive moisture x3, DS18B20 | Agriculture / Forest | ๐ Planned |
| MOD-SNOW | VL53L1X, load cell, DS18B20, OV2640 | Mountain / Alpine | ๐ Planned |
| MOD-FIRE | Flame IR, MQ-7, MQ-2 | Mediterranean / Forest | ๐ Planned |
| MOD-NOISE | MEMS microphone SPH0645 | Urban / Industrial | ๐ก Concept |
| MOD-RAD | ML8511 UV, Geiger tube | High altitude | ๐ก Concept |
BASE sensor notes: SHT45 provides high-precision humidity (ยฑ1.0% RH) plus a secondary temperature channel (ยฑ0.1ยฐC) for cross-check; MCP9808 (ยฑ0.25ยฐC) is the primary dedicated temperature sensor. BMP580 (ยฑ0.06 hPa) handles pressure. MLX90614ESF is sky-pointing IR temperature, used as a cloud-cover proxy. A true pyranometer (RS485 solar radiation module or Apogee SP-110/SP-212) is evaluated as a future addition โ VEML7700 only covers visible-light irradiance. BME280 units seen in early photos are leftover stock, not part of the final BOM.
MOD-STORM note: hail is not detected via a dedicated piezo sensor โ rejected due to false positives from birds, snow, and debris impacts. It's inferred server-side from pressure tendency + humidity + lightning activity + wind gust data instead.
MOD-AIR note: SCD41 chosen over SCD40 specifically for single-shot measurement mode, compatible with the deep sleep power architecture.
[ESP32-S3 Station]
โ
โโโ WiFi โโโโโโโโโโโโโโโโโโโโโโโถ [MQTT Broker]
โ โ
โโโ LoRa (Phase 2) โโโถ [RPi ChirpStack Gateway] โโโ
โ
[Telegraf]
โ
[InfluxDB]
โ
[Grafana]
โ
[REST API]
All expansion modules connect to the base unit via a standardized waterproof SP13 IP68 8-pin connector with the following pinout:
| Pin | Signal |
|---|---|
| 1 | VCC 3.3V |
| 2 | VCC 5V |
| 3 | GND |
| 4 | I2C SDA |
| 5 | I2C SCL |
| 6 | UART TX |
| 7 | UART RX |
| 8 | GPIO / Interrupt |
Anemometer (top, max wind exposure, no obstructions above)
โ
Sensor head (MLX90614ESF + VEML7700, unobstructed zenith view)
โ
Radiation shield (SHT45 + MCP9808, naturally ventilated, shaded)
โ
Rain gauge (leveled horizontal, clear of overhead obstructions)
โ
Solar panel (60โ70ยฐ tilt, south-facing, unshaded)
โ
Main enclosure (electronics + battery, accessible for maintenance)
- MCU: ESP32-S3-DevKitC-1 (ESP32-S3-WROOM-1-N16R8, 16MB flash / 8MB PSRAM)
- Connectivity: WiFi 802.11 b/g/n (active) + LoRa 868MHz via external SX1262/SX1276 module (Phase 2, planned)
- Power: 30W solar panel (60โ70ยฐ tilt) + LiFePO4 battery (EVE LF32/LF40 or IFR32700) + MPPT charge controller (CN3791, LiFePO4-modified for 3.65V float)
- Enclosure: IP65/IP67 waterproof junction box + multi-plate radiation shield (temperature/humidity sensors)
- Module connector: SP13 IP68 8-pin (JST-XH 8-pin internal)
- MQTT Broker: Mosquitto (TLS via Let's Encrypt, password authentication)
- Time-series DB: InfluxDB 2.7 (org
legmamiteo, bucketstations, separateforecastbucket for NWP ingestion) - Visualization: Grafana
- Bridge: Telegraf
- REST API: FastAPI (Python)
- Remote access: Tailscale Funnel
- All containerized: Docker Compose
The public REST API exposes real-time and historical data from all stations.
Base URL: http://localhost:8000 (or your Tailscale Funnel URL)
| Endpoint | Description |
|---|---|
GET / |
API info |
GET /health |
Health check |
GET /stations/ |
List all active stations |
GET /stations/{id} |
Station metadata |
GET /data/{id}/latest?module=base |
Latest reading from a station |
GET /data/{id}/history?field=temperature&range_hours=24 |
Historical data |
GET /data/{id}/alerts |
Active alert conditions |
Example โ latest data from station-001:
curl http://localhost:8000/data/station-001/latest{
"success": true,
"station_id": "station-001",
"module": "base",
"data": {
"temperature": 29.7,
"humidity": 61.8,
"pressure": 1017.6,
"lux": 63261.0,
"wind_speed": 29.2,
"wind_direction": 51.0,
"rain_mm": 1.2
}
}Full interactive documentation at /docs (Swagger UI).
Data is released under CC BY-NC 4.0. AI/ML training use is prohibited without explicit written permission.
Grafana-based alerting with Telegram notifications. Active alert rules:
| Alert | Condition | Severity |
|---|---|---|
| ๐ก๏ธ High Temperature | temperature > 35ยฐC | Warning |
| ๐ท Critical PM2.5 | pm25 > 55 ยตg/mยณ (WHO threshold) | Critical |
| ๐ญ High CO2 | co2 > 1000 ppm | Warning |
| โก Lightning Nearby | lightning_distance < 10 km | Critical (immediate) |
| ๐ฉ๏ธ Rapid Pressure Drop | pressure drop > 3 hPa / 30 min | Warning (storm incoming) |
The fastest way to get a server running on a Raspberry Pi, Linux box, or Windows PC โ no manual Docker setup needed. Download the latest release package, which includes an installer that generates secure random credentials for you automatically:
๐ Latest release
# Linux / Raspberry Pi
tar -xzf LegmaMiteo-server.tar.gz
cd LegmaMiteo-server
chmod +x install.sh
./install.sh# Windows (PowerShell, with Docker Desktop running)
Expand-Archive LegmaMiteo-server.zip
cd LegmaMiteo-server
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
.\install.ps1The installer prints the generated admin credentials and URLs at the end โ save them somewhere safe.
git clone https://github.com/Dragonyx118/LegmaMiteo
cd LegmaMiteo/server
docker compose up -dThen open:
- Grafana: http://localhost:3000
- InfluxDB: http://localhost:8086
INFLUXDB_ADMIN_PASSWORD, GRAFANA_ADMIN_PASSWORD, and INFLUX_TOKEN in a
server/.env file before running docker compose up โ never commit real
credentials to the repo. See server/telegraf/telegraf.conf.example and
firmware/base/*/src/secrets.h.example for the files you need to copy and
fill in locally.
Documentation coming soon.
Schematics and PCB files coming soon.
All data collected by this network is released under Creative Commons Attribution-NonCommercial 4.0.
The following uses are strictly prohibited:
- Military or defense applications
- Weapons systems or targeting
- Mass surveillance or individual profiling
- AI/ML training without explicit written permission
- Any use intended to cause harm to people or communities
See DATA_POLICY.md for full details.
Contributions are welcome! Please read CONTRIBUTING.md before submitting pull requests.
By contributing you agree to uphold the ethical guidelines of this project.
This project is licensed under the Hippocratic License HL3-CL-ECO-LAW-MIL-SV โ see LICENSE for details.
Modules included:
- CL โ Copyleft
- ECO โ Ecocide
- LAW โ Law Enforcement
- MIL โ Military Activities
- SV โ Mass Surveillance
Dragonyx โ built with โค๏ธ for the planet.
