No description
Find a file
Michiel Berger b39501ca21 Battery timeline modal + switch to real 2025 data
Modal:
- Click any battery row to open a modal with three uPlot charts:
  irradiance (W/m²), battery SoC (kWh), net meter flow (kWh/h).
- Date picker + prev/next buttons + 1/3/7-day window selector.
- 'Battery on' toggle flips the SoC and grid charts to the
  no-battery baseline; summary numbers update accordingly.
- New /api/timeline endpoint returns the full per-hour series for
  any (battery, scenario, window).

Data:
- Re-exported prices + solar from data-vm for 2025-01-01 → 2025-09-01
  (8 months — solar coverage limit). All three signals now share
  real 2025 timestamps; no more month/day alignment fudge.
- Re-processed dad's CSV against the new window so power_w is real
  net consumption per actual hour.
- Compute_leaderboard now applies an 8766/window-hours annualisation
  factor to year-1 savings, capt kWh, throughput, and total surplus
  so payback / 10-yr net stay correct on the shorter window.
- Defaults: demand 1010 (= dad's net over 8 months, scale 1.0),
  start 2025-06-15.

Tests pass. Local run: PORT=8765 uv run python -m pluginbattery.web,
click any row.
2026-05-01 09:21:16 +02:00
data/raw Battery timeline modal + switch to real 2025 data 2026-05-01 09:21:16 +02:00
docs Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
scripts timeline: label columns 'no-bat meter' / 'with-bat meter' to avoid confusion 2026-04-30 22:47:59 +02:00
src/pluginbattery Battery timeline modal + switch to real 2025 data 2026-05-01 09:21:16 +02:00
tests Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
.env.example Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
.gitignore Move custom batteries from web.py into data/raw/extra_batteries.json 2026-04-30 15:52:16 +02:00
CLAUDE.md Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
Dockerfile Dockerfile: gunicorn 2 workers x 4 threads (gthread) 2026-04-30 17:39:13 +02:00
Procfile Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
pyproject.toml Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
README.md Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00
uv.lock Initial import: home-battery ROI simulator + cracked thuisbatterijgids calc 2026-04-30 13:46:27 +02:00

pluginbattery

Backtest the actual ROI of a home battery against real historical electricity prices and solar irradiance.

Answers: "If I had owned this battery (plug-in or installed) over the last N years, what would it have actually saved me?"

See CLAUDE.md for project intent, open decisions, and assumptions.