Inspiration
City grids are continuously overburdened by households that use appliances at just the wrong time. Oftentimes, home residents do not realize they are leaking money either. The bill says $125. It doesn't say the air conditioner was $42 of it, that the fridge has been drawing 40% more since last Tuesday, or that running the water heater after 7 pm would have saved $8. Smart meters can tell you, but no one is putting a plug on every outlet in their house.
The research field of non-intrusive load monitoring (NILM) has known for thirty years that a single whole-home electrical signal carries enough information to tell appliances apart. I wanted to put that idea into use with Synergy, an electric hub for every household. One sensor, every appliance, and advice priced in dollars that you can implement every week. Greener homes, one house at a time.
What it does
Synergy is a website for family members to check their current electrical usage per appliance, and guides specific weekly changes they can make to minimize this output, through the predictions of a neural network.
The magic is in using the whole-home electrical signal (power plus current harmonics) to distinguish appliances by detecting their unique electrical "heartbeats." This allows me to turn one ever-present signal into something families can act upon.
- Where the power goes. A convolutional neural network (CNN) splits the whole-home signal into per-appliance usage: air conditioner, fridge, water heater, laptop, and so on. Every figure is labelled as estimated, and you can open any appliance to see how accurate the CNN is on recordings it never trained on.
- This month's bill, by day. Month-to-date, a forecast for the rest of the month with a high-end range, and a bar for every day. Tap a day and it opens that day's appliance rundown.
- Looking ahead. A LightGBM forecaster predicts each appliance's energy for the next 7 days against the weather forecast and flags days that will cost more than usual.
- Appliance health. The fridge is compared to its own history; two days of drawing more than usual raises an alert before the compressor dies.
- Suggestions, priced. Each week a deterministic simulator prices six kinds of habit change under the real DTE time-of-day tariff (24.1¢ at peak, 18.4¢ off-peak) and keeps the best three. Gemini writes each one as a plain sentence: "On weekdays the thermostat cools 1 °F from 2 to 3 pm, then sits 2 °F warmer from 3 to 7 pm. Saves $4.56 a month."
- Take action. A thermostat suggestion moves the (simulated) thermostat in two taps with a 24-hour undo. Precool installs a weekday schedule on the device itself that expires at the end of the week, so the app never changes a device on its own clock.
- Did it really save? A week later the verifier compares what the appliance actually cost against the forecast that priced the suggestion, shows the verified saving, and scores each kind of suggestion so next week's ranking favors what this household actually does.
Inputs and outputs
Inputs
- One whole-home electrical signal: power plus 32 current harmonics, every 2 seconds
- Hourly weather, past and 7-day forecast (Open-Meteo)
- The utility's rate card: DTE time-of-day, peak and off-peak cents per kWh
- The home's appliance list and thermostat bounds, entered at sign-up
- Your taps: Take action, Dismiss, Undo
Outputs
- Per-appliance usage and cost, estimated by the CNN, labelled as such
- This month's bill to date, a forecast for the rest of it, and a day-by-day breakdown
- Days ahead that will cost more than usual, and which appliance drives them
- An alert when the fridge drifts from its own normal
- Three priced suggestions a week, written in plain English by Gemini
- A thermostat change or a precool schedule installed on the device, with undo
- A verified dollar saving a week later, and a score that re-ranks next week's suggestions
How I built it
The front end. React, TypeScript and Vite.
The back end. FastAPI on Python 3.11. SpacetimeDB on Maincloud with a TypeScript module: raw readings are append-only, every write is a reducer, the ledger of suggestions and their outcomes is never deleted, and device changes are logged before the command is sent.
The NILM CNN. I designed and trained a seq2point convolutional neural network (CNN) in PyTorch from scratch on a Mac's GPU. It reads a 299-sample window (about 10 minutes) of the whole-home signal, 35 inputs per sample (active power, current, power factor and 32 current harmonics), through a shared 5-layer 1-D convolutional encoder, then a watts head and an on/off head for each of 8 appliances. Training data is the Dinar et al. NILM (Non-intrusive Load Monitoring) dataset (Sensors 2025), split strictly by recording session so no test session leaks into training, plus synthetic days stitched from the training sessions' activations. The harmonics turned out to be the whole story for small loads: with them the CNN scores the laptop at an F1 of 0.99 on held-out sessions; with power alone, 0.64. I also built the classic combinatorial-optimization baseline (the standard NILM benchmark since 1992) so I could show the CNN beating it. Inference runs in plain numpy from the saved weights, so a day of readings is split without loading PyTorch next to LightGBM (they fight over OpenMP on macOS).
The forecaster. This component is the predictive core of the product. Used LightGBM per appliance, with lagged energy, hour, weekday and the real-time Open-Meteo temperature forecast as features, evaluated on a time-ordered 80/20 split and only deployed when it beats a seasonal-naive baseline (using another script to make that decision).
The pricing engine. One rule: every dollar figure anywhere in the app is energy × the rate for that hour, computed in one place from a tariff the user can inspect. No model ever emits a dollar. Suggestions come from a fixed library of six templates (shift out of peak, thermostat setpoint, precool schedule, water heater setpoint, standby trim, fridge service), each priced by re-running the same cost function on a changed forecast. Precool searches every combination of length and depth and installs the best one for that week's weather.
Gemini as narrator. Gemini 2.5 Flash gets structured records only (appliance, change, saving) and returns one sentence per suggestion against a JSON schema. Every number in its output is checked word for word against the input; a sentence that invents or rounds a number is discarded and a plain fallback is shown instead. Gemini never proposes an action.
The demo. A simulated practice home, replayed through the real ingestion path at 2-second resolution over four July weeks, with a fridge fault injected on day 12 and a simulated household that follows whatever it accepts, so the verification loop closes on screen.
Challenges I ran into
- Making the CNN honest. A random train/test split of 2-second samples reports near-perfect accuracy because adjacent samples are identical. I split by recording session, and the real numbers are humbler: the straightener (0.45 F1) and iron (0.89) are short bursts with only a handful of examples in 12 sessions.
- The watts head regressing to zero. My first CNN scored the rare appliances at 0.00: the on/off head worked, but the regression head had learned that "0 W" is usually right. Training it on on-samples only overshot the other way (a false "on" cost the iron's full 1,300 W). A class-balanced loss fixed both.
- PyTorch and LightGBM crash together on macOS. Both bundle an OpenMP runtime. I moved CNN inference to numpy and kept PyTorch for training only.
- A thermostat schedule versus "never on a timer". Precool needs the setpoint to change three times a day, which my own rule forbade. The resolution: a single tap installs a bounded schedule on the device, which runs it itself and drops it at the end of the week.
- Pricing precool properly. My first pricing assumed cooling could be stored with no loss and said $1.85 a week. Running the actual thermostat model against the week's weather said $0.09. The fix was to let precool search its own length and depth each week.
Accomplishments that I'm proud of
- Accurately capturing behavior of each appliance using only one sensor. This seemed like an impossible task at first, but NILM was an incredible solution to tackle this.
- A closed loop: suggestion, tap, device change, and a week later a verified dollar figure and a score that reshapes next week's ranking.
- I built and trained a CNN for NILM from scratch. From the architecture to a deployed model: a shared convolutional encoder with per-appliance heads, trained on real recordings and evaluated on held-out data. It beats the classic baseline on four appliances, and the power-only ablation proves the current harmonics are what the network is learning from.
- An architecture where no AI component can invent a number: the CNN purely works on the input (estimates watts), a deterministic engine prices them, and Gemini is checked word for word.
- A dashboard a household could actually use, with every number traceable to an appliance, an hour and a published rate card.
What I learned
Most of the hard problems weren't modeling problems. They were trust problems: how to show a CNN's estimate without pretending it's a measurement, how to let a language model write for you without letting it hallucinate, and how to prove a saving instead of promising one. I also learned that evaluation discipline (session splits, held-out sessions, a baseline that has to be beaten) is what separates a demo from a product, and that a 150-line baseline is worth building before the neural network, because it tells you whether the CNN earned its place. And on the modelling side: the loss function mattered more than the architecture. Three training runs with the same CNN gave three very different appliances-that-work, and the fix each time was in how the loss weighed rare appliances, not in the layers.
What's next for Synergy
- A real clamp sensor on a breaker panel, and a smart plug used for one week to fine-tune the CNN's heads to a specific home's appliances while the shared encoder stays frozen.
- Customizing to user's own utilities' price plans at sign-up (currently only using DTE rate).
- Deploying these suggestions on a live Nest adapter for the thermostat; the interface already has one method to swap.
- Also monitoring hourly grid carbon intensity, so the changes you make also shows the CO₂ you avoids at peak hours.
- Expanding to more appliances (dryer, oven, EV charger) from public datasets, and the CNN trained on far more homes.
Log in or sign up for Devpost to join the conversation.