Zum Hauptinhalt springen

SolarEdge Smart-Home-Integration, kostenlos und Open Source

SolarEdge-Integration für Gladys Assistant

Solar production, home consumption, grid exchanges and battery storage from SolarEdge.

Info

Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfügbar.

This integration connects your SolarEdge photovoltaic installation to Gladys Assistant. It reads the SolarEdge Monitoring API — the same service the mobile app uses — and creates up to four devices in Gladys: solar production, home consumption, grid exchanges and home battery.

No extra hardware is needed: everything goes through the SolarEdge cloud, read only. The integration never sends a command to your inverter.

What you get​

Which devices are created depends on what your installation can report: only sites fitted with a consumption meter (a SolarEdge Modbus meter) expose consumption and grid, and only sites with a battery expose the battery device. The integration detects all of this on its own at startup.

SolarEdge — Solar production​

Always created.

ReadingUnitDescription
Produced powerWInstantaneous output of the panels
Production todaykWhEnergy produced since midnight
Production this monthkWhEnergy produced since the start of the month
Production this yearkWhEnergy produced since the start of the year
Total productionkWhLifetime counter since commissioning
Revenue today*€ / $Revenue computed by SolarEdge from your tariff

* Only when you have entered a feed-in tariff in the SolarEdge portal (see "Revenue today" below). Without a tariff the feature is not created at all.

SolarEdge — Consumption​

Created when your installation has a consumption meter.

ReadingUnitDescription
Consumed powerWInstantaneous consumption of the house
Consumption todaykWhEnergy consumed since midnight
Self-consumption todaykWhShare covered by the panels and the battery

SolarEdge — Grid​

Created when your installation measures the grid exchanges.

ReadingUnitDescription
Grid powerWPositive when importing, negative when exporting
Imported todaykWhEnergy bought from the grid since midnight
Exported todaykWhSurplus sold since midnight

The sign of the grid power is what makes scenes interesting: "when grid power drops below −1000 W, start the water heater" means exactly "use the surplus instead of selling it".

SolarEdge — Battery​

Created when your site has storage (SolarEdge Energy Bank, LG RESU…).

ReadingUnitDescription
Charge level%Battery state of charge
Battery powerWPositive when charging, negative when discharging
Battery statetextCharging / discharging / idle / disabled
Battery low0-1The "critical" flag reported by SolarEdge
Stored energy*kWhEnergy actually available in the battery
Battery temperature*°CInternal temperature of the pack

* Only when the Detailed battery telemetry setting is enabled.

Dashboard widgets​

With Gladys 5.1 or newer, the integration offers three widgets (Edit dashboard → Add a widget). They are built from what the integration already holds in memory: showing a widget never costs a SolarEdge request, even with ten dashboards open. Tiles and charts are bound to the device features and update live as soon as a value is published; today's balance comes from the last SolarEdge reading, whose time is shown as "Updated at".

The devices must have been added from the Discovery tab: a tile bound to a feature Gladys does not have stays empty.

  • Energy flow — the installation at a glance. Up to four live tiles: production, consumption, grid (positive when importing, negative when exporting) and battery (positive when charging, negative when discharging), depending on what your site measures. A chart of the powers (production, consumption and grid) over the period chosen in the widget settings (24 hours or a week). Then today's balance: production, consumption, self-consumption, imported and exported energy, today's revenue (when a tariff is entered in the SolarEdge portal) and the battery level with its state. The Refresh button reads SolarEdge right away, like the Refresh now button of the configuration screen: it counts against the request budget, and once the day's budget is spent the widget says so instead of calling the API.
  • Solar production — production today, this month, this year and since commissioning as tiles, the PV power curve over the chosen period (24 hours, a week or a month), today's revenue when it exists and the time of the last reading.
  • Battery — the charge level gauge, the battery power, its state (Charging in green, Discharging in blue, Idle or Disabled in grey), the stored energy and the temperature when Detailed battery telemetry is enabled, and a red Battery low row when SolarEdge raises its critical flag. On a site without a battery the widget simply says so.

Widgets refresh every five minutes at most, and as soon as a new SolarEdge reading lands. The values therefore never move faster than your refresh interval: the same 300 requests/day budget applies.

Setup​

1. Get a SolarEdge API key​

The key is generated from the SolarEdge monitoring portal, with an account holding admin rights on the site:

  1. Sign in at https://monitoring.solaredge.com/.
  2. Open Admin → Site Access → API Access.
  3. Accept the terms of service, then click Generate a new key and Save.
  4. Copy the key (32 uppercase characters) and the site id shown on the same page.

If the "API Access" menu is not there, your account does not have the admin role on the installation: ask your installer for it.

2. Fill in the integration​

  1. Open the Configuration tab of the integration in Gladys.
  2. Paste your API key.
  3. Leave Site ID empty when your key covers a single site: it is detected automatically. Otherwise, press List my sites to find the id to enter.
  4. Save, then press Test the connection. The message shown under the button confirms the site name and the list of available devices.
  5. The devices appear in the Discovery tab, ready to be added.

3. Choose the refresh rate​

SolarEdge limits each API key to 300 requests per day and per site. Once the quota is spent, the API refuses everything until the next day — so the integration stops on its own before reaching it.

The budget reads as follows:

  • each refresh cycle costs 2 requests, whatever the number of devices created (they all share the same reading);
  • the daily breakdown (consumption, self-consumption, imported, exported) costs 1 request on its own, slower cadence;
  • the detailed battery telemetry, if you enable it, costs 1 more request at the daily-breakdown cadence.

With the default settings (15 min for live values, 30 min for the breakdown), the integration uses about 240 requests per day: it stays inside the budget with room to spare.

Lowering the interval to 5 minutes costs roughly 620 requests per day: the quota is reached around midday and the values freeze until tomorrow. The API usage button tells you where you stand at any moment.

Why do the devices say "every minute"? Gladys can only wake an integration at a fixed set of cadences, the slowest of which is one minute. That wake-up is just a tick: it costs no request. Your Refresh interval setting is what decides whether a tick actually reads SolarEdge or reuses the last cached reading.

Revenue today​

This one deserves an explanation, because it is easy to misread.

SolarEdge does not know your contract. The revenue it reports comes from a rate you enter yourself in the monitoring portal, under Admin → Revenue (you need account manager rights on the site). Two models are offered there: a flat rate per kWh, or a time-of-use rate.

Until that tariff is set, the API returns no revenue at all and the integration simply does not create the feature. That is deliberate: a feature that could never hold a value looks like a broken sensor, when it is really an unconfigured option. If you set the tariff later, run a scan from the Discovery tab and the feature appears.

Why the number misleads with self-consumption​

SolarEdge computes tariff × energy produced. Not × energy exported.

On an installation that self-consumes and sells the surplus, your production splits into two flows worth very different amounts:

  • the energy you consume on site saves you from buying from the grid, at your supply contract price;
  • the surplus is sold, at the feed-in tariff, usually much lower.

SolarEdge applies a single rate to the whole thing. Enter your feed-in tariff and the reported revenue is badly overstated; enter your purchase price and the savings are. The honest calculation would be (self-consumed kWh × avoided purchase price) + (exported kWh × feed-in tariff), which this field cannot express.

Our advice: only set the tariff if you know exactly what you want out of it, and remember the figure covers total production. A missing feature is more honest than a wrong number.

Available actions​

  • Test the connection — checks the key, resolves the site and lists the devices your installation can feed.
  • List my sites — shows every site the key gives access to, with its id, ready to copy into the matching setting.
  • Refresh now — reads SolarEdge immediately, without waiting for the next cycle.
  • API usage — how many requests were used today and how many refreshes are left.

Troubleshooting​

"SolarEdge refused the API key" — the key is invalid, has been regenerated, or does not grant access to this site. Generate a new one from the portal and paste it again (trailing spaces are stripped automatically).

"Site not found", or several sites — your key covers more than one installation: press List my sites and copy the id you want into the Site ID setting.

The Consumption and Grid devices do not show up — your installation has no consumption meter. This is a hardware option (a Modbus meter) fitted by the installer; without it, SolarEdge only knows about production.

One reading stays empty while the others fill in — SolarEdge does not report that one for your site. The integration never publishes 0 in place of a missing value: a 0 would be indistinguishable from a genuine zero and would skew your charts and your scenes. The usual causes are a Modbus meter that stopped communicating (imported and exported energy stay empty, while grid power may show a real 0 reported by the inverter), or a feed-in tariff that was never configured.

Revenue today is not in the list of readings — expected when no tariff is set in the SolarEdge portal: see "Revenue today" above. After entering the tariff, run a scan from the Discovery tab for the feature to appear.

Values stop moving in the afternoon — the daily quota is probably spent. Check with API usage and raise the refresh interval. An orange dot then appears on the devices to signal that the values are no longer refreshed.

An "unreachable" badge on the devices — the SolarEdge cloud is not answering. The integration retries automatically; the integration logs (LOG_LEVEL=debug for the full detail) show the exact cause.

Privacy​

The integration only talks to monitoringapi.solaredge.com, read only. Your API key is stored by Gladys as a secret and is never sent back to the frontend. No data is sent anywhere else.

Konfigurationseinstellungen​

Diese Einstellungen fragt SolarEdge in seinem Konfigurationsbildschirm in Gladys ab.

EinstellungTypPflichtfeldBeschreibung
Getting startedsectionNeinThis integration reads your installation through the SolarEdge Monitoring API. Generate an API key from the monitoring portal (Admin > Site Access > API Access), paste it below, then press "Test the connection". SolarEdge allows 300 requests per day and per site: the default refresh interval stays well within that budget.
API keysecretJaSolarEdge Monitoring API key, generated in Admin > Site Access > API Access.
Site IDstringNeinNumeric site id. Leave empty when the API key covers a single site: it is detected automatically. Use the "List my sites" button otherwise.
Refresh interval (s)numberNeinHow often the live values (power flow, production totals) are refreshed. Each cycle costs 2 SolarEdge requests out of the 300 allowed per day, whatever the number of devices.
Daily breakdown interval (s)numberNeinHow often the daily breakdown (consumption, self-consumption, imported, exported) is refreshed. Slower than the live values on purpose: it costs one more request per refresh.
Detailed battery telemetrybooleanNeinAdd the stored energy and the battery temperature, read from the storage endpoint. Costs one more request per daily-breakdown cycle, and only applies to sites with a battery.
Daily request budgetnumberNeinThe integration stops calling SolarEdge once this many requests have been made today, so the API key never gets throttled. SolarEdge's own limit is 300 per day and per site.
Revenue currencyselectNeinCurrency of the daily revenue reported by SolarEdge, as configured on your site.

So installierst du SolarEdge in Gladys​

  1. Öffne in Gladys Integrationen: SolarEdge erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
  2. Klicke auf Installieren. Gladys lädt das Docker-Image (ghcr.io/guim31/gladys-solaredge:1.1.0) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die Oberfläche der Integration (Geräte, Erkennung und Konfiguration).
  3. Öffne den Bildschirm Konfiguration der Integration, fülle die Einstellungen aus und speichere.
  4. Du kannst sie auch direkt über die URL ihres Repositorys installieren: https://github.com/guim31/gladys-solaredge.

SolarEdge benötigt Gladys >=5.1.0. Der Katalog in Gladys wird stündlich aktualisiert, eine neue Version ist also spätestens eine Stunde nach ihrer Veröffentlichung verfügbar.

Du nutzt Gladys noch nicht? Es ist kostenlos und Open Source: folge der Installationsanleitung, um loszulegen.

Über externe Integrationen​

SolarEdge ist eine externe Integration: eine Community-Integration, die als Docker-Container verpackt und auf GitHub veröffentlicht wird. Gladys installiert sie mit einem Klick und führt sie in einer vom Kern isolierten Sandbox aus. Sie wird von guim31 veröffentlicht und gepflegt, nicht vom Gladys-Kernteam.

Abonniere den Newsletter von Gladys Assistant

Ein paar E-Mails im Monat zu neuen Releases und Neuigkeiten aus dem Projekt. Verschickt von Pierre-Gilles Leymarie, dem Gründer des Projekts. Jederzeit abbestellbar 🙂