Integrating Solar and Home Battery With Your Hub
This article may contain affiliate links. If you make a purchase through these links, we may earn a small commission at no extra cost to you. This helps us keep creating free content.
A hybrid inverter re-evaluates what to do with the available power several times a second. A home automation hub polls, at best, once a second and more often once every ten or thirty. The gap between those two numbers is the entire reason a hub should not be trying to run a solar system.
That is not a limitation to work around. It is the correct division of labor. The inverter and the battery management system already make the decisions that matter, competently and in real time. What the hub adds is a view of what happened and a small amount of useful nudging at the edges, and being clear about which is which saves a great deal of wasted effort.
The inverter decides faster than any automation can
Left alone, a grid-tied system with storage follows a priority order that is built into the firmware: supply the house first, charge the battery with what is left over, export the remainder. When generation falls short, discharge the battery to cover the gap, and draw from the grid only when the battery cannot.

That logic runs continuously against measurements taken at the point where the house meets the grid. A cloud passing overhead can cut output by more than half in a couple of seconds, and the inverter has already rebalanced before your hub's next poll has even been issued. Any automation attempting to manage that same balance is working from stale data and fighting a controller that is better informed.
Self-consumption is the number that matters
Total generation is the figure people quote and the least useful one, because it says nothing about what happened to the energy. Two fractions carry the actual information, and they answer different questions.
Self-consumption is the share of what you generated that your own house used rather than exported. Self-sufficiency is the share of what your house consumed that came from your own generation rather than the grid. Same period, same system, different denominators.
Worked through with round illustrative numbers: a day generating 25 kilowatt-hours, a house consuming 18, of which 11 came directly from the array or the battery. Self-consumption is 11 divided by 25, or 44 percent. Self-sufficiency is 11 divided by 18, or 61 percent. Those figures are chosen for clean arithmetic rather than drawn from any real installation, but the relationship holds: a system can score well on one and poorly on the other, so quoting a single percentage without saying which one it is conveys nothing.
Every load-shifting decision described further down is an attempt to move the first fraction. That is the metric a hub can genuinely influence, because moving a load is a decision about the next hour rather than the next second.
Reading the four flows that describe the whole system
Whatever the hardware, the system is fully described by four power values plus one state value. Get these into your hub and you have everything you need for both visibility and sensible automation.
| Value | Unit | Tells you |
|---|---|---|
| Generation | kW | What the array is producing right now |
| House load | kW | What the building is drawing right now |
| Grid flow | kW, signed | Import or export, and how much |
| Battery flow | kW, signed | Charging or discharging, and how fast |
| State of charge | percent | How much reserve is left |
The four power values are related: generation plus grid import plus battery discharge equals house load plus grid export plus battery charge. If your numbers do not balance to within a small margin, something is being measured at the wrong point or a sign is inverted, and every automation built on top will misbehave in ways that are hard to trace.

Sign conventions and the meter that reads backwards
Nothing causes more confusion at integration time than sign. Some systems report grid flow as positive when importing, others as positive when exporting. Some report battery flow as positive when charging, others as positive when discharging. There is no universal convention, and the documentation frequently does not say.
Determine it empirically rather than by reading. Pick a moment with obvious behavior, a large load running at night with no generation, and note the sign on grid flow. Then pick a bright midday moment with the house idle and note it again. One of those two moments must read as import and the other as export, and whichever one carries the minus sign settles the convention.
Do the same for battery flow in the same sitting, because it has its own independent convention and reading the grid sign correctly tells you nothing about it. Bright midday with the pack not yet full is unambiguously charging; a weekday evening after dark with no grid import is unambiguously discharging. Write both conventions down next to the sensor definitions rather than trusting that you will remember them. Ten minutes of observation removes an entire class of bug, including the memorable one where an automation intended to consume surplus fires at two in the morning because the sign was backwards.
Getting the numbers in: a local interface or a portal
There are two routes, and they are not equivalent for automation purposes.

- A local interface on the inverter or an energy meter. Typically an industrial protocol over the local network or a serial link, sometimes a local web endpoint. Fast, private, and it keeps working when the internet does not.
- The manufacturer's portal. Convenient, no wiring, and it is what the app already uses. It is also slower, rate limited, and it stops entirely during an outage, which is precisely when you would most like to know what your battery is doing.
Where both exist, use the local path for anything that triggers an action and treat the portal as a secondary source for long-term totals. On many installations the local interface ships disabled, and enabling it is the installer's job rather than yours, so ask for it at commissioning time if the system is not yet signed off. A system that goes blind during an internet outage is a poor foundation for automation, and it undermines the reason many people install storage in the first place, which is the same reason to think about keeping the hub itself powered through an outage.
Polling intervals and the resolution you actually need
Faster is not better here, it is just more rows. Match the interval to what the data is for.
- Every one to five seconds: only worth it if an automation reacts to short surplus events, and only over a local connection. This resolution generates on the order of ten thousand rows per entity per day, which becomes a storage problem within weeks.
- Every ten to thirty seconds: the sensible default for live dashboard values and for surplus-based switching decisions.
- Every one to five minutes: plenty for state of charge, which rarely moves fast enough to justify anything tighter.
- Hourly aggregates: what you keep long term. Daily generation, consumption, import and export totals answer nearly every question anyone asks a year later.
Record the hourly aggregates from the start even if you never look at them, because the seasonal comparison is the one thing you cannot reconstruct after the fact.
Charging from surplus and charging from the grid are different decisions
These get conflated constantly, and they have opposite economics.
Charging the battery from surplus generation converts energy you were about to export into energy you will use later. The only loss is the round trip through the battery, commonly quoted in the region of eighty-five to ninety percent for a complete charge and discharge cycle. Treat that range as a scale marker rather than a figure for your pack: the real number depends on the chemistry, the rate and the temperature, and your own datasheet is the only authority on it. Even at the bottom of that range the trade is almost always worthwhile, because the alternative for that energy was export.
Charging the battery from the grid is a different bet entirely. It only makes sense when the price you pay now is enough below the price you avoid later to cover that round-trip loss, and it consumes cycle life for a financial rather than an energy reason. It is a legitimate strategy on some rate structures and a straightforward loss on others, and the arithmetic is the same subtraction that governs any decision about when to use energy.
Marginal shifting: the loads worth starting when the sun is out
Here is where a hub earns its place. The decision is not how to route power, it is whether to start a load now given that surplus exists and is likely to persist.
The candidates are the same ones that matter for any load shifting: water heating, vehicle charging, pool or well pumps, dishwasher and dryer cycles. The difference under solar is the trigger. Instead of a clock time, the condition becomes sustained export above some threshold, plus a battery already above a chosen state of charge so that household reserve is not being spent on a discretionary load.
A reasonable starting condition looks like: export above 1.5 kilowatts continuously for two minutes, battery above 80 percent, and the load not already run today. Those thresholds are illustrative and want tuning to your array size and your appliance, but the shape of the rule is right: a power threshold, a duration, a reserve condition, and a guard against repetition.
Do not deploy that condition on its own. A start rule without a matching stop rule is the specific mistake described in the next section, and the load itself will trip it within seconds of switching on. Write the stop condition at the same time as the start condition, on the terms set out below, and treat the pair as one rule rather than two.
Hysteresis, or the heater that toggles all afternoon
The classic failure is a rule that switches a load on when surplus exceeds a threshold and off when it falls below the same threshold. Starting the load consumes the surplus, which pushes the measurement below the threshold, which stops the load, which restores the surplus. On a partly cloudy afternoon this can cycle a relay dozens of times an hour.
Three fixes, applied together rather than separately. Separate the thresholds so the turn-off point sits well below the turn-on point, ideally by more than the load's own draw. Require a minimum duration on both transitions, for example two minutes above the start threshold and five minutes below the stop threshold. And impose a minimum run time so that once a load starts it stays on long enough to be useful, which matters most for anything with a compressor or a motor, where frequent restarts cost far more wear than the energy saved.
Forecast-driven decisions and their error bars
Using a generation forecast to decide whether to hold battery capacity or spend it is genuinely useful and consistently overtrusted. A forecast good enough to say "tomorrow will be poor" is not necessarily good enough to say "surplus will begin at eleven and reach three kilowatts".
Use the forecast for coarse decisions with cheap failure modes: whether to charge the vehicle overnight or wait for the sun, whether to reserve battery capacity for an evening peak. Do not use it for anything where being wrong leaves the house short. And compare the forecast against what actually happened for a few weeks before you let it drive anything, because the error distribution for your roof, with its own orientation and shading, is not the error distribution for the region.
The battery management system is not something to second-guess
Inside the battery there is a controller enforcing cell voltage limits, temperature limits, current limits and cell balancing. It will refuse to charge below a certain temperature, reduce current as it approaches full, and disconnect entirely if a cell goes out of range. These behaviors are safety functions and they are the reason the pack is allowed in a house.
Two consequences for anyone writing automations. First, do not treat a refusal as a fault to work around. If charging stops at a state of charge below what you expected, or the pack will not accept current on a cold morning, that is the protection system doing its job, and an automation that retries aggressively is fighting the one component you most want to be in charge.
Second, do not build a rule whose safety depends on the battery behaving a particular way. Automations should be advisory: start a discretionary load, hold off on another. Nothing in a home automation system should be the reason a battery stays inside its limits, because a hub reboots, loses network, or gets an update at an inconvenient moment, and none of those events should matter to anyone's safety.
The line where the electrician takes over
Everything on the data side is yours. Reading values, storing history, building dashboards, deciding when the dishwasher runs: none of that touches the installation.
Everything on the power side belongs to a qualified electrician working to the code that applies where you live, under whatever permit and inspection process your jurisdiction requires, and in coordination with your network operator. That includes anything wired into a distribution panel, any current transformer clamped around a service conductor, any switching device carrying a large load, and any change to how the system behaves during a grid outage. A grid-tied inverter's anti-islanding behavior exists to protect people working on the lines, and it is not a setting to explore.
The practical test: if the work involves a conductor rather than a network cable, it is not a weekend project regardless of how straightforward the online explanation looked. Ask the installer for the local data interface to be enabled and documented at commissioning time, which costs nothing then and is awkward to arrange later.
Alerting on the failures that stay quiet
A solar system fails silently more often than it fails loudly. The alerts worth having are the ones that catch a gradual problem before a quarterly statement does.
Generation that stays at zero through a bright midday, when the forecast and your own eyes disagree with the meter. A daily total that has drifted well below the same date last year, which catches soiling, shading from a grown tree, and a string that has quietly dropped out. A battery whose usable capacity between full and empty has shrunk over a season. And an inverter that has stopped reporting at all, which is worth alerting on separately, because a missing value looks identical to a zero on most dashboards and means something completely different.
A realistic division of labor in a solar house
The hub's contribution is visibility plus a handful of decisions about when discretionary loads run. That sounds modest next to the marketing, and it is still the part that moves self-consumption, which is the fraction that determines what the installation is actually worth to you.
Set it up in that order. Get the four flows and the state of charge in over a local connection, with the signs verified by observation. Record hourly totals from day one. Add two or three surplus-triggered loads with proper hysteresis. Add alerts for the quiet failures. Leave the energy balance to the inverter, leave the cell chemistry to the battery management system, and leave anything carrying current to the electrician. The result is a house where you can answer what happened last March, and where the dishwasher runs at the right time, which between them is most of what automation can honestly offer here.
β‘Disclaimer: This article is for informational purposes only. Smart home installations may involve electrical wiring and must comply with local building codes. Electrical work should only be performed by a licensed electrician.
Published by the SmartHome Automate editorial team. Published November 30, 2026.
Editorial responsibility: see Imprint.
Spotted an error or have something to add? corrections@smarthomeautomate.com
Explore more
All articles on SmartHome Automate β
Smart Home Tips, Delivered
New guides, device reviews, and automation ideas β every week in your inbox.
π Free bonus: Smart Home Starter Checklist (PDF)