-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Add SolarEdge Modules docs #39361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tronikos
wants to merge
18
commits into
next
Choose a base branch
from
solaredge_modules
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add SolarEdge Modules docs #39361
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ec532db
Add SolarEdge Modules docs
tronikos b46ba0c
Update solaredge_modules.markdown
tronikos 1912d79
Update solaredge_modules.markdown
tronikos a72d43c
update
tronikos f079735
Update solaredge_modules.markdown
tronikos f592c06
Add examples
tronikos da25cd0
update
tronikos 9ef72bf
update
tronikos 1df74e4
update
tronikos d91ee0b
update
tronikos 04641b0
updateupdate
tronikos 6f46ee4
update
tronikos 1f76e67
update
tronikos 6a55075
fix
tronikos b8b373a
update
tronikos 972d672
update
tronikos 31e1a72
tweaks
c0ffeeca7 b4b056e
convert prereq inst list format
c0ffeeca7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,206 @@ | ||||||||
--- | ||||||||
title: SolarEdge Modules | ||||||||
description: Instructions on how to integrate SolarEdge Modules within Home Assistant. | ||||||||
ha_category: | ||||||||
- Energy | ||||||||
ha_release: '2025.7' | ||||||||
ha_iot_class: Cloud Polling | ||||||||
ha_config_flow: true | ||||||||
ha_domain: solaredge_modules | ||||||||
ha_dhcp: true | ||||||||
ha_codeowners: | ||||||||
- '@tronikos' | ||||||||
ha_integration_type: service | ||||||||
--- | ||||||||
|
||||||||
The **SolarEdge Modules** {% term integration %} allows you to retrieve energy production data per inverter, string, and module from your SolarEdge solar power setup and insert it into Home Assistant statistics. | ||||||||
|
||||||||
|
||||||||
You can find the created statistics under {% my developer_statistics title="**Developer tools** > **Statistics**" %}, searching for `solaredge_modules`. | ||||||||
|
||||||||
You can show them in the UI using the [`Statistic card`](/dashboards/statistic/) or [`Statistics graph card`](/dashboards/statistics-graph/). | ||||||||
You can use them in automations using the [`SQL`](/integrations/sql/) integration. | ||||||||
|
||||||||
The main use case is to track your solar production per module to identify any faulty module that underperforms and might need cleaning or repairing. | ||||||||
|
||||||||
## Prerequisites | ||||||||
|
||||||||
- To set up the integration, you need a username and password with access to the [SolarEdge web portal](https://monitoring.solaredge.com/). | ||||||||
- You also need the site ID, which you can get from the URL once you log in (for example, `1234` from `https://monitoring.solaredge.com/solaredge-web/p/site/1234/`). | ||||||||
|
||||||||
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
10000
|
||||||||
|
||||||||
{% include integrations/config_flow.md %} | ||||||||
|
||||||||
c0ffeeca7 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
## Data updates | ||||||||
|
||||||||
The integration fetches energy production for the past 7 days every 12 hours and inserts the data into statistics. | ||||||||
|
||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Would this be something that could be mentioned in the data updates section? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To me it feels more appropriate in the limitations section. |
||||||||
## Examples | ||||||||
|
||||||||
### Statistics graph | ||||||||
|
||||||||
An example of a Statistics graph that shows hourly production per module for the past 7 days. | ||||||||
|
||||||||
 | ||||||||
|
||||||||
{% note %} | ||||||||
The statistic IDs below are examples. It's recommended to use **SHOW VISUAL EDITOR** to select the statistics by name instead. | ||||||||
{% endnote %} | ||||||||
|
||||||||
```yaml | ||||||||
chart_type: line | ||||||||
period: hour | ||||||||
type: statistics-graph | ||||||||
entities: | ||||||||
- solaredge_modules:1234567_100000001 | ||||||||
- solaredge_modules:1234567_100000002 | ||||||||
- solaredge_modules:1234567_100000003 | ||||||||
- solaredge_modules:1234567_100000004 | ||||||||
stat_types: | ||||||||
- change | ||||||||
days_to_show: 7 | ||||||||
title: Hourly production per module on east side | ||||||||
``` | ||||||||
|
||||||||
Another example of a Statistics graph that shows daily production per module for the past 30 days. | ||||||||
It's easier here to identify any problematic modules. | ||||||||
|
||||||||
 | ||||||||
|
||||||||
```yaml | ||||||||
chart_type: line | ||||||||
period: day | ||||||||
type: statistics-graph | ||||||||
entities: | ||||||||
- solaredge_modules:1234567_100000001 | ||||||||
- solaredge_modules:1234567_100000002 | ||||||||
- solaredge_modules:1234567_100000003 | ||||||||
- solaredge_modules:1234567_100000004 | ||||||||
stat_types: | ||||||||
- change | ||||||||
title: Daily production per module on east side | ||||||||
days_to_show: 30 | ||||||||
``` | ||||||||
|
||||||||
### SQL | ||||||||
|
||||||||
To identify problematic modules, you could set up the [`SQL`](/integrations/sql/) integration with the following: | ||||||||
|
||||||||
{% note %} | ||||||||
The SQL code contains a couple of TODO items for you to adjust the threshold and to select the proper modules based on your solar installation. In the example, the panels on the east side contain "1.1." in their name while the ones on the west contain "1.2.". | ||||||||
{% endnote %} | ||||||||
|
||||||||
Name: SolarEdge low production modules (East) | ||||||||
|
||||||||
Column: `problematic_modules` | ||||||||
|
||||||||
Query: | ||||||||
|
||||||||
```sql | ||||||||
SELECT * FROM ( | ||||||||
WITH RelevantTimeRange AS ( | ||||||||
-- Define the start and end timestamps for "past 7 days, ignoring today" | ||||||||
-- start_ts is inclusive, end_ts is exclusive | ||||||||
SELECT | ||||||||
strftime('%s', date('now', 'localtime', 'start of day', '-7 days')) AS period_start_ts, | ||||||||
strftime('%s', date('now', 'localtime', 'start of day')) AS period_end_ts | ||||||||
), | ||||||||
ModuleProduction AS ( | ||||||||
-- Calculate total production for each module in the relevant time period | ||||||||
SELECT | ||||||||
sm.name, | ||||||||
SUM(s.state) AS total_production | ||||||||
FROM statistics s | ||||||||
JOIN statistics_meta sm ON s.metadata_id = sm.id | ||||||||
CROSS JOIN RelevantTimeRange rt | ||||||||
WHERE | ||||||||
sm.source = 'solaredge_modules' | ||||||||
-- TODO: Adjust this to match your setup | ||||||||
AND sm.name LIKE '% 1.1.%' | ||||||||
AND s.start_ts >= rt.period_start_ts | ||||||||
AND s.start_ts < rt.period_end_ts | ||||||||
AND s.state IS NOT NULL | ||||||||
GROUP BY | ||||||||
sm.name | ||||||||
), | ||||||||
AverageProduction AS ( | ||||||||
-- Calculate the average production across all modules that produced something | ||||||||
SELECT | ||||||||
AVG(mp.total_production) AS average_total_production | ||||||||
FROM ModuleProduction mp | ||||||||
WHERE total_production > 0 | ||||||||
) | ||||||||
SELECT | ||||||||
IFNULL( | ||||||||
GROUP_CONCAT( | ||||||||
mp.name || ' (' || printf("%.1f", (mp.total_production * 100.0 / ap.average_total_production)) || '%)', | ||||||||
', ' | ||||||||
), | ||||||||
'' | ||||||||
) AS problematic_modules | ||||||||
FROM | ||||||||
ModuleProduction mp, AverageProduction ap -- Implicit cross join, AP will have 1 row | ||||||||
WHERE | ||||||||
-- TODO: Adjust the 95% threshold if needed | ||||||||
mp.total_production < (0.95 * ap.average_total_production) | ||||||||
AND ap.average_total_production IS NOT NULL | ||||||||
AND ap.average_total_production > 0 -- Avoid division by zero if no production at all | ||||||||
) AS result | ||||||||
``` | ||||||||
|
||||||||
This will result in a sensor with state ,e.g., `SolarEdge 1.1.13 (94.7%), SolarEdge 1.1.14 (94.2%)` | ||||||||
|
||||||||
Because this SQL sensor will unnecessarily be updating every 30 seconds, in the [SQL integration entries page](https://my.home-assistant.io/redirect/integration/?domain=sql), select 3 dots, **System options**, uncheck **Enable polling for changes**, and select **UPDATE**. | ||||||||
|
||||||||
Finally, create an automation that updates the sensors and notifies you. Example: | ||||||||
|
||||||||
{% note %} | ||||||||
Update the SQL sensor entity IDs to match your setup. | ||||||||
{% endnote %} | ||||||||
|
||||||||
{% raw %} | ||||||||
```yaml | ||||||||
alias: "Notify: Low solar production modules" | ||||||||
triggers: | ||||||||
- trigger: time | ||||||||
at: "11:00:00" | ||||||||
conditions: [] | ||||||||
actions: | ||||||||
- action: homeassistant.update_entity | ||||||||
data: | ||||||||
entity_id: | ||||||||
- sensor.solaredge_low_production_modules_east | ||||||||
- sensor.solaredge_low_production_modules_west | ||||||||
- if: | ||||||||
- condition: template | ||||||||
value_template: |- | ||||||||
{{ states('sensor.solaredge_low_production_modules_east') != '' or | ||||||||
states('sensor.solaredge_low_production_modules_west') != '' }} | ||||||||
then: | ||||||||
- action: persistent_notification.create | ||||||||
data: | ||||||||
message: >- | ||||||||
East: {{ states('sensor.solaredge_low_production_modules_east') | | ||||||||
default('N/A') }} | ||||||||
|
||||||||
West: {{ states('sensor.solaredge_low_production_modules_west') | | ||||||||
default('N/A') }} | ||||||||
title: Low production detected on solar modules | ||||||||
notification_id: solaredge_modules_low_production_alert | ||||||||
mode: single | ||||||||
``` | ||||||||
{% endraw %} | ||||||||
|
||||||||
## Removing the integration | ||||||||
|
||||||||
{% include integrations/remove_device_service.md %} | ||||||||
|
||||||||
## Known limitations | ||||||||
|
||||||||
- The integration intentionally doesn't create any sensors. All data is only available in statistics. This is because data is often delayed by a couple of hours. | ||||||||
- The statistics are intentionally updated infrequently. If you want more frequent updates, you can call the [`homeassistant.reload_config_entry`](/integrations/homeassistant/#action-homeassistantreload_config_entry) action from an automation. | ||||||||
- The API provides data at a 15-minute interval, but Home Assistant long-term statistics are limited to a 1-hour interval. | ||||||||
|
||||||||
## Troubleshooting | ||||||||
|
||||||||
Make sure your account has access to the [SolarEdge web portal](https://monitoring.solaredge.com/) and that you can access the **Layout** tab there. If not, you will have to ask your installer to grant you access. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.