This repository contains the firmware code for an ESP32-based weather station that measures environmental parameters and transmits data to multiple cloud services. The firmware is written in Arduino C++ and interfaces with multiple sensors to provide weather monitoring.
Multi-sensor data collection:
- Temperature and humidity (AHT20 sensor)
- Atmospheric pressure (BMP280 sensor)
- Light intensity (BH1750 sensor)
- Calculated dew point
Data transmission to multiple services:
- InfluxDB Cloud for time-series data storage
- Weather Underground for public weather sharing
- Custom local server for testing/development
- Local log server for debugging
Power management:
- Deep sleep mode between measurements
- Configurable measurement intervals
- Solar panel and battery voltage monitoring
Parameter | Description | Default |
---|---|---|
CYCLE_TIME_SEC |
Measurement interval in seconds | 300 |
WIFI_SSID |
WiFi network name | - |
WIFI_PASSWORD |
WiFi password | - |
INFLUXDB_API_TOKEN |
InfluxDB authentication token | - |
WEATHER_UNDERGROUND_STATION_ID |
Weather Underground station ID | - |
WEATHER_UNDERGROUND_API_KEY |
Weather Underground API key | - |
InfluxDB Line Protocol
weather temperature=25.30,humidity=65.2,pressure=1013.25,illumination=450.5,dew_point=18.1,battery_voltage=3.85,solar_panel_voltage=4.12
The weather station operates in cycles:
- Wake up from deep sleep
- Initialize sensors and WiFi connection
- Read sensor data:
- Temperature and humidity
- Atmospheric pressure
- Light intensity
- Battery and solar panel voltages
- Calculate derived values (dew point)
- Transmit data to configured services
- Send logs to log server
- Enter deep sleep for the configured interval