Developer workflow for the Solar E-Ink Dashboard. For setup and usage, see README.md. For architecture and domain rules, see docs/architecture.md.
python3 -m venv .venv
./.venv/bin/pip install -r requirements.txt
./.venv/bin/python -m playwright install chromium# All unit tests
./.venv/bin/pytest -q
# Single test file
./.venv/bin/pytest tests/test_aggregator.py -v
# Integration tests (requires real gateway on LAN)
RUN_LOCAL_SM_TESTS=1 ./.venv/bin/pytest tests/test_local_api_integration.py -v./.venv/bin/python main.py --mock --port 8090Open:
http://127.0.0.1:8090/for the default mock dashboardhttp://127.0.0.1:8090/scenariosfor the full scenario + language matrix
Supported scenario URLs:
/?scenario=pv_surplus/?scenario=pv_deficit/?scenario=night/?scenario=battery_support/?scenario=grid_charge/?scenario=no_battery/?scenario=stale
These scenario previews keep the same 24h chart context, including the peak-production marker.
./.venv/bin/python main.py --port 8080Open http://127.0.0.1:8080/. Live mode uses your local Solar Manager gateway data via /v2/stream, with /v2/point as fallback. The browser preview auto-refreshes every 15 seconds.
./.venv/bin/python main.py --mock --export-png out/dashboard.png
./.venv/bin/python main.py --export-png out/live-dashboard.pngThe export path renders the same HTML/CSS/SVG dashboard through Playwright and writes a PNG at 1872x1404. Output is quantized to 16 grayscale levels for the E-Ink target.
The README depends on three mock screenshots in docs/screenshots/. If they are missing or outdated, regenerate them:
./.venv/bin/python scripts/generate_readme_screenshots.pyWhen the architecture or main screen changes, update all four:
README.mddocs/architecture.md
tmp/solar-eink-dashboard-PROJECT.md-full product spec (German)tmp/Solar Manager API.pdf-official API docs