A complete weather station project based on Raspberry Pi, featuring local sensor data collection, a web dashboard with historical graphs, and satellite imagery integration.
Note: This project is currently in the development stage.
- Real-time Monitoring: Measures Temperature, Humidity, Pressure, Rainfall, Wind Speed, and Wind Direction.
- Web Dashboard: A Flask-based web interface to view current conditions and historical data.
- Data Visualization:
- Interactive graphs for the last 48 hours (Temperature, Humidity, Pressure, Rain).
- Wind Rose for wind direction analysis.
- Daily rain accumulation charts.
- Min/Max statistics (Day, Week, Month).
- Satellite Imagery: Automatically fetches and animates cloud cover maps from OpenWeatherMap.
- LCD Display: Local display of current metrics on a Grove RGB LCD with color-coded background based on temperature.
- Home Assistant Integration: Provides a JSON API endpoint (
/api/v1/sensors) for external integration. - Robust Logging: Data is logged to CSV with automatic corruption recovery.
- Raspberry Pi (any model with GPIO and I2C support)
- Sensors:
- BME280 (I2C, 0x76): Primary Temperature, Humidity, and Pressure sensor.
- DHT11 (GPIO 4): Backup Temperature/Humidity sensor.
- AS5600 (I2C): Magnetic Rotary Position Sensor for the Wind Vane.
- Rain Gauge (GPIO 5): Tipping bucket mechanism.
- Anemometer (GPIO 6): Pulse-based wind speed sensor.
- Display: Grove RGB LCD (I2C).
This project incorporates existing designs from Thingiverse for the mechanical components:
- Rain Gauge: Thingiverse #4725413
- Anemometer (Wind Speed): Thingiverse #2559929
| Component | Interface | Pin / Address |
|---|---|---|
| BME280 | I2C | 0x76 |
| AS5600 | I2C | Default |
| LCD | I2C | 0x3e, 0x62 |
| DHT11 | GPIO | GPIO 4 |
| Rain Gauge | GPIO | GPIO 5 |
| Anemometer | GPIO | GPIO 6 |
-
Clone the repository:
git clone https://github.com/gotenash/meteopi.git cd meteopi -
Install Python dependencies:
pip3 install flask flask-login pandas matplotlib numpy requests smbus2 adafruit-circuitpython-dht adafruit-circuitpython-bme280 adafruit-circuitpython-as5600 gpiozero pillow
Note: Ensure I2C is enabled on your Raspberry Pi via
raspi-config. -
Configuration: The system uses a
config.jsonfile. It will be created automatically on the first run of the web app, or you can create it manually:{ "owm_api_key": "YOUR_OPENWEATHERMAP_API_KEY", "latitude": 48.85, "longitude": 2.35 }
The system consists of three main scripts that should run simultaneously (e.g., via systemd or crontab).
Starts reading sensors and logging data to meteo_log.csv.
python3 meteo_capteur.pyStarts the Flask web server (default port 5000).
python3 meteo_web.pyAccess the dashboard at http://<raspberry-pi-ip>:5000.
- Default Login:
admin/password(Change this inmeteo_web.py!)
Downloads cloud maps every 15 minutes.
python3 satellite_fetcher.pyYou can retrieve the latest sensor data in JSON format for integration with Home Assistant or other systems:
Endpoint: GET /api/v1/sensors
Response:
{
"humidity": 45.0,
"last_update": "2023-10-27T14:30:00",
"pressure": 1015.2,
"rain": 0.0,
"temperature": 22.5,
"wind_direction": "NE",
"wind_speed": 12.4
}
