Writing· · 9 min read
The Quiet Meter rewrite
How a household electricity app went from nine tabs and a grid of cards to five tabs and one question: what does power cost right now, and when is it cheaper? Plus the plumbing behind tomorrow's prices, and how the change reached the homelab.
- interface
- rust
- homelab
Three weeks ago Oomi Energy, our household electricity app, reached its first milestone. A Rust server holds our Oma Oomi meter data, a Svelte PWA shows it, and every number comes from one Rust analytics crate that runs natively on the server and as WebAssembly on the phone. It installs, it works in airplane mode, and it reproduces our electricity invoice to the cent.
It also looked like every dashboard: nine tabs wrapping onto two rows on a phone, a grid of KPI cards, the system font. Everything was there, and nothing answered the question I actually open it with. On a spot-price contract the useful question is about now and the next day. Is this a good hour to run the dishwasher? When is tomorrow cheap?
The meter export could not answer that. Oomi gives us yesterday’s consumption and today’s prices once a day. Tomorrow’s prices are published by the market around 14:00 Finnish time and never appear in the export.


Try both yourself, with made-up data and no sign-in:
- The new interface (Quiet Meter)
- The previous interface, for comparison
Both run entirely in your browser, with the same WebAssembly core as the real app.
Design first, code second
Before touching code I drew the whole app on a design canvas: Home, Usage, Forecast, Save, Bill, a desktop layout and a one-page design system. The design got a name, Quiet Meter, and four rules every screen had to pass:
- One number first. Each screen opens with its answer in big type: the price now, the bill, the saving. Detail sits below, never beside it.
- Colour only means price. Five steps from blue (cheap) to orange (peak), chosen so colour-blind readers can still tell them apart. Usage, buttons and tabs are plain ink.
- Words before charts. A sentence says what the chart shows. Values appear in a fixed readout line above the chart, so a thumb never covers them.
- Five places to go. Home, Usage, Forecast, Save, Bill. Settings, imports and admin live behind the account button.
Usage absorbed three old screens (daily, heatmap, profile) as Days, Hours and Typical day. The shift simulator became Save and now opens with the euros, not the sliders. The fonts are Geist and Geist Mono, served by the app itself, because its content security policy allows no font hosts.


One rule changed during the build. The design coloured prices by splitting the min–max range into five equal parts, so a single price spike would paint every other hour blue. The app uses quintiles instead: each colour covers about a fifth of the time shown, and colour means the same thing on every screen.
Where tomorrow’s price comes from
Prices come from the ENTSO-E Transparency Platform, the official European source. It is free, but a person approves each API token by hand, which takes a few working days. So the new version went live without one, and Home says plainly that there are no prices yet until the token is in.
Two constraints shaped the plumbing. The server keeps no outbound internet access, and every calculation lives in one Rust crate. So the existing fetcher sidecar, which already signs in to Oomi each morning, also polls ENTSO-E: once after midnight, then every 15 minutes from 13:45 until tomorrow’s prices have arrived. It posts the raw XML to the server over the private tailnet listener, the Rust core parses it once, and the PWA syncs the prices into the phone’s IndexedDB so Home still works offline.
The details that took the most care:
- The market day is not our day. ENTSO-E’s day runs on Central European time, so it is 01:00 to 01:00 in Helsinki. A Finnish “tomorrow” is built from two market documents.
- Daylight saving. Days have 92, 96 or 100 quarter-hours. The 25-hour autumn day and the 23-hour spring day each have tests built from two market-day documents, the way they really arrive.
- Compressed curves. ENTSO-E leaves a slot out when its price equals the previous one. The parser fills the gaps to the end of the period.
- VAT history. Finland charged 10% on electricity from December 2022 to April 2023, and the general rate rose to 25.5% in September 2024. A dated table in the core handles both, so the five-year history is right too.
- Hours and quarters. Prices were hourly until October 2025 and quarter-hourly since. Where both exist the finer one wins, and an hour keeps the quarters nobody replaced.
One core, two places
The rule from day one still holds: no analytics in TypeScript or SQL. The price colours, the cheapest three hours ahead and the price right now all come from the Rust core, and the phone runs the same code as WebAssembly. A parity suite runs both builds on the same inputs and requires byte-identical JSON.
The WebAssembly file has a 300 KB budget. The new price code first pushed it to 306 KB, and every extra sort routine cost about 6 KB. Reusing the one sort the crate already had brought it back to 296 KB, with the same results.
Building it with a team of agents
I built this with Claude Code, which ran the work as parallel agents. Each one had its own git worktree and a brief with exact boundaries. The first wave split four ways: the Rust core, the database migration, the fetcher, and the web shell with the restyled screens. The server routes and the Home screen followed once their inputs existed. Every branch was rebased, checked and merged as a signed commit.
Two reviewers, also agents, read the merged code without editing it, and they earned their keep:
- The core review found that a far-future timestamp could crash the WebAssembly worker, and that the daylight-saving test files used the wrong day boundaries, so the hard case was not actually tested.
- The security review found that the market token could be replaced from any household’s admin page, that a single price document dated in the year 9999 could stop the afternoon polling for good, and that the fetcher followed redirects with its token attached.
Each finding went back to a fix agent, which wrote a failing test first. Not everything went smoothly. The worktrees started from an old commit that did not contain the new spec, so the agents had to read it from the main branch. One agent caught three mistakes in the spec’s own wording. The spec is the source of truth, so those were fixed there rather than worked around.
| Check | Result |
|---|---|
| Rust tests, whole workspace | 276 passing |
| WebAssembly parity in headless Chromium | 16 passing |
| Fetcher tests | 78 passing |
| Web unit tests | 45 passing |
| End-to-end tests in a phone-sized browser | 21 passing |
| Golden invoice test (a real bill, to the cent) | passing |
Migrating without breaking anyone’s phone
A rewrite of the screens is also a migration: of the database, of every installed copy of the app, and of the server.
- Database. One additive migration: a price table keyed by market area, plus a price-area column on each household that defaults to Finland. Market prices are the same for everyone in an area, so they are stored once rather than per household.
- Phones. Prices go into the existing IndexedDB store as a separate record,
so the database version did not change. A version bump would have blocked on
any tab still running the old app. Old links such as
/heatmapor/shiftredirect to their new homes, even offline. - Server. The code went to the homelab container with
git archive, so only committed files travelled: no secrets, no build output, no private test data. The deploy folder stayed out on purpose, because the live copy holds values the repository replaced. New images build while the old ones keep serving. Then the server stops, the data volume is copied to a dated backup, and the new version starts and applies the migration, with about a minute of downtime.
What comes next
First, the ENTSO-E token, a pass on real phones, and the exit test: the live price matches the market to 0.01 c, tomorrow appears by 14:30, and Home still shows the day’s prices offline.
Then a forecast tab. A separate Python sidecar will run two time-series foundation models, Chronos-2 and TimesFM-3, with weather and wind forecasts as inputs. Every forecast is scored against the plainest baseline there is, “same as last week”. If the models lose, the tab will say so. Prices a month out depend on weather and outages nobody knows yet, so the forecast shows ranges, not single numbers.
After that come agents and notifications: MCP access for Claude with scopes the household owner sets, push alerts for cheap hours, and a timed restore drill.