Hyperlocal temperature forecasts for your exact location - not the nearest weather station.
Live dashboard: thermosense-black.vercel.app
Latest Open-Meteo Bangalore demo metrics: docs/demo-results.md · Watch the live training demo
Open the source-linked architecture guide for twelve expandable stages, distinct storage paths and current forecast/readiness limits. GitHub shows HTML as source; clone or download the whole repository, then open the HTML locally so its code links keep working. The guide makes no external calls and changes no application behavior.
Commercial weather apps (Google Weather, AccuWeather, OpenWeatherMap, and similar) do not measure temperature at your balcony, courtyard, or rooftop. They report a value from a regional model or the nearest official station - often kilometers away, at a different elevation, and in a different microclimate.
That gap is usually systematic, not random. Urban heat islands, building geometry, vegetation, and local humidity create a persistent offset between “the app” and what you actually feel. ThermoSense exists to measure that offset at your location and correct for it.
ThermoSense is an end-to-end IoT + ML product that:
- Collects ground-truth temperature/humidity from a physical sensor (Raspberry Pi + DHT22), or starts from historical/API data while you add hardware later
- Pulls commercial weather API forecasts for the same coordinates
- Learns the local bias (
sensor − API) and trains forecasting models on your site’s data - Serves a live dashboard and API with 3-day hyperlocal forecasts and a public accuracy leaderboard against commercial baselines
Typical use cases: personal hyperlocal forecasts, proving that a location-specific model beats generic apps with real metrics, portfolio/demo of applied ML + IoT, or a starting point for agriculture/energy alerts tied to your conditions.
Deeper system design, data lifecycle, models, and API surface live in:
- docs/architecture.md
- docs/api.md
- hardware/README.md (sensor wiring and Pi install)
- deployment/README.md (Vercel, Docker, Railway, etc.)
| Generic weather apps | ThermoSense |
|---|---|
| One-size-fits-region forecast | Forecast corrected for your microclimate |
| No ground truth at your site | Optional physical sensor closes the loop |
| Accuracy claims without your data | Live leaderboard vs Open-Meteo / OWM / AccuWeather on your observations |
| Black-box apps | Trainable models (SARIMA, LightGBM, ensemble) you control and retrain |
| No feedback path | Dashboard feedback + continuous daily pipeline |
Clear advantage: instead of trusting a grid-cell average, ThermoSense learns the bias between commercial APIs and your location, then applies that correction going forward - and shows the scoreboard so you can verify the improvement.
Watch ThermoSense on the production site: open the Pipeline page (last item in the left sidebar), train SARIMA / LightGBM / Ensemble, then read the Metrics to see why lower MAE and RMSE matter for hyperlocal forecasts.
Download the demo video · Live app: thermosense-black.vercel.app
- Python 3.10+
- Node.js 18+ (for the React dashboard)
- Git
- Optional: Raspberry Pi + DHT22 for live sensor ground truth (~$25)
git clone https://github.com/charan-rathore/Time-Series-Temperature-Modelling.git
cd Time-Series-Temperature-Modelling
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install --upgrade pip
pip install -r requirements.txtOptional (TFT deep-learning model - needs PyTorch):
pip install torch pytorch-forecasting pytorch-lightningcp .env.example .envSet your site in config/config.yaml:
location:
name: "Your City"
lat: 12.9716
lon: 77.5946
timezone: "Asia/Kolkata"Optional keys in .env (only needed to compare against commercial baselines on the leaderboard):
OWM_API_KEY=your_openweathermap_key # free tier: openweathermap.org
ACCUWEATHER_API_KEY=your_accuweather_key # free tier: developer.accuweather.comOpen-Meteo (primary weather source) needs no API key.
First-time historical pull (~365 days):
python scripts/run_pipeline.py --mode backfillDaily incremental update (manual or cron):
python scripts/run_pipeline.py --mode dailyTrain the core models:
# Fast path (~2 minutes): SARIMA + LightGBM + Ensemble
python scripts/train_models.py --models sarima lgbm ensemble
# Include TFT if you installed PyTorch (~10 minutes)
python scripts/train_models.py --models sarima lgbm tft ensemble# Build the dashboard
cd frontend && npm install && npm run build && cd ..
# API + dashboard (http://localhost:8000)
uvicorn src.api.main:app --reload --host 0.0.0.0 --port 8000Development hot-reload (optional second terminal):
cd frontend && npm start # http://localhost:3000 (proxies API to :8000)Useful checks:
curl http://localhost:8000/api/health
pytest tests/ -v
mlflow ui --port 5000 # optional experiment UIFull wiring, systemd install, and uploader config: hardware/README.md.
Short path on a Raspberry Pi:
cd hardware
pip3 install -r requirements.txt
python3 sensor_daemon.py --simulate # dry run
python3 sensor_daemon.py # real DHT22 on GPIO 4
sudo ./install.sh # start on boot
export THERMOSENSE_API_URL=https://thermosense-black.vercel.app
python3 uploader.py --continuousPlace the sensor shaded, ventilated, ~1.5-2 m above ground, and record exact GPS coordinates for fair API comparison.
Vercel (current production host)
npm i -g vercel
vercel link
vercel --prodOr import the GitHub repo at vercel.com/new.
Production URL: https://thermosense-black.vercel.app
Health: https://thermosense-black.vercel.app/api/health
Other options (Docker, Railway, Cloudflare Tunnel): deployment/README.md.
# After the 9 PM sensor snapshot
0 22 * * * cd /path/to/thermosense && .venv/bin/python scripts/run_pipeline.py --mode daily
# Collect commercial baselines for the leaderboard
0 18 * * * cd /path/to/thermosense && .venv/bin/python -m src.data.baseline_collector --collect
# Weekly retrain
0 0 * * 0 cd /path/to/thermosense && .venv/bin/python scripts/train_models.py --models sarima lgbm ensembleIf any query, please reach out to:
- Charan Rathore
- Email: ra7hore.charan@gmail.com
- Phone: 6303460570
MIT - see LICENSE if present in the repo.