Skip to main content

SolarEdge smart home integration, free and open source

SolarEdge integration for Gladys Assistant

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

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

SolarEdge retired the V1 API on 3 November 2026. Since then the old API keys (those of the portal, Admin → Site Access → API Access) are refused and the 1.x versions of the integration receive nothing. Version 2 uses V2: you create a (free) SolarEdge developer account and connect the integration once. See "Upgrading from version 1.x" below.

This version was written from the official V2 documentation, without a real V2 account to test it: feedback welcome.

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
Total productionkWhLifetime counter since commissioning

Total production is the counter of the inverter (or of the production meter), read once a day, plus today's production.

The revenue today of the 1.x versions is gone: the V2 API does not provide it.

Production this month and this year are not features: the Solar production widget shows them. Gladys has no type for an energy that resets every month or every year, and the closest one is counted by Gladys as house consumption (see "Upgrading from version 1.1.0").

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
Import index*kWhEnergy bought from the grid since commissioning

* When the SolarEdge meter measures the imported energy.

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".

The "today" energies (consumption, self-consumption, imported, exported) are totals since midnight, published with Gladys's index today type: the Gladys energy module does not count them as consumption to bill.

The Gladys energy module​

The Gladys energy module (30-minute consumption and cost, energy dashboard, contract) reads an index: a counter that only goes up. The Import index is that index. It is the energy you buy from the grid, the one your supplier bills. Gladys adds "(consumption)" and "(cost)" to it and computes your billed consumption with your contract's rates. The house consumption is not used as an index: it includes the self-consumed solar, which costs you nothing.

The integration reads the import counter of the SolarEdge meter once a day and adds today's import to it: it moves at the pace of the refreshes, and never goes down.

If Gladys already has a Linky meter as its main meter, that meter measures the same energy: the Import index sits under it by default, and you can turn its history off if you do not want the duplicate.

A site without a SolarEdge meter (inverter alone) has no Import index: SolarEdge only knows its production.

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-1Charge level at 10 % or below
Stored energy*kWhEnergy actually available in the battery
Battery temperature*°CInternal temperature of the pack

* Only when the Detailed battery telemetry setting is enabled.

V2 no longer gives SolarEdge's "critical" flag (the live power flow is kept for paid developer plans): Battery low now flags a charge level of 10 % or below.

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, 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 (no decimals from 1000 kWh on; month, year and total come from the last SolarEdge reading), the PV power curve over the chosen period (24 hours, a week or a month) 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 at 10 % or below. 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 SolarEdge credit budget applies.

Setup​

You need Gladys 5.2 or later (the "Connect" button came with 5.2).

1. Create the SolarEdge developer account and application​

This is the path SolarEdge provides for homeowners ("Homeowner and Self-Access" guide of the SolarEdge documentation). It is free.

  1. Go to https://developer.solaredge.com/ and sign in with your mySolarEdge login (the site owner's). Fill in the developer profile: as company name, your own name will do (unaccented letters and digits only); industry "Other / Hobbyist", usage "Low - personal project". The Free plan is enabled right away: 2,000 credits a month.
  2. Click Create Application: a name ("Gladys", for instance), the Monitoring API service, then Site Access.
  3. In the OAuth configuration of the application:
    • Redirect URI: http://localhost:8080/oauth/callback (the address of SolarEdge's own guide for homeowners; nothing answers there, on purpose, see step 2);
    • Origin URL: leave it empty, or http://localhost:8080 if the field is mandatory;
    • scopes: SITE_DATA and DEVICE_DATA (without DEVICE_DATA, only the production is available).
  4. Copy the Client ID and the Client Secret. The secret is shown only once.
  5. Note your site ID: mySolarEdge app, site details, or the number in the address bar of the https://monitoring.solaredge.com/ portal.

Only the site owner can connect a site. If your login is not the owner, ask your installer to make you the owner (or use SolarEdge's site ownership transfer form).

2. Connect the integration​

  1. Open the Configuration tab of the integration in Gladys.
  2. Fill in the Client ID, the Client Secret and the Site ID, then save.
  3. Press Connect. The SolarEdge page opens: sign in with your mySolarEdge login, pick the site if you have several, then approve.
  4. The browser then stops on a page that does not load ("connection refused" or similar): that is expected. Copy the whole address of that page (it starts with http://localhost:8080/oauth/callback?code=), go back to Gladys, paste it into the Finish the connection action and run it. Do it within minutes: the code works once. The site ID is taken from that address, and the status turns to "connected".
  5. Press Test the connection: the message confirms the site name and the list of available devices.
  6. The devices show up in the Discovery tab, ready to be added.

Why the copy and paste: SolarEdge does not hand back the state parameter Gladys needs to find its way back to your instance on its own (its sign-in page does not forward it). The anti-forgery check is done another way: the integration only accepts the address of a connection started from your Gladys (the external_id value, which SolarEdge does send back).

The authorization renews itself every two hours. It only expires after 14 days without any refresh (Gladys stopped for two weeks, for instance): the connection status then says so: press Connect again, then Finish the connection.

Installers: with an installer account and a Fleet Access application, paste the Fleet API key in its field instead, without "Connect". The site ID can stay empty when the key covers a single site; otherwise List my sites gives the IDs.

3. The refresh rate​

The free plan gives 2,000 credits a month for the whole developer account, and every API call costs one. Once they are spent, SolarEdge refuses everything until the next billing cycle: the integration therefore never spends more than 1/31 of your Monthly credits a day (64 on the free plan), keeping a small reserve for your buttons.

One refresh costs:

  • 2 requests for a lone inverter (today's balance and the power);
  • 1 more with a meter (home and grid powers), unless that meter measures the production too;
  • 1 more with a battery, and 1 more again with Detailed battery telemetry (the temperature);
  • and every day, 2 or 3 requests for the month, the year, the total production and the Import index.

The integration stretches your Refresh interval on its own until it fits in that budget. On the free plan, expect a reading about every 50 minutes for a lone inverter, every 80 minutes with a meter, every 1 h 45 with a meter and a battery. The API usage button tells the interval actually used.

With a paid plan (Business Starter: 20,000 credits), fill in your Monthly credits: the interval comes down to the one you chose, 15 minutes at the shortest (the finest resolution of the API). If other applications use the same developer account, lower that setting accordingly.

Why do the devices say "every minute"? Gladys can only wake an integration up at predefined rates, the slowest being one minute. That wake-up is a mere heartbeat: it costs no request. The integration reads SolarEdge on its own and publishes the values itself; a Gladys heartbeat only gets the last cached reading.

Upgrading from version 1.x (V2 API)​

  1. Update Gladys to 5.2 or later if needed, then the integration.
  2. Follow "Setup" above: developer account, application, Connect. The old API key is no longer used (you can clear the field; left as is, it is ignored as soon as the application is filled in).
  3. Your devices and their history are kept: same IDs, same readings. If your site had a tariff, the Solar production device shows Update in the Discovery tab: clicking it deletes the Revenue today feature, which V2 no longer provides (with its history). Without a click, it just stays frozen.
  4. Revenue today also leaves the widgets, and the Revenue currency setting leaves the form.

Upgrading from version 1.2.0​

On a metered site, the SolarEdge — Grid device shows Update in the Discovery tab: click it to add the Import index. Nothing is deleted. On a site without a meter, nothing changes.

Upgrading from version 1.1.0​

Version 1.1.0 published production this month, production this year, energy imported and exported today (and the battery's stored energy) with a type Gladys 5.1 treats as a consumption meter. Gladys then added two features of its own to each, "… (consumption)" and "… (cost)": your production and the surplus you sell were counted as house consumption, and billed. On a site without a meter, 1.1.0 also created a Grid device stuck at 0 W and a Revenue today feature that never held a value.

Once the integration is updated:

  1. Open the integration's Discovery tab. Every affected device shows Update: click it, device by device. Gladys then applies the new list of features:
    • the features the integration no longer publishes (production this month, this year, revenue today without a tariff) are deleted, with their history;
    • the "(consumption)" and "(cost)" features Gladys had added are deleted, with their history: this is what removes the false consumption from your energy dashboards;
    • the features that only change type (today's energies, stored energy) stay the same features and keep their history.
  2. On a site without a consumption meter, the SolarEdge — Grid device is no longer offered at all (and the integration sends it nothing). Delete it from the integration's Devices tab: its "(consumption)" and "(cost)" features go with it.
  3. If a widget or a scene used a deleted feature, edit it: the SolarEdge widgets adapt on their own.

Until you click "Update", Gladys keeps the old types in its database and keeps computing a false consumption from the energy imported and exported today, which the integration still publishes.

Available actions​

  • Test the connection — checks the SolarEdge access, resolves the site and lists the devices your installation can feed.
  • List my sites — with a Fleet key, every site it covers with its ID; with "Connect", the authorized site.
  • Refresh now — reads SolarEdge right away, without waiting for the next cycle (within the same budget).
  • API usage — requests used today, the daily share of the monthly credits, the cost of one refresh and the interval actually used.

Troubleshooting​

"SolarEdge retired its V1 API" — the integration has no V2 application yet: follow "Setup".

"SolarEdge refused access" — check the Site ID (it must be the site you authorized), and that the application has the DEVICE_DATA scope. An old V1 API key left alone in the Fleet field ends up here too.

"SolarEdge access expired or was refused" — the Client Secret is wrong, or the authorization expired (14 days without a refresh) or was revoked: check the secret, save, then press Connect.

After approving, a Gladys page says it cannot redirect you — the SolarEdge application still has the redirect URI https://my.gladysassistant.com/redirect/oauth (advised by version 2.0.0): that page does not work with SolarEdge and wipes the code. Replace it with http://localhost:8080/oauth/callback in the SolarEdge developer console, then run Connect and Finish the connection again.

"Finish the connection" refuses the address — paste the whole address, right after approving; an address from an older connection, or from one started before the integration restarted, is refused: press Connect again.

The Consumption and Grid devices do not appear — your installation has no meter (a hardware option fitted by the installer), or the application lacks the DEVICE_DATA scope. The integration only creates a device for a value that is actually measured.

A reading stays empty while the others fill in — SolarEdge does not report it for your site. The integration never publishes 0 in place of a missing value: a 0 could not be told from a real zero. One exception, the produced power: a sleeping inverter (at night) sends nothing, and that is 0 W.

The values stop moving — the day's budget is spent (it resets at midnight UTC), or the month's credits are (they reset at the next billing cycle). API usage tells where you stand; an orange badge shows on the devices.

An "unreachable" badge on the devices — the SolarEdge cloud does not answer. The integration retries on its own; its logs (LOG_LEVEL=debug for the details) give the exact cause.

Privacy​

The integration only talks to monitoringapi.solaredge.com, read only. The Client Secret and the Fleet key are stored by Gladys as secrets, never sent back to the interface; the access tokens are kept by the integration in its configuration, outside the form. During "Connect", SolarEdge sends your browser to localhost, your own computer: the authorization code goes through no other server, and it is useless without the Client Secret. No data is sent anywhere else.

Configuration settings​

These are the settings SolarEdge asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Getting startedsectionNoSolarEdge retired its V1 API (and its API keys) on 3 November 2026. To read your installation: 1. sign in at developer.solaredge.com with your mySolarEdge login and create the free developer account; 2. create an application, service Monitoring API, access "Site Access", scopes SITE_DATA and DEVICE_DATA, Redirect URI http://localhost:8080/oauth/callback; 3. paste its Client ID and Client Secret, and your site ID, then save; 4. press "Connect" and approve with your mySolarEdge login; the browser then stops on a page that does not load: copy its whole address and paste it into "Finish the connection" below. The Free plan gives 2,000 requests a month: the refresh interval adapts to it.
Client IDstringNoClient ID of your "Site Access" application, in the SolarEdge developer console.
Client SecretsecretNoShown only once, when the application is created.
Site IDstringNoNumeric id of your site (mySolarEdge app, site details; or the address bar of the monitoring portal). Required with "Connect"; can stay empty with a Fleet API key covering a single site.
SolarEdge accessoauth2NoSolarEdge does not work with the redirect address Gladys shows under this button: declare http://localhost:8080/oauth/callback in your SolarEdge application instead. Save the fields above, connect with your mySolarEdge login (the site owner's), then finish with "Finish the connection" below. To be redone only if access expires (14 days without any refresh).
Fleet API key (installers)secretNoOnly for an installer account with a "Fleet Access" application, instead of "Connect". Old V1 API keys no longer work.
Refresh interval (s)numberNoWished interval between two readings. Stretched automatically to fit the monthly credits: about every 50 min for a lone inverter on the Free plan, more with a meter or a battery (see "API usage").
Monthly creditsnumberNoMonthly allowance of your SolarEdge developer account (2,000 on the Free plan, 20,000 on Business Starter). The integration spends at most 1/31 of it a day. Lower it if other applications share the account.
Detailed battery telemetrybooleanNoAdd the battery temperature. Costs one more request per refresh (so a longer interval), and only applies to sites with a battery.

How to install SolarEdge in Gladys​

  1. In Gladys, open Integrations: SolarEdge appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-solaredge:2.1.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/guim31/gladys-solaredge.

SolarEdge requires Gladys >=5.2.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

SolarEdge is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂