User problem
Home Assistant stores sensor readings in CSV exports, but raw data is hard to explore. Charts, filters, and KPIs are needed to spot trends, answer questions about comfort levels, and share findings.
Temperatuuri ülevaade
A Next.js static export dashboard that reads Home Assistant CSV exports of temperature and humidity data, processes them server-side, and persists snapshots to Vercel Blob storage. Filters, KPIs, charts, tables, and CSV export are password-protected and shareable across devices.
A personal learning project to explore Home Assistant data export, CSV processing, server-side data handling, and stateless cloud-native architecture on Vercel. The dashboard makes temperature and humidity trends from a smart home easily queryable and shareable.
Home Assistant stores sensor readings in CSV exports, but raw data is hard to explore. Charts, filters, and KPIs are needed to spot trends, answer questions about comfort levels, and share findings.
Household members who want to explore temperature and humidity patterns without direct database access. Shared password protects the dashboard and allows cross-device access.
CSV upload, real-time filtering, temperature and humidity charts, KPI summaries, entity-level tables, and CSV export all work behind a shared password. Data persists across sessions via Vercel Blob storage.
The dashboard is a stateless Next.js static export running on Vercel. Home Assistant CSV data is processed server-side, boiled down to a summary JSON snapshot, and stored in Vercel Blob. The browser only holds the snapshot, never raw CSV.
Browser (password-protected)
-> Next.js App Router (Auth middleware)
-> CSV upload via API route
-> Server-side parse & process (PapaParse)
-> Boil down to JSON snapshot
-> Store snapshot in Vercel Blob
-> Fetch snapshot on dashboard load
-> Client-side filter & render (Recharts, Lucide, Tailwind)
React + Next.js App Router. Login page with shared password, dashboard with upload form, KPI cards, temperature/humidity sparklines, interactive charts, entity tables, and CSV export button. All filtered client-side.
API routes for authentication (shared password + session cookies)
and data upload. CSV is parsed server-side with PapaParse,
deduplicated entities, invalid readings filtered out, and
snapshot stored as JSON in Vercel Blob at
datasets/current.json.
Vercel Blob holds only the latest processed dataset snapshot as JSON. No raw CSV files stored. Raw Home Assistant exports remain on the user's computer. Blob storage is read on dashboard load and written on upload.
The dashboard covers the core workflow: secure upload, real-time filtering, exploratory charting, KPI summaries, data inspection, and export.
Home Assistant CSV with columns
entity_id, state, last_changed. File is validated,
deduplicated by hash, and processed server-side. Raw CSV is not
stored; only the JSON snapshot persists.
Real-time filters for entity selection and date range. Presets for common ranges (last 24h, 7d, 30d). Filtering happens client-side; no server query needed after initial load.
Min, max, and average temperature and humidity across filtered data. Live sparkline preview on each KPI. Updated instantly as filters change.
Time-series line charts for temperature and humidity. Built with Recharts. Zoom, pan, and hover tooltips supported. Automatic axis scaling based on filtered data range.
Sortable, paginated tables showing all readings for selected entity. Timestamps, raw state values, and data quality flags visible. Invalid (non-numeric) readings highlighted.
Download filtered data as CSV. Includes all columns from the snapshot. Useful for sharing findings or external analysis.
A modern, minimal stack focused on Next.js and React, with lightweight dependencies for charting, parsing, and UI.
These design constraints keep the dashboard simple and secure. They reflect the learning-project scope and Home Assistant export format.
Expects exactly entity_id, state, last_changed
columns. State must be numeric (temperature/humidity value) or
marked invalid. Non-numeric values are logged but discarded.
Single shared password for all users. No user accounts, roles, or audit logs. All authenticated users see the same data.
Blob storage holds only the latest snapshot. Previous uploads are overwritten. No versioning or rollback. For multiple datasets, users must export and store locally.
All filtering happens in the browser. Dashboard loads the entire snapshot, then filters in memory. Not suitable for massive datasets (>100k readings).
Dashboard is a static export, but API routes still run on Vercel serverless functions. Upload and auth endpoints are stateless and cold-start tolerant.
Raw CSV files are processed and discarded by default. Only the boiled-down JSON snapshot is kept. Users must retain originals for audit or re-processing.
The project uses standard Next.js and Vitest tooling to catch regressions and ensure quality. All checks pass before deployment.
npm run dev # Local dev server npm run build # Next.js static build npm run lint # ESLint npm run test # Vitest (all tests) npm run coverage # Coverage report
Build verification: npm run build must
succeed before pushing to Vercel. The build generates a static
export with API routes pre-compiled. Local API routes can be tested
with npm run dev before deploy.
The dashboard is a functional Phase 1 learning project. Future work is optional based on use case and learning goals.