SolarEdge solar panels support

no, I am not educated enough on the internals of HA, but d have a lot of user experience… :wink:
the Hue issue has been around for some time now (ever since it went asyncio) and many people suffer the Hue to go unavailable. Is seems that behavior has been seen as an indicator of things going wrong, as opposed to the Hue implementation itself being the issue.

That being said, Rest sensors tend to take their toll in the HA setup, at least in mine, and I try minimizing the use of them.

will reinstall again, take out the inventory (since it isn’t of much need in my setup) and see what happens.

btw, before I had this:

solaredge_inventory_name:
  friendly_name: Name
  value_template: '{{states.sensor.solaredge_inventory.attributes.Inventory.inverters[0].name}}'
solaredge_inventory_manufacturer:
  friendly_name: Mnf
  value_template: '{{states.sensor.solaredge_inventory.attributes.Inventory.inverters[0].manufacturer}}'
solaredge_inventory_model:
  friendly_name: Model
  value_template: '{{states.sensor.solaredge_inventory.attributes.Inventory.inverters[0].model}}'
solaredge_inventory_communication:
  friendly_name: Comm
  value_template: '{{states.sensor.solaredge_inventory.attributes.Inventory.inverters[0].communicationMethod}}'
solaredge_inventory_dsp1:
  friendly_name: Dsp1
  value_template: '{{states.sensor.solaredge_inventory.attributes.Inventory.inverters[0].dsp1Version}}'
solaredge_inventory_dsp2:
  friendly_name: Dsp2
  value_template: '{{states.sensor.solaredge_inventory.attributes.Inventory.inverters[0].dsp2Version}}'
solaredge_inventory_cpu:
  friendly_name: Cpu
  value_template: '{{states.sensor.solaredge_inventory.attributes.Inventory.inverters[0].cpuVersion}}'
solaredge_inventory_sn:
  friendly_name: Sn
  value_template: '{{states.sensor.solaredge_inventory.attributes.Inventory.inverters[0].SN}}'
solaredge_inventory_optimizers:
  friendly_name: Opt
  value_template: '{{states.sensor.solaredge_inventory.attributes.Inventory.inverters[0].connectedOptimizers}}'

and I don’t think your component returns these values? please have a look if we are talking about the same ‘Inventory’ api call?

Site-details would be cool too:

  solaredge_sitedetails_id:
    friendly_name: Id
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.id}}'
  solaredge_sitedetails_name:
    friendly_name: Name
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.name}}'
  solaredge_sitedetails_account_id:
    friendly_name: Account id
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.accountId}}'
  solaredge_sitedetails_status:
    friendly_name: Status
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.status}}'
  solaredge_sitedetails_peakpower:
    friendly_name: Peak power
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.peakPower}}'
  solaredge_sitedetails_lastupdatetime:
    friendly_name: Last update time
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.lastUpdateTime}}'
  solaredge_sitedetails_installationdate:
    friendly_name: Installation date
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.installationDate}}'
  solaredge_sitedetails_ptodate:
    friendly_name: Pto date
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.ptoDate}}'
  solaredge_sitedetails_type:
    friendly_name: Type
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.type}}'
  solaredge_sitedetails_country:
    friendly_name: Country
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.location.country}}'
  solaredge_sitedetails_city:
    friendly_name: City
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.location.city}}'
  solaredge_sitedetails_address:
    friendly_name: Address
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.location.address}}'
  solaredge_sitedetails_zip:
    friendly_name: Zip code
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.location.zip}}'
  solaredge_sitedetails_tz:
    friendly_name: Time zone
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.location.timeZone}}'
  solaredge_sitedetails_countrycode:
    friendly_name: Country code
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.location.countryCode}}'
  solaredge_sitedetails_manufacturer:
    friendly_name: Manufacturer
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.primaryModule.manufacturerName}}'
  solaredge_sitedetails_modelname:
    friendly_name: Model name
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.primaryModule.modelName}}'
  solaredge_sitedetails_maxpower:
    friendly_name: Maximum power
    value_template: '{{states.sensor.solaredge_site_details.attributes.details.primaryModule.maximumPower}}'
1 Like

@Mariusthvdb, I could try to add an additional timeout to the requests but I’m not sure that’ll help (plus this would be better in the library it’s using). Maybe try the current release (link) which does not have the site/inventory details. At least we can exclude if it has something to do with the latest version.

sure, will do later on, have to walk the dogs first. 10km per day (next to HA experimenting) keeps the doctor away ;=)

For this the component (at least the custom component I guess you added) is using something like https://monitoringapi.solaredge.com/site/[YOUR_SITE_ID]/inventory?api_key=[YOUR_API_KEY].
Since there can be more inverters I did not want to restrict to only one inverter as an sensor entity. Instead the sensor entity state for the inverters will show the number of inverters (1 in my case - see figure below).

All inverters (and their properties) are then available as an attribute. You can for example do something like this:

{{states.sensor.solaredge_inventory_inverters.attributes.inverters[0].name}}

With the new update this will be included and provides an overview like this:

Thanks, very helpful!

Anyone who also has a battery/storage?

{“siteCurrentPowerFlow”:{“updateRefreshRate”:3,“unit”:“kW”,“connections”:[{“from”:“LOAD”,“to”:“Grid”},{“from”:“PV”,“to”:“Load”}],“GRID”:{“status”:“Active”,“currentPower”:0.28},“LOAD”:{“status”:“Active”,“currentPower”:1.92},“PV”:{“status”:“Active”,“currentPower”:2.2}}}

Clipboard02

and reverse:
{“siteCurrentPowerFlow”:{“updateRefreshRate”:3,“unit”:“kW”,“connections”:[{“from”:“PV”,“to”:“Load”},{“from”:“GRID”,“to”:“Load”}],“GRID”:{“status”:“Active”,“currentPower”:0.94},“LOAD”:{“status”:“Active”,“currentPower”:3.13},“PV”:{“status”:“Active”,“currentPower”:2.19}}}

image

I think we all are seeking something like this:
image

and of course, other than accessing the application, I would like to ask to google home “how much power do I have left”… of course it is not instantaneous but it gives you an idea about how much you are loading and how much you have left :slight_smile:

this is what Used for Site details:

se_site_details_resource: https://monitoringapi.solaredge.com/site/ID/details?api_key=KEY

and:

  - platform: jsonrest
    resource: !secret se_site_details_resource
    method: GET
    name: SolarEdge Site Details
    scan_interval: 3600

the inventory was:

se_inventory_resource: https://monitoringapi.solaredge.com/site/ID/inventory?api_key=KEY

and

  - platform: jsonrest
    resource: !secret se_inventory_resource
    method: GET
    name: SolarEdge Inventory
    scan_interval: 3600

never thought about people having more than 1 inverter… so I have 1 going up to 7K and that would be rather a large installation, but I guess for sunnier countries, it would be easier to top that :wink: we are in the Low Countries.

believe @CCOSTAN might be able to help you out here? He has rather an impressive installation and Ha setup

Hiya, can confirm we’re talking about the same api calls to SE. I see you’re also only updating every few hours for the equipment and site details.

Moreover, I might have an idea about the SE/Hue issue. Once in a while the api call to SE takes a while and you’ll see a log message like this:

WARNING (MainThread) [homeassistant.helpers.entity] Update of sensor.solaredge_last_month_data is taking over 10 seconds

Some other components report similar warnings hence I never paid attention to it, plus HA seems to be handling the issue internally. However, I was thinking this might have an effect on the Hue component (which unfortunately I cannot test). Are you able to confirm whether the issues you are having arise after a similar warning?

Nice thank you, I think I have most cases now. Do you also have an example when no electricity is generated?

Of course:

`{"siteCurrentPowerFlow":{"updateRefreshRate":3,"unit":"kW","connections":[{"from":"GRID","to":"Load"}],"GRID":{"status":"Active","currentPower":0.78},"LOAD":{"status":"Active","currentPower":0.78},"PV":{"status":"Idle","currentPower":0.0}}}`

I think it’s really important to know current load to know how much juice left…

Hiya, based on the data from @divirg and @wmaker I have been working on adding the power flow to the SolarEdge component. I split the data into two groups, producers and consumers and assume that total consumer power - total producer power = 0. For the consumers and producers I’ve made the following new sensors.

Consumers

  • solaredge_power_consumption (i.e. LOAD)

Producers

  • solaredge_solar_power (i.e. PV)
  • solaredge_grid_power (i.e. GRID)
  • solaredge_storage_power (i.e. STORAGE)

The states of these sensors will contain the currentPower.

For the solaredge_power_consumption and the solaredge_solar_power sensors the states will always be a positive number (I assumed you cannot consume or produce a negative amount of energy).

For the solaredge_grid_power and solaredge_storage_power sensors this can be a positive or negative number. For solaredge_grid_power this shows the difference between importing and exporting energy and for solaredge_storage_power whether it’s discharging or charging.

For example, using the following input, will result in the image below.

{“siteCurrentPowerFlow”:{“updateRefreshRate”:3,“unit”:“kW”,“connections”:[{“from”:“LOAD”,“to”:“Grid”},{“from”:“PV”,“to”:“Load”}],“GRID”:{“status”:“Active”,“currentPower”:0.28},“LOAD”:{“status”:“Active”,“currentPower”:1.92},“PV”:{“status”:“Active”,“currentPower”:2.2}}}

Love to hear your feedback and once my other changes have been accepted I will include these as well.

2 Likes

Sounds good to me, if it helps I can grant access to my inverter API KEY.

Looks good to me too.

Hi @divirg, that’ll be great to properly test the new sensors. Could you send me the details in a private message?

Done. Let me know if you have got them.

Got it, thanks! Seems to be working with real-time data, will try to include it in the next HA update.

If you could, I would also add monthly production. Every PV system as a target monthly production and I use to ask Google Home how much we have produced this month. That would be great… At least for me :slight_smile: