Fetch your electricity consumption from Ellevio ("Mina sidor") and store it in a local SQLite database, then visualize it in a web dashboard.
Two pieces share one SQLite file — there is no backend API in between:
ellevio.py— a single-file Python CLI that logs in, fetches consumption readings, and stores them in SQLite.webui/— a Solid 2.0 (RC) + SolidStart dashboard that reads that database directly (vianode:sqlite) and charts it. Seewebui/README.mdfor frontend details.
- Python 3.14 (managed by
miseviamise.toml) anduv. - Node.js 24+ for the web UI (SolidStart v2 +
node:sqlite).
uv run ellevio.py init # write ~/.config/ellevio/config.tomlEdit config.toml and fill in your real values:
[ellevio]
anlage_ids = ["735999XXXXXXXXXXX", "735999YYYYYYYYYYY"]
customer_id = "XXXXXXXX"The Anläggnings-ID(s) and customer ID are on your Ellevio invoice or in the
Mina sidor UI. Paths in config.toml accept ~.
Recommended — automatic re-login:
uv run ellevio.py loginPrompts for your email/password once, stores them in the OS keyring, and
writes fresh cookies. After this, get can run unattended (e.g. from cron):
when a session expires, it re-logs in with the stored credentials and resumes.
Fallback — no credentials on disk:
uv run ellevio.py extract-cookies --browser chromeCopies your existing Ellevio session out of a browser. These cookies expire
and are not renewed automatically, so re-run this when get starts failing
with an AuthenticationError.
uv run ellevio.py getFetches yesterday for every configured installation at the configured
resolution (default QuarterHourly) and stores it in SQLite. Re-fetching an
already-stored period overwrites it — no duplicates. Useful flags:
uv run ellevio.py get --from lastmonth --to today --resolution Daily
uv run ellevio.py get --anlage-id 735999XXXXXXXXXXX --interval Monthly
uv run ellevio.py get --output ~/consumption.jsonRun uv run ellevio.py get --help for the full flag list. Date expressions
include today, yesterday, week, lastweek, month, lastmonth,
year, <N>d, or a literal YYYY-MM-DD.
uv run ellevio.py uiBuilds the UI on first run (and installs webui dependencies), starts the
server, and opens the dashboard in your browser. Ctrl-C tears the server down
cleanly. Flags: --port, --host, --db, --no-open, --rebuild.
ellevio.py The CLI: config, auth, fetch, storage, UI launcher.
requirements.txt Python deps: requests, browser-cookie3, keyring.
mise.toml mise tasks (install/run) and a pinned Python venv.
webui/ Solid 2.0 (RC) + SolidStart dashboard.
~/.config/ellevio/ Runtime state (git-ignored): config.toml, cookies.txt,
ellevio.db (the single source of truth).
Your data never leaves your machine: the SQLite DB, cookies, and
config (including credentials) live under ~/.config/ellevio/ and are
git-ignored. Only this code is published.