Skip to content
This repository was archived by the owner on Jul 13, 2026. It is now read-only.

itsreverence/weather-watch

Repository files navigation

Weather Watch

Archived educational project (2024). This repository is preserved as a historical portfolio artifact and is not actively maintained. It was designed for local/LAN experimentation—not for deployment on the public internet.

Weather Watch is an end-to-end IoT weather station built around an ESP32 Wrover and DHT11 sensor. The microcontroller sends temperature and humidity readings to a PHP application, which stores them in MySQL and presents current and historical measurements in a browser dashboard.

Weather Watch dashboard

What it demonstrates

  • ESP32 firmware and DHT11 sensor integration
  • Periodic HTTP ingestion protected by a shared sensor key
  • PHP/MySQL storage and historical aggregation
  • Docker Compose packaging for the web application, database, and phpMyAdmin
  • A responsive dashboard for current, minimum, maximum, and average readings

System shape

ESP32 + DHT11
      │ HTTP POST over the local network
      ▼
PHP/Apache ingestion endpoint
      │
      ▼
MySQL ─────────► Weather Watch dashboard

This is educational code rather than production infrastructure. It uses a static key over plain HTTP and includes database/query patterns that should not be exposed to untrusted networks. Keep the stack on a trusted local network, use unique local credentials, and do not expose phpMyAdmin publicly.

Hardware

  • ESP32 Wrover development board
  • DHT11 temperature/humidity sensor
  • 10 kΩ resistor
  • Four male-to-male jumper wires
  • A computer running Docker and the Arduino IDE

Hardware setup

Hardware schematic

Local reproduction

These instructions are retained for historical reproduction. Current upstream images or libraries may behave differently than they did in 2024.

1. Configure the Docker stack

cp .env.sample .env

Edit .env and replace every CHANGE_ME value. Use a long, random SENSOR_API_KEY; the same value must be used as SECRET_APIKEY in the Arduino configuration.

Start the stack:

docker compose up --build

The historical application is then available at:

Stop the stack with:

docker compose down

To also remove the local database volume:

docker compose down -v

2. Configure and upload the ESP32 sketch

  1. Install the ESP32 board support package in the Arduino IDE using: https://dl.espressif.com/dl/package_esp32_index.json
  2. Copy arduino/weather-watch/arduino_secrets.h.sample to arduino/weather-watch/arduino_secrets.h.
  3. Set:
    • SECRET_SSID to the local Wi-Fi name;
    • SECRET_PASSWORD to its password;
    • SECRET_LASTOCTET to the last octet of the computer hosting Weather Watch;
    • SECRET_SERVERPORT to the dashboard port from docker-compose.yml (the provided default is 8080);
    • SECRET_APIKEY to the same value as SENSOR_API_KEY in .env.
  4. Optionally adjust sensorName, sensorLocation, and timerDelay in weather-watch.ino.
  5. Select ESP32 Wrover Module in the Arduino IDE and upload the sketch.

The ESP32 and Docker host must be on the same trusted local network.

Historical limitations

  • No automated test suite or hardware CI is included.
  • Container images and Arduino dependencies are not pinned to immutable versions.
  • Sensor authentication is a static shared key sent over plain HTTP.
  • The stack is intended for a classroom/local-network demonstration, not production deployment.

Troubleshooting

If manage_db.sh reports $'\r': command not found or an unexpected end of file, configure the file to use LF rather than CRLF line endings.

Project context and attribution

Weather Watch was built collaboratively as an educational project by @itsreverence, @carlosgothub, @Comiserif, and @limon-nawaj.

The project was based in part on Rui Santos's Cloud Weather Station ESP32/ESP8266 tutorial. See the repository history for the preserved implementation and collaboration record.

License

Weather Watch is licensed under the GNU Affero General Public License v3.0 or later.

About

Archived ESP32/DHT11 weather monitoring dashboard built with PHP, MySQL, and Docker

Topics

Resources

License

Stars

0 stars

Watchers

2 watching

Forks

Packages

 
 
 

Contributors