Inspiration
An unusual water-meter pattern raises a useful question: is it a leak, a running fixture or intentional use? A convincing-looking alert cannot answer that question without context. We wanted to make water-use review understandable: show the signal, show the original readings, and let a person record what they found.
What it does
LeakLens is a browser-based water telemetry review prototype. A user imports one-minute average-flow readings or explores clearly labelled synthetic scenarios. The app learns a reference pattern from a selected routine period and highlights unfamiliar 15-minute windows. Each event exposes its recorded volume, model-distance ratio, nearest reference matches and original readings. Missing readings become data-quality events rather than being silently filled with zeros.
A reviewer can mark an event as needing inspection, explained use or a sensor issue, add context and export a JSON evidence packet containing the readings, model settings and decisions. A planned-irrigation scenario deliberately triggers the same continuous-flow category as a suspected leak, showing why a human review step matters.
How we built it
We built a dependency-free HTML, CSS and JavaScript interface with a browser-local, one-class nearest-neighbour model. The model uses average flow, lower-quartile flow, active-minute ratio and variability. It learns robust scales and a novelty threshold from reference windows, then compares later windows with their three nearest reference neighbours. Small explanatory rules describe continuous flow; the score never becomes a probability or diagnosis.
Node.js provides a local static server and the built-in test runner. The synthetic fixtures are seeded and reproducible. The application does not send imported readings to an inference service, control a valve or contact anyone. A generated single-file demo can run offline. A private Sites source repository has been prepared; hosting deployment and judge access are not yet verified.
Challenges
The most important challenge was separating novelty from cause. A continuous-flow pattern does not reveal whether water is being wasted. We exposed the source evidence and review context instead of treating model distance as certainty. Missing data also required a separate path: excluding incomplete windows prevents a disconnected sensor from looking like a safe zero-flow interval.
Accomplishments
The functional prototype implements a complete import-to-review-to-export workflow. Seven automated regression checks verify CSV handling, volume arithmetic, continuous-flow detection, planned-irrigation ambiguity, missing-data treatment, reference contamination and partial windows. On the fixed mixed-day fixture, the six-hour reference with balanced sensitivity produces four review events. That is a reproducibility check, not a claim of field accuracy or water savings. Browser interaction verification and the final recorded demo remain outstanding at draft time.
What we learned
A small local model can make its comparison evidence easy to inspect, but reference selection can hide anomalies and legitimate behaviour changes can produce alerts. A useful environmental tool needs both measured data and review context. Our next validation step is a labelled field dataset, with separate evaluations for leaks, intentional use and sensor faults.
What's next
Validate on authorized, labelled meter readings, test different sampling intervals and add a documented read-only meter adapter. These are proposed extensions, not implemented features. We would also add evidence-packet re-import so a reviewer can resume work.
AI and data disclosure
OpenAI Codex assisted with ideation, implementation, synthetic fixture generation, tests and this draft. No external pretrained model or real household dataset is bundled. All demo readings are synthetic. LeakLens development began on 2 November 2026, after the GenHacks build period opened. No code from the neighbouring LedgerPilot project is included.