Idea: non-intrusive load monitoring (NILM) for large household consumers
Status: investigated and closed. The measurements are below so nobody has to repeat them.
Question Can evcc detect large household appliances (washing machine, dryer, dishwasher, oven, pool, sauna) from the single grid meter it already reads, and present them as virtual aux meters, with no extra hardware, no configuration and no labels?
Prototype Go, no dependencies, 30 s samples, no cloud, about 3 µs per sample. Residual is home minus metered consumers and aux. Base load is the p10 per 15 minute time-of-day slot over 28 days. Runs come from a layered state machine on steps above the base, so concurrent loads get their own layer. Device candidates are DBSCAN clusters over log power, log duration and plateau count. Last mile: the user names a few runs, a kNN assigns the rest, one energy series per name.
Data DEDDIAG (public, 15 German households, up to 3.5 years, 1 Hz, per-appliance meters; 10 households with 21 appliances used) plus a trace from my own installation. Only one DEDDIAG house has whole-house mains metering.
Results
| what | result |
|---|---|
| energy split base vs large | invariant exact, 70 to 98 % of detected large energy attributed |
| run detection, appliance-sum houses | strict F1 median 0.83 (0.55 to 0.93) |
| run detection, whole-house mains | 0.39 |
| per-device energy, unsupervised | 11 of 21 within ±50 % |
| per-device energy, 5 names per appliance | 11 of 19 within ±25 %, 14 of 19 within ±50 % (labels simulated from ground truth, no UI was built) |
| single-appliance households | 0.85 to 0.96 capture |
Tried and rejected, all measured:
- step library with on/off pairing (Hart 1992): fragments into hundreds of entries
- changepoint start refinement (Killick et al. 2012): helps at ±1 min, hurts at ±5 min
- learned thresholds and learned merge gaps: neutral or harmful
- run shape profiles, duty cycle: no gain at 30 s
- phase separation (Vavouris et al. 2022): only 2.6 % of ground truth runs overlap at all, no headroom
- FHMM (Kolter and Jaakkola 2012), NMF (Batra et al. 2014), deep learning (Kelly and Knottenbelt 2015, Zhang et al. 2018): need priors, a corpus or a model runtime, and generalise poorly across houses (NILMBench 2026: cross-building washing machine F1 0.06 to 0.50 at 1 min)
Limits that do not go away at 30 s and one aggregate signal: appliances with the same power, duration and shape are indistinguishable; a missed program cannot be recovered; sub-threshold appliances such as a heat pump dryer at ~430 W stay invisible; short spikes such as a kettle are not device runs; and any usable accuracy needs user labels, so it is not zero-configuration.
Conclusion For exact per-device energy a metered plug (Shelly Plug PM, Shelly EM, or a circuit meter) is cheap, accurate and available today. NILM from the grid meter can produce plausible estimates but not measurements, and closing that gap needs higher sampling rates, per-phase hardware or training data, in other words the hardware it was meant to replace.
Specification for anyone who wants to continue this work and give this another shot is attached as nilm-spec.md.
🤖 Generated with Claude Code
Thanks for the detailed proposal. This is a feature request, no defect to analyze.
Related: #35498 (non-fixed consumption ends up in gt, mentioned in the request), #34016 (predictable appliance loads in the optimizer, closed) and #35052 (external household load forecast, closed).
The offline prototype against DEDDIAG at 30 s sampling sounds like the right first step, since the improvement in forecast quality should be measured before touching gt. Maintainers will need to decide on scope.
🤖 Generated with Claude Code
TL;DR. AI Spam?
TL;DR. AI Spam?
not spam. its an artefact of how I work with AI. I ask it to research and create specs, but that makes it hard to read for humans.
Let me re-work the description and attach the spec with all the research results and implementation details as markdown attachment.
No plans to add this. You can already measure consumers separately.
Monitoring: split the unmetered residual into base load and large loads, using a rolling base estimate and sustained runs above it. Store both as 15 min collectors and show them in the energy flow and Energy page as estimates.
We are already doing this.
its an artefact of how I work with AI. I ask it to research and create specs, but that makes it hard to read for humans.
Since we are humans, please try to optimize for us 😆.
I know @naltatis, but thats not what I meant. You have all these devices in your screen because you meter them separately, with separate hardware (shelly, ...) or some API that gets consumption from these devices.
Please check what NILM is about, there is lots of research in this space. The point is to "fingerprint" individual household consumers, and add them as "aux meters". And all that without any additional hardware, because its software that disaggregates individual devices from an overall, single grid meter (that we all have today).
@andig I noticed lots of discussions and enhancements that go into this direction recently (as linked in the "why" above), so I am proposing to concentrate this work under a new NILM infrastructure for evcc.
Posting results rather than an opinion.
I built the prototype and measured it on DEDDIAG (10 households, 21 metered appliances) and on my own installation. At 30 s from the single grid meter:
- splitting home into base and large loads works: the energy balance is exact and 70 to 98 % of the detected large energy can be attributed,
- run detection is good on clean signals (median F1 0.83) but only reaches 0.39 on the one real whole-house signal,
- per-device energy needs the user to name a few runs: then 11 of 19 appliances land within ±25 % and 14 of 19 within ±50 % (labels simulated from ground truth, since no UI was built). Without labels it is 11 of 21 within ±50 %.
None of the classical or modern improvements (step library, changepoint detection, FHMM, NMF, deep learning, phase separation) changes that at this sample rate. Details, references and the remaining limits are in the rewritten description.
Verdict: for per-device energy, metered plugs are the better answer. A Shelly Plug PM or a circuit meter costs tens of euros per device, is exact, needs no labels and no model. NILM can give plausible estimates, but not measurements, and closing the gap needs higher sampling rates or per-phase hardware, which is the hardware it was supposed to replace.
So I am no longer pursuing this. The specification of the prototype and the measured numbers are attached to the description of this issue.
🤖 Generated with Claude Code