Cloudburst Early Warning System
I built a distributed sensor-to-alert system: ESP32 field nodes that sample weather sensors, a gateway that aggregates them, a backend that stores the series and runs anomaly detection, and an alerting layer that reaches people three different ways.
- 01ESP32 multi-sensor node
- 02LoRa / gateway aggregation
- 03Flask ingest API
- 04TimescaleDB time series
- 05Anomaly detection + ConvLSTM
- 06SMS / push / siren alerts
01Problem
The hill regions most exposed to cloudbursts are the ones with the least reliable power and connectivity, so a warning system has to keep working when the network does not.
02Implementation
- Wrote ESP32 edge firmware in C++ (PlatformIO) reading a BME280 for temperature, humidity and pressure, an AS3935 lightning sensor, and an interrupt-driven tipping-bucket rain gauge, with local SD card logging.
- Added a LoRa radio link at 915 MHz for nodes outside network coverage, alongside power management and over-the-air firmware update modules.
- Built a Python gateway that aggregates node readings and forwards them to the cloud backend.
- Served ingestion from a Flask backend with JWT auth and Socket.IO, persisting readings into TimescaleDB with SQL schema and migration scripts.
- Combined Isolation Forest, One-Class SVM, DBSCAN and a Random Forest with a Keras LSTM for anomaly detection, plus a separate ConvLSTM trainer over 24-step input sequences predicting a 6-step horizon.
- Delivered alerts through a Twilio SMS gateway, push notifications and a local siren controller, with a Streamlit dashboard for monitoring.
03Models
- ConvLSTM (TensorFlow/Keras)
- Sequence model trained over 24-step weather windows to predict a 6-step horizon.
- Isolation Forest, One-Class SVM, DBSCAN
- Unsupervised detectors for point and cluster anomalies in the sensor stream.
- Random Forest and Keras LSTM
- Supervised and sequential components of the combined anomaly detector.
04Input data
Multi-sensor weather readings from the edge nodes: temperature, humidity, pressure, rainfall and lightning counts. No field dataset is published in the repository.
05Results
Implemented across all five layers: firmware, gateway, backend, models and alerting. It has not been deployed in the field, so detection accuracy and warning lead time are unmeasured.
No benchmark numbers are published for this project. Accuracy, latency and throughput have not been measured under controlled conditions, so none are claimed here.
06Stack
07Visuals
Screenshots of the running project will replace this once they are available.