Skip to main content
Photo of a Shelly 3EM on a DIN rail in a home fuse box, next to orange surge arresters and a three-pole isolator, with the current transformer leads coiled beside it

Saving

Home energy monitoring with Home Assistant and Shelly 3EM: from the fuse box to the Energy dashboard

How to measure a solar home with a Shelly 3EM and Home Assistant: installation, the Energy dashboard and a year of data that matches the bill.

By Bartłomiej Szabłowski · Updated 18 November 2026 · 12 min read

Data: Measurements in the author's home (Home Assistant, Shelly 3EM), as of 18 November 2026.

In short: The Shelly 3EM is a meter with three current transformers that clamp around the phase conductors in the fuse box. It measures power, voltage and imported and exported energy on every phase, and Home Assistant reads it locally, without the cloud. Over the last 12 months my home used 8,168 kWh. The panels produced 3,880 kWh, and 76.5% of that was used on site. The same meter shows three different "grid imports": 6,415, 5,664 or 5,199 kWh, depending on how you add up the phases, and only the last one, the hourly net balance, matches the bill. The measurements drive two automations: a water heater run on surplus solar and a choice between the air conditioner and the gas boiler by cost. The second saves an estimated 970-1,450 zł (220-330 €) per heating season.

An electricity bill tells you how much energy the house drew in a month. It does not tell you at what hour, on which phase, how much of it came from your own panels, or what happened on the day consumption suddenly jumped. For more than two years I have been measuring that myself in my home in Poland: a three-phase Shelly 3EM meter in the fuse box, Home Assistant, and a dozen or so plugs with power metering on individual appliances. This article covers the installation, the integration, the Energy dashboard, and the trap that makes a dashboard show different numbers from the bill. At the end: what the measurements let me change.

What the Shelly 3EM measures

The Shelly 3EM is a DIN-rail energy meter for three-phase installations. It comes with three split-core current transformers rated up to 120 A each. A transformer opens like a clip and closes around a phase conductor, so nothing has to be cut or rewired. The meter takes voltage from terminals connected to each phase.

A hand holding the box of a Shelly Plug S smart plug next to the box of a Shelly 3EM three-phase energy meter
The starter set: a Shelly 3EM to measure the whole grid connection and a Shelly Plug S smart plug to measure a single appliance. Photo by the author: Bartłomiej Szabłowski.
A box of 120 A split-core current transformers for the Shelly EM and Shelly 3EM, in front of the open meter packaging
A split-core current transformer rated up to 120 A. It clips around a conductor without disconnecting the installation; the kit contains three, one per phase. Photo by the author: Bartłomiej Szabłowski.

From current, voltage and the shift between them the meter works out, for each phase:

  • instantaneous power in watts, with a sign: positive is drawn from the grid, negative is fed in,
  • an imported energy counter and an exported energy counter, in kWh,
  • voltage, current and power factor.

Installing it in the fuse box

I fitted the meter myself in May 2024. I hold a Polish SEP qualification for work on electrical installations.

This is my fuse box before the installation:

An open home fuse box with circuit breakers, residual-current breakers, surge arresters and a three-phase main switch
The fuse box before the installation. Surge arresters and the main switch sit at the bottom, and there is a free DIN rail beside them for the meter. Photo by the author: Bartłomiej Szabłowski.

The wiring is described in the manual and comes down to two circuits:

  1. The current transformers clamp around phase conductors L1, L2 and L3 after the utility meter, ahead of the household loads and ahead of the solar inverter. Only then does the meter see the whole grid connection: what the house takes from the grid and what it sends back.
  2. Supply and voltage sensing (terminals VA, VB, VC and N) go through a separate circuit breaker, either three-pole or three single-pole ones.
Wiring diagram from the Shelly 3EM manual: three current transformers on phases A, B and C connected to terminals IA, IB and IC, and the voltage supply VA, VB, VC and N through a three-pole breaker
The three-phase wiring diagram from the Shelly 3EM manual: transformers on the phases, voltage terminals fed through a separate breaker. A fourth transformer, on the neutral conductor, is optional. Photo by the author (drawing: Shelly manual): Bartłomiej Szabłowski.

Two things decide whether the readings are right:

  • Transformer A must sit on the phase that terminal VA takes its voltage from. The same goes for B and C. The meter computes power from the current and voltage of the same phase; mixed-up phases give nonsense power and power factor readings.
  • The arrow on the transformer points towards the house. A reversed transformer turns import into export: at night, with no sun, the house would appear to "export" on that phase. That is the first thing to check when the numbers look odd.
Three white current transformers marked A, B and C clipped onto black phase conductors in a fuse box, under the surge arresters
Transformers A, B and C clipped onto the phase conductors. The letter on a transformer must match the phase the meter takes its voltage from, and the arrow points towards the house. Photo by the author: Bartłomiej Szabłowski.
A Shelly 3EM mounted on a DIN rail next to orange Simtec surge arresters, with the transformer leads coiled beside it
Done: the Shelly 3EM on the DIN rail next to the surge arresters. The transformer leads are longer than needed, so they stay coiled in the fuse box. Photo by the author: Bartłomiej Szabłowski.

The Shelly web page and app

When first powered, the Shelly 3EM opens its own Wi-Fi network, through which you give it your home network's details. After that it serves a local web page at its IP address, with total power and the live state of each phase.

The Shelly 3EM local web page: total power of 0.60 kW and, for phases A, B and C, power, voltage, current and power factor
The Shelly 3EM's local web page, opened from a browser on the home network (Polish interface). For each phase: power, voltage, current and power factor; a down arrow means drawing from the grid. Screenshot by the author: Bartłomiej Szabłowski.

For the first four months I used only the Shelly app and its cloud. That is enough to see power and daily consumption, but nothing more: you cannot set the meter against the inverter's production, the electricity price or individual appliances. In October 2024 I connected it to Home Assistant, and I have kept the full history since.

Integrating it with Home Assistant

The Shelly integration is built into Home Assistant and finds the meter on the network by itself. It talks to the device locally, so measurement keeps working without internet access and the Shelly cloud can be switched off.

For every phase the integration creates entities for power, imported energy, exported energy, voltage, current and power factor. From the phase counters I build three template sensors in Home Assistant:

Sensor What it computes
sensor.grid_instant_power sum of the three phase powers; negative means export
sensor.total_energy_used sum of the three imported energy counters
sensor.total_energy_returned sum of the three exported energy counters

The summed power is the simplest view of what happens at the grid connection. This is a sunny day: at night and in the morning the house imports, from roughly 9:00 to 19:00 it exports, and the phases can move in opposite directions.

Home Assistant history chart for 22 June 2026: the power of the three Shelly 3EM phases and their sum; around midday the power drops below zero and the phases move in opposite directions
The power of the three phases and their sum on a sunny day, 22 June 2026 (Polish interface). A negative value is feeding into the grid. In the afternoon phase B can draw while phase C feeds in at the same moment. Screenshot by the author: Bartłomiej Szabłowski.

The trap: summed phase counters are not the bill

The Shelly 3EM counts each phase separately. When phase B draws 1 kW while phase C feeds 1 kW back at the same moment, both counters grow: imported and exported. The utility meter sees zero at that moment. Since April 2022 Polish prosumers have been settled with vector summing: the phases are added together, then the whole hour is netted, meaning energy imported and exported within the same hour cancel out and only the remainder is billed (as of November 2026; the wholesale market has moved to 15-minute periods, but prosumers are still netted hourly). Summing the phases is common across Europe, but the netting period varies: Germany and Austria net instantly at the meter, Spain nets every hour (hence the name of the Balance Neto integration), and the Netherlands has yearly net metering until 2027. Check how your grid operator does it.

In my house the phases drift far apart. The three-phase inverter feeds all phases equally, while most of the household load sits on phase B:

Import and export counted separately on each phase. The three-phase inverter feeds all phases equally while most of the household load sits on B, so phase C exported more than it imported over the year and B imported nearly everything. Data: Measurements in the author's home (Home Assistant, Shelly 3EM), as of 18 November 2026.
The numbers behind the chart
PhaseImportedExported
Phase A2,336826
Phase B3,302271
Phase C7781,028

So I counted grid import over my year of data in three ways:

The same Shelly 3EM over the same year. Per-phase counters overstate import by 23% and export more than twice compared with the hourly net balance, which is what a Polish prosumer is billed on. Import minus export comes out at about 4,290 kWh in all three. Data: Measurements in the author's home (Home Assistant, Shelly 3EM), as of 18 November 2026.
The numbers behind the chart
One meter, three ways of countingPer-phase countersInstantaneous phase sumHourly net balance (the bill)
Grid import6,4155,6645,199
Grid export2,1251,368911
Method Import Export
Each phase's counters on their own 6,415 kWh 2,125 kWh
Instantaneous sum of the three phases 5,664 kWh 1,368 kWh
Hourly net balance (as the utility bills it) 5,199 kWh 911 kWh

A dashboard built on per-phase counters overstates import by 23% and export more than twice. The difference between import and export is the same in all three, about 4,290 kWh, because netting only cancels out the parts of import and export that offset each other. Everything calculated from import changes, though: cost, self-consumption, the case for a home battery.

In my setup the hourly net balance comes from the Balance Neto integration, installed through HACS. It takes the summed phase counters, subtracts the increments every hour, and exposes two counters: sensor.net_imported (import after netting) and sensor.net_exported (export after netting). I describe its configuration step by step, in Polish, in the article about the water heater run on surplus solar.

The Energy dashboard: energy flow in the house

Home Assistant's Energy dashboard needs three counters and an electricity price:

Dashboard field My entity
Grid consumption sensor.net_imported (Balance Neto)
Return to grid sensor.net_exported (Balance Neto)
Solar production the inverter's daily production counter
Electricity price a sensor with the price of the current G12R zone

From these counters Home Assistant works out home consumption itself: import + solar - export. This was the best day of the year, 22 June (the screenshots are in Polish: Sieć is the grid, Energia słoneczna solar, Dystrybucja energii the energy flow):

The Energy dashboard in Home Assistant for 22 June 2026: energy flow with solar 31.6 kWh, from the grid 6.17 kWh, to the grid 11.7 kWh and home 26.1 kWh, next to an hourly chart of consumption, production and export
The Energy dashboard for 22 June 2026 (Polish interface): the panels produced 31.6 kWh and the home used 26.1 kWh. 11.7 kWh went to the grid, and the home took 6.17 kWh from it, mostly in the morning and evening. Screenshot by the author: Bartłomiej Szabłowski.

And this is the whole year:

The Energy dashboard in Home Assistant for the last 365 days: solar 3.88 MWh, from the grid 5.22 MWh, to the grid 0.91 MWh and home 8.19 MWh, next to a daily chart of the whole year
The same dashboard for the last 365 days (Polish interface): the home used 8.19 MWh, of which 3.88 MWh came from the panels. After netting only 0.91 MWh went to the grid. Screenshot by the author: Bartłomiej Szabłowski.

Two years of data show more than the dashboard does. Month by month, grid import falls to about 200-260 kWh in summer and rises to 730 kWh in winter, because the house is partly heated by an air conditioner:

Grid import and export after hourly netting and solar production, month by month. Solar is missing for January and February because the inverter did not report. From May to August grid import drops to 200-260 kWh a month. Data: Measurements in the author's home (Home Assistant, Shelly 3EM), as of 18 November 2026.
The numbers behind the chart
MonthGrid importSolar productionGrid export
December634250
January730no data0
February579no data2
March52639771
April396513188
May249580183
June202635160
July244541128
August258502104
September30136051
October43920519

The average day across the year shows how consumption lines up with the sun and the tariff. My tariff, G12R, is a Polish two-zone time-of-use tariff: the cheap zone runs 13:00-16:00 and 22:00-07:00 at 0.539 zł/kWh (0.12 €), the rest of the day costs 1.327 zł/kWh (0.30 €). Grid import peaks at 4-7 in the morning and halves at 7, when the expensive zone starts. That is no accident but automation, described below. In total, 63.5% of my grid import falls in the cheap zone.

The average day across the whole year: home consumption, solar production and grid import. Cheap G12R hours are 13-16 and 22-7. Import peaks at 4-7 in the morning, when the air conditioner heats in winter, and halves at 7, when the expensive hours begin. Data: Measurements in the author's home (Home Assistant, Shelly 3EM), as of 18 November 2026.
The numbers behind the chart
Hour of dayHome consumptionSolar productionGrid import
08670867
17880788
27860786
37890789
49190919
594517929
697872907
7521169357
8615330306
9813625248
101,033911229
111,2001,163214
121,3111,327237
131,5381,436425
141,4511,384479
151,3261,217547
161,009942424
17892643494
18820319600
1978171711
207336727
216510651
227890789
238260826

Measuring individual appliances

The Shelly 3EM tells you how much the whole house draws, but not what draws it. For that there are plugs and modules with energy metering. I use three kinds:

  • a smart plug (Shelly Plug S) for appliances with a plug: washing machine, dishwasher, fridge, water heater,
  • an in-wall module (Shelly 1PM Mini, PM Mini) behind a switch or in a box next to a hard-wired appliance, such as an air conditioner,
  • a dimmer with metering for lighting.

Each one is added to the Energy dashboard as an individual device. Home Assistant then shows its consumption against the whole house and labels the rest, which nothing measures, as untracked consumption. If one device sits behind another (a lamp on a power strip that itself hangs on a metering plug, for example), mark it in the upstream device field, or its energy is counted twice.

A metering plug answers questions the bill never asks. Example: my dishwasher uses 1.25 kWh per cycle (median of 325 cycles over the year). In the cheap G12R zone that is 0.67 zł (0.15 €), in the expensive one 1.66 zł (0.38 €). Without the measurement I would not know whether it is worth waiting until 13:00 or 22:00 to start it. With it, I know that 63% of the cycles start in the cheap zone.

Plugs have their limits: at loads of a few watts the reading is less accurate. That does not matter when ranking what uses the most; it does when counting standby consumption to the watt.

What I optimised with it

Measurement alone saves nothing. Savings come from automation that uses it. In my house that means two things.

A water heater run on surplus solar. The current hour's balance from Balance Neto decides when to switch on a water heater with a 1.5 kW element: only when the hour will end in surplus anyway. From March to October 2026 the water heater used 998 kWh, about half of the energy that would otherwise have gone to the grid. At most 2.3% of its energy fell in hours that ended with a net import. Plumbing, automation and the money side are in the (Polish) article Bojler grzany nadwyżką z fotowoltaiki.

Choosing the heat source by cost. The house is heated by a gas boiler and an air conditioner. The automation compares the cost of a kWh of heat from both: the air conditioner from the current G12R zone and an efficiency (COP) derived from the outdoor temperature, the boiler from the gas price. That is why the average day peaks at 4-7 and dips at 7. In the 2025/2026 season the living-room air conditioner took 86.8% of its electricity in the cheap zone, and the estimated saving against gas alone is 970-1,450 zł (220-330 €). The model, prices and limits of that estimate are in the (Polish) article Ogrzewanie klimatyzacją w taryfie G12R.

Both automations need the same thing: a trustworthy measurement of the grid connection, counted the way the utility counts it.

Things to watch

  • Net the way your utility does. Feed the Energy dashboard with counters after netting, not the raw phase counters. Otherwise Home Assistant shows higher import and higher export than your bill.
  • Check the transformers at night. With no sun (and no home battery) every phase should show import or power close to zero. Negative power on one phase at night is almost always a reversed transformer or a mixed-up phase.
  • An unavailable meter is not zero. When the Shelly drops off the network for a moment, a template that defaults to 0 shows zero power, and a counter sum falls, which Home Assistant reads as a reset. My sum templates return no value when any phase is unavailable.
  • Watch for gaps in your sources. My inverter stopped reporting production for six weeks in winter. The Energy dashboard does not warn you: home consumption simply comes out lower.
  • A smart plug is not a laboratory meter. It is good enough for comparisons and decisions, not for arguing with the utility.

If you have solar and want to start with one thing, start with a meter on the grid connection. Plugs on appliances answer "what", but only a whole-house meter tells you how much and when, and every decision about tariffs, automation and a home battery depends on that.

01

Figures and denominators

How the figures above were taken. They are measurements from the data source named under the title, not figures from the ComparePV catalogue, and they do not change when the catalogue syncs.

Every figure comes from Home Assistant in the author's home in Poland, for 18 November 2025 - 17 November 2026 unless stated otherwise. Grid import and export after netting are the hourly increments of sensor.net_imported and sensor.net_exported from the Balance Neto integration, computed from the summed counters of the three Shelly 3EM phases. Solar production is the inverter's daily counter (sensor.solar_production_today). Home consumption = import + solar - export, hour by hour.

Three ways of counting import: (1) each phase's imported and exported energy counters on their own (channel_a/b/c_energy and _energy_returned), (2) the integral of the instantaneous sum of the three phase powers (sensor.grid_instant_power, samples every few seconds, 99.9% of the period covered, gaps over 5 minutes skipped), (3) the hourly net balance from Balance Neto. Counter increments above 50 kWh in an hour are treated as resets and skipped.

Solar production has a gap from 31 December 2025 to 12 February 2026 (the inverter did not report). Home consumption in that window is understated by the unrecorded production; December, the last full month before the gap, gave 25 kWh, so an estimated few tens and at most about 100 kWh are missing; the monthly chart leaves January and February solar empty. The G12R tariff's cheap hours are 13:00-16:00 and 22:00-07:00 every day, as in Energa's tariff. Cost per dishwasher cycle is the median energy of 325 cycles detected from the plug's power reading (above 5 W, ending after 10 minutes below), times the G12R zone price with variable charges and VAT (0.539 and 1.327 zł/kWh). Euro amounts use the NBP mid rate of 18 November 2026, 4.4089 zł per euro.

All 12 figures on this page and what each counts
FigureValueComputed over
Home consumption8,168 kWhimport + solar - export, 12 months
Solar production3,880 kWhinverter, 12 months (gap 31 Dec - 12 Feb)
Grid import after hourly netting5,199 kWhsensor.net_imported
Grid export after hourly netting911 kWhsensor.net_exported
Self-consumption76.5%(3,880 - 911) / 3,880 kWh
Consumption covered by own solar36.3%(3,880 - 911) / 8,168 kWh
Import from per-phase counters6,415 kWhphases A, B, C summed
Export from per-phase counters2,125 kWhphases A, B, C summed
Import from the instantaneous phase sum5,664 kWhintegral of sensor.grid_instant_power
Export from the instantaneous phase sum1,368 kWhintegral of sensor.grid_instant_power
Grid import in the cheap G12R hours63.5%5,199 kWh
Energy per dishwasher cycle (median)1.25 kWh325 cycles
03

Reference list