☀️ Solar self-consumption on a three-phase system: Home Assistant for orchestration, Gladys for tracking real costs by zone

Hello everyone :waving_hand:

I’ve been wanting to share this setup for a while because it perfectly illustrates a choice I stand by: not wanting to do everything with a single tool. For me, Home Assistant and Gladys are not competitors, they are complementary — and it’s precisely this duo that makes the whole system both finely controllable and readable in terms of costs.

The context: a rural property with several buildings (house, professional building, PAC extension + machines, swimming pool, campsite, Tesla and Renault Spring charging stations…), a three-phase electrical installation, and solar production distributed per phase with a significant battery and micro-inverter park.

Needless to say, « out-of-the-box » dashboards quickly reach their limits. So, I broke the problem down into two parts:

  • Home Assistant → orchestration (the brain: battery management, curtailment, phase balancing, weather-based decisions, EV charging…)
  • Gladys → tracking real costs (the dashboard: how much each zone actually costs, and what the solar actually covers)

:magnifying_glass_tilted_right: In summary (the experience)

  • June (full month): ~2 MWh produced by solar, 87% of solar self-consumption, 63% of self-sufficiency, and a real EDF cost of €171.77 where my actual consumption « valued at the rate » amounted to €438. Solar + batteries absorbed the difference.
  • July (summer peak): we reach 95% of self-consumption, 85% of self-sufficiency and 100% of low-carbon electricity consumed.
  • The real comfort on a daily basis: knowing how much each zone costs and what the solar actually covers, item by item — and letting HA manage the battery orchestration alone.

1. The hardware: an out-of-the-box installation

A few peculiarities that explain the architecture:

  • Three-phase, with solar production and storage distributed across the 3 phases (L1 / L2 / L3), each phase being balanced independently then between them (cross-phase).
  • A Zendure SolarFlow park per phase: 800 Pro + 2400 Pro + 2400 AC (+ 800 solo modules), i.e. ~15.8 kWh of battery per phase, so ~47 kWh of storage in total across the three phases.
  • Beem micro-inverters (900 W + 1 kW) on the production side.
  • A total of 21 controlled devices, 7 per phase.
  • The whole system is optimized around a peak/off-peak rate (heures pleines / heures creuses).

With this kind of topology, the central question becomes: « who consumes what, and is it coming from the grid, solar or batteries? » — and that’s where the measurement network makes all the sense.


2. Why Gladys and Home Assistant?

The division of roles is very clear for me:

Role Why this tool?
Home Assistant Orchestration (automations / scripts) + energy balance Available Zendure and Beem integrations, fine control of the three-phase system and the 21 devices, very complete official energy dashboard
Gladys Tracking real costs vs actual consumption, per zone Clear and usable reading of the cost per building/usage, direct comparison « what I pay » vs « what I consume »

In other words: HA controls, Gladys sheds light on the bill. I tried to put everything in one or the other, but it’s this distribution that gives me the most value on a daily basis.


3. The backbone: the Shelly meters

None of this works without a clean measurement network. At my place:

  • 1 Shelly at the main panel (at the EDF meter level) → it gives the real EDF cost, i.e. what is actually drawn/billed at the delivery point.
  • 1 Shelly per downstream electrical panel, i.e. 7 panels → each measures the actual consumption of its zone, whatever the source (grid, solar or battery).

It’s this double level that allows the key comparison:

General (Shelly at the TGBT) = what I actually pay to EDF

Sum of the 7 panels = what I actually consume, valued at the rate

The difference between the two = what the solar + batteries cover.


4. Home Assistant side: orchestration (where it gets serious)

This is where all the complexity of the three-phase system lives. Rather than a handful of automations, I ended up building a real « home-made » regulation engine in HA.

A flow view per phase. The « Total Flow » dashboard shows, in real time, the distribution of solar / batteries / loads (Tesla, swimming pool, heat pump, professional building, extension, house) on each of the 3 phases:


21 controlled devices, 7 per phase. Each phase groups its Zendure SolarFlow (800 Pro / 2400 Pro / 2400 AC / 800 solo) and its Beem, managed as a « cluster »:

Weather-driven control. The engine calculates a production score (J0 morning/afternoon, J+1) from the forecasts, and makes concrete decisions: discharge or not the batteries during off-peak hours at night if the next day looks sunny, when to charge the Tesla (off-peak/peak), boost the Zendure → Tesla transfer, etc.:

Behind the scenes, this engine also manages cross-phase balancing, hierarchical PV curtailment and load/discharge distribution per device, with a dryrun → live mode to test without risk. I deliberately kept most of these « engine » views out of the post to avoid overwhelming everyone — I’ll go into detail in response if interested.

And the monthly balance, via the official HA energy dashboard. Network / solar / battery / house distribution, self-consumption, self-sufficiency, low-carbon share:

In June: solar production ~2 MWh, 87% self-consumption, 63% self-sufficiency, 99% low-carbon, net network import 708.95 kWh → €159.05.

And July then? The summer peak is here ^^ And the months of July / August seem to be off to a good start — 95% / 85% / 100%. I finished my installation + automations on June 25, 2026 so we still have beautiful days ahead of us ^^ And 9 panels left to install ^^


5. Gladys side: the cost tracking that makes all the difference

This is the heart of my experience on the « bill » side. The « Total Cost Tracking » dashboard puts side by side:

  • General → the real EDF cost (Shelly at the TGBT)
  • Total actual consumption → the sum of the 7 panels (i.e. everything that is actually consumed by the buildings)

June: General = €171.77 / 938 kWh · Total actual consumption = €438.03 / 2,277 kWh. The difference speaks for itself: on paper my consumption « would cost » ~€438, but I only paid ~€172 to EDF — the rest is covered by self-production.


And where Gladys really makes a difference for me: the detail per zone. Each building/usage has its own real cost card, which allows you to immediately see where the energy (and money) is going.

In June, for example: Personal building ~€171, Tesla charger ~€83, House ~€69, Swimming pool ~€40, Professional building ~€34, Campsite ~€21, PAC+Machines extension ~€20… You can then go down to the level of a specific usage — for example the Renault Spring charger, where you can clearly see the rhythm of the recharges:

:information_source: Honest clarification: Gladys’ « General » (Shelly in TGBT) measures the gross withdrawn at the delivery point, while the HA dashboard displays a net balance (import − injection). Therefore, the two are not supposed to give the same kWh — they answer two different questions. HA gives me the import/export accuracy of the total of each phase, Gladys gives me the actual amount recorded at the general meter of the 3 phases and therefore the actual billing!


6. Concrete Results

June (full month) July (partial month as of 08/07/2026)
Solar production ~1,995 kWh 612 kWh
Solar self-consumption 87 % 95 %
Self-sufficiency 63 % 85 %
Low-carbon electricity 99 % 100 %
Actual EDF cost (incl. subscription) 171.77 € 21.23 €
EDF cost excl. subscription 149.16 € 15.82 €
Actual consumption valued 438.03 € 101.89 €
Actual savings (excl. subscription) -288.87 € -86.07 €

Everyday comfort is being able to answer in 3 seconds: « Is the pool costing me a lot this month? », « How much has the Tesla charger actually drawn from the grid? », « Is my heat pump extension well covered by solar? » — while HA handles the orchestration of the 47 kWh of batteries alone.


7. Going Further

If anyone is interested, I can detail in the replies:

  • the breakdown of the 7 tables and the Shelly mesh (MQTT feedback),
  • the tariff configuration on Gladys’ side (HP/HC) and the logic of cost allocation by zone,
  • the V2 regulation engine on HA’s side: cross-phase balancing, hierarchical PV curtailment, load/unload distribution by device, dryrun/live mode,
  • the weather logic (J0/J+1 scoring) and Tesla HC/HP control,
  • my views of instantaneous consumption and settings by phase.

In short, it’s a real pleasure to have Gladys for the « real costs by zone » part: it’s readable, it’s clear, and it perfectly complements Home Assistant, which handles all the orchestration. :slightly_smiling_face: The more I can add/migrate to Gladys, the happier I’ll be ^^

Feel free to ask if you have any questions!

Wow, amazing electrical installation and even more impressed by the collection/automation of all this. Thanks for the detailed description and for the example of a beautiful HA Gladys collaboration :heart_eyes:
2MWh :flushed_face:

Super interesting, thanks for taking the time to write this ultra-detailed post, I loved reading it! :slightly_smiling_face:

This is a great demonstration that Home Assistant and Gladys can be totally complementary.

Quick question: for the Zendure and Beem integrations you use in Home Assistant, are these native integrations (in the HA core) or third-party integrations installed via their integration store?

And then, how do you send the data to Gladys?

PS: You produce more solar in 1 month than I consume in 1 year at my place :smiley:

What a job, well done!

Thank you so much! :blush: I’m an electrician by trade, so the part with the panels, three-phase distribution, and connections is a bit of my playground — it definitely helps and saved me a ton of time on the wiring.

However, the real challenge wasn’t the electrical work: it was the data collection and automation. I’m passionate about development (not a developer by trade), and to be transparent, AI helped me a lot with this — especially Claude (Opus 4.8) for the V2 of the regulator. The leap from V1 is huge: much more stable and refined on cross-phase balancing and curtailment.

Héhé yes… but ~2.5 MWh consumed in the same month ^^ And it’s summer: in December/January I’m at about 10× less. Also, these 2 MWh are usually full production until ~4 p.m., then once the batteries are full I voluntarily reduce the microinverters to avoid discharging/injecting into the grid — so the raw potential would even be a bit higher.

And since you mentioned the installation, here are a few photos to give an idea. The ground structure below represents only half of the planned field: the second half, identical, will come in its continuity. So, it will be 14 structures of 3 Zendure panels + 2 structures of 3 Beem panels + an old installation of 3×3 Beem 300W kits.






Sorry about the state of the panels… finishing touches in progress ^^

Note that:

  • The total solar material investment is €25,000
  • The structures and electrical material investment is €6,000
  • The pessimistic savings target is €4,000/year, the optimistic savings target is €6,500/year
  • The targeted return on investment is 5 years for the solar material and 6 years for the total investment.

Thanks to you, it means a lot coming from you! :slightly_smiling_face: That was exactly the goal: to make all this readable and inspiring.

Absolutely — and that was even the purpose of my request from about ~1 year ago on energy tracking, which you have since developed and released :raising_hands:. I can’t wait to exploit it more natively; in the meantime, this HA + Gladys setup already does the job very well. Exactly one year! And everything is in place!
Replacing HA with an automation system integrated into Gladys would now be a nice hope :wink: Functional in single-phase as well as three-phase, on simple as well as complex installations.

These are third-party integrations via HACS, not in the core.
On the Zendure side, it’s the official brand integration, available for a long time, and recognized by Zendure since the beginning of the year — and it’s really well done.

For this result, Gladys only needs the Shelly data today, which I send via Node-RED + MQTT: I redesign the message format in Node-RED to match the requirement before publishing.

The next step is to send Zendure via MQTT (the app has allowed this since the beginning of the year), but only for the sensor part — the management/control system is still too complex for me to include it in scenes.

Beem, on the other hand, already sends data to Gladys via Node-RED. Let’s say that for now I mainly use it on the HA side, because the energy view is easy to access and configure; for the moment in Gladys, you would still have to manually recreate all the totals and calculations.

:grinning_face_with_smiling_eyes: To give you an idea: my annual consumption was 32 MWh in 2024 and ~40 MWh in 2025 with the arrival of the Tesla. By the way, I completed my first full month (June) at €0 for charging for 444 kWh charged into the car :partying_face:

Thanks, Will_71! :folded_hands: It was indeed long and tedious: in the end, I spent far more time on programming than on designing/building the electrical installations and structures.

Could you tell me the total time spent on:

  • installation of panels + batteries
  • installation and configuration in HA + Gladys
  • configuration of the regulator

Unfortunately, I really couldn’t say… enormously ^^

  • calculation and forecasting before investment based on a first installation of 2.7kW with a 3-year return + choice → 10%
  • installation of panels + batteries (including electrical panels → 30% of total time
  • installation and configuration in HA + Gladys → 5%
  • configuration of the regulator → 55%

In cumulative man-hours between January 2025 and today (first order in May 2025 / second order in May 2026), I would say at least 1,000 to 1,500 hours.

But honestly, spread over a year and a half, with weekends of 12/16 hours a day spent on it (whether programming or physical installation), we lose a bit of the notion ^^

A quick recap of the price per kWh for the year as well:

Jan-26 Feb-26 Mar-26 Apr-26 May-26 Jun-26 Jul-26 Aug-26 Sep-26 Oct-26 Nov-26 Dec-26 2026
Avg. normal price /kWh €0.19 €0.18 €0.19 €0.19 €0.19 €0.19 €0.20 €0.19 €0.19 €0.19 €0.19 €0.19 €0.189
Avg. real price /kWh €0.17 €0.14 €0.11 €0.09 €0.11 €0.07 €0.03 €0.103
Avg. simulated price /kWh €0.13 €0.10 €0.06 €0.05 €0.06 €0.03 €0.03 €0.02 €0.03 €0.06 €0.10 €0.13 €0.066

The steps for this year have been:

Installation status in January 2026:

  • 16 kWc of solar panels installed
  • 28.8 kWh of batteries installed
  • 9.6 kW of maximum battery output power

Installation status as of June 24, 2026:

  • 19.5 kWc of solar panels installed (+22%)
  • 47.5 kWh of batteries installed (+65%)
  • 16.8 kW of maximum battery output power (+75%)

Planned installation status as of August 1, 2026:

  • 24 kWc of solar panels installed (+50% compared to January 2026)
  • 47.5 kWh of batteries installed (+65% compared to January 2026)
  • 16.8 kW of maximum battery output power (+75% compared to January 2026)

Incredible work @Terdious, great job :flexed_biceps::clap::star_struck:

And from what I see, at 2 cents per kWh, I’ll switch to you to charge my Tesla :sweat_smile:

A huge thank you for sharing and the time you spend explaining all this to us, and I won’t forget the devs either!