core
core copied to clipboard
Solaredge integration
The problem
The solar edge app seems to have changed how the data is named. The lifetime_energy as defined by HA is named lifeTimeData in the app. This is the data I get from the app "overview":{"lastUpdateTime":"2022-07-14 13:58:54","lifeTimeData":{"energy":1.0896296E7},"lastYearData":{"energy":1.0896725E7},"lastMonthData":{"energy":1281100.0},"lastDayData":{"energy":59001.0},"currentPower":{"power":15755.0},"measuredBy":"INVERTER"}} Has there been a change not caught by HA?
What version of Home Assistant Core has the issue?
core-2022-07-04
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Solaredge
Link to integration documentation on our website
https://www.home-assistant.io/integrations/solaredge/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
solaredge documentation solaredge source (message by IssueLinks)
Hey there @frenck, mind taking a look at this issue as it has been labeled with an integration (solaredge
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
I'm not seeing the issue you are trying to describe. Could you describe the issue this is causing?
Hi I get data from the solaredge api, but only the currentPower. The sensor.solaredge_lifetime_energy however, show up as unknown. When looking at the solaredge API, I notice that it is called lifeTimeData and not "lifetime_energy" as in the HA code. Anyway - I do not get the data for solar production.
For me solaredge API is working the same as before update - all normal.. maybe inverter has problem connecting to solaredge server? Do you see all info normal in solaredge app?
Have stopped working for me also as of today. I can see all the data in the solaredge app and on the website. Everything worked fine yesterday. Is there any logs or else I could assist with? Running 2022.7.5.
Nevermind my previous post, it has started working again this night. Probably an error at solaredge API side
I see all info on the solar edge app When I run https://monitoringapi.solaredge.com/site/YOUR_SITE_ID/overview.json?api_key=YOUR_API_KEY I get "{"overview":{"lastUpdateTime":"2022-07-22 09:48:57","lifeTimeData":{"energy":1.1430624E7},"lastYearData":{"energy":1.1431174E7},"lastMonthData":{"energy":1815549.0},"lastDayData":{"energy":14349.0},"currentPower":{"power":3559.0},"measuredBy":"INVERTER"}}" So as you can seeI get the data. In HA however, the only data received is currentPower. The lifeTimeData is shown as unknown, and I wonder if it has to do with the sensor being named solaredge_lifetime_energy rather than lifeTimeDATA.
erased my db and tried again. Do get production data but not the lifetime as I did previously. Also get lastyear/month now. But total production seems to be gone.
I have the same problem. I get current power but no life time energy. See screen shot below.
JSON response: {"overview":{"lastUpdateTime":"2022-07-25 12:00:12","lifeTimeData":{"energy":1685242.0,"revenue":2481.909},"lastYearData":{"energy":1685335.0},"lastMonthData":{"energy":1241580.0},"lastDayData":{"energy":3881.0},"currentPower":{"power":2585.086},"measuredBy":"INVERTER"}}
There is a version issue in the SolarEdge API, the response to the "Inverter Technical Data" ("equipment") query has a "Lifetime energy" and other fields only supported starting communication board version 2.474. I have not found what version I may have anywhere, but I do not get any of the new 2.474 data fields. I only have "totalEnergy" etc fields. Hence I think I may have an older communication board version. If that matters for the Overview query used by this SolarEdge integration. Could you guys with a working integration try the equipment query and see if you get the "Lifetime energy" field.
I think I found the problem. For some reason, SolarEdge reports lifeTimeData.energy smaller than lastYearData.energy. In my case 1685242W vs 1685335W. PRs #68048 and #69998 introduced a fix that requires energy values to be ordered lifeTime>lastYear>lastMonth>lastDay and this results in the behaviour we see in this report. Please @ulmerkott , can you take a look at this again. Thanks.
I don't really know if this makes any sense for this thread but i got an entity that is enabled, but "Unknown". The entity name is 'sensor.solaredge_lifetime_energy' and the api gives an answer "lifeTimeData":{"energy":7553831.0,"revenue":98218.375}, I don't know if the difference in the naming could be a problem. Should it be solaredge_lifetimedata_energy maybe??
I got the problem like @AndersHoglund too. My yearly production is slightly higher than lifetime production. All HA components up to date.
SE10K inverter, CommPanel version: 4.14.107
See active data here:
{"overview":{"lastUpdateTime":"2022-07-27 09:26:25","lifeTimeData":{"energy":7553831.0,"revenue":98218.375},"lastYearData":{"energy":7554124.0},"lastMonthData":{"energy":1309224.0},"lastDayData":{"energy":10748.0},"currentPower":{"power":5716.108},"measuredBy":"INVERTER"}}
@AndersHoglund You can check the Communication Panel version on the Solaredge monitoring site. Go to layout panel and select your inverter. In the toolbar az 'i' icon appears. Open it and there you can see your inverter data.
Yeah, I have "Kommunikationskort (CPU) Version 4.15.119". But that number does not look anything like the format of the version number in the API spec. But this is not the issue at hand. Neither is entity name format, there is an internal HA name and an SE API name format, as I have understood it. Problem is the lifeTime and lastYear values differs in the wrong way and being trapped by this piece of code:
# Sanity check the energy values. SolarEdge API sometimes report "lifetimedata" of zero,
# while values for last Year, Month and Day energy are still OK.
# See https://github.com/home-assistant/core/issues/59285 .
if set(energy_keys).issubset(self.data.keys()):
for index, key in enumerate(energy_keys, start=1):
# All coming values in list should be larger than the current value.
if any(self.data[k] > self.data[key] for k in energy_keys[index:]):
LOGGER.info(
"Ignoring invalid energy value %s for %s", self.data[key], key
)
self.data.pop(key)
I will try to make a case on SolarEdge support to fix the energy values.
Looks like the different value problem existed in other cases too but somehow the dev considered the problem done here: https://github.com/home-assistant/core/pull/69998
Yeah, seems we have two problems with the lifeTimeData.energy value in the SE API. Value of zero and value less than lastYearData.energy.
PR #68048 tried to fix the first and was later adjusted by #69998.
We need either a new variant of this validation, or revert the two above, to fix our problem.
Suggested fix:
if lifeTimeData.energy is less than lastYearData.energy, use lastYearData.energy else use lifeTimeData.energy
Or wait till 2023 when the problem will probably go away....
BTW: SE case no: 3312126
I am testing another integration, trying to avoid the problems with SolarEdge remote API. Instead using Solaredge MODBUS/TCP locally and the custom integration https://github.com/WillCodeForCats/solaredge-modbus-multi . There is also another alternative here: https://github.com/erikarenhill/solaredge-modbus-hass , not tested yet. At first, I could not get the Energy dashboard to accept the "Solaredge I1 AC Energy kWh" entity. Wrong icon, changed to the solar energy icon and now it all seems to work just fine.
BTW: SE case no: 3312126
Do you have a link? I would follow that thread. Thanks!
I am testing another integration ... using Solaredge MODBUS/TCP locally.
Does this eliminate the web telemetry? Or you need to set up the hotspot on the inverter only for the time of enabling modbus config?
@csomyy Not much happening with the SE-case, and I think it is private. Stale, not any problem for me any more.
MODBUS/TCP is enabled by accessing the VR local AP Web service. Access is then over the normal VR network connection you have, ethernet cable or WiFi. Direct local connection from VR to HA. No remote SE web service API involved anymore. No special hotspot needed either.
Instructions in the link above.
MODBUS/TCP Sadly i got no LAN connected on install of my system and the RJ45 socket is under the hood of my inverter. AND MODBUS/TCP is only available over cable and i'm not allowed to connect the cable because of the warranty. So no modbus for me. Waiting for the standard integration to get well, or for new years eve where lifetime and yearly yield values will move away from each other.
Final response on SE case no 3312126 received. Case closed.
The data for lifeTimeData.energy and lastYearData.energy are sampled at different times asynchronously and the values can differ in this way. Nothing to be done about it at the SE end. So the validation logic in the HA integration must be adjusted to deal with this in a better way than current attempt.
Or use the MODBUS/TCP interface instead, as I do.
Right now i got it working based on the online monitoring site. I'm using 'solaredge (Production Energy)' entity wich is a daily amount of energy. It works in the energy tab, however you cannot read out the total amounts. For me right now this is enough for the daily monitoring and data collection.
Hi all, I was just about to file an issue myself before I found that one.
I have the same problem that the display of the lifetime energy data just stopped working. In my case that's due to the lifeTimeData energy now being returned in scientific notation (1.234567E7) instead of regular Wh like all other energy values. Looks like that applies to all energy values beyond a certain threshold on the REST API (smart...) and this is not expected by the integration.
If you force the "energy" value from the REST API to float, it worked again for me. If someone else could test and confirm, I might raise a PR.
https://github.com/home-assistant/core/blob/8792d664e7b8e7fe6ddf65e1430f8cab17f22cca/homeassistant/components/solaredge/coordinator.py#L85
Change that line to
data = float(value["energy"])
and restart homeassistant
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.