SolarEdge solar panels support

I did. Works for the other calls. And I do get a response: Empty []

same here,
you probably don’t have the piece of hardware required to be installed in or alongside the inverter for measuring the current power flow (by which i think is meant the own use of the delivered solar-power).

i read that from an attached modbus, and that gives me all current actual energy data, opposed to the limited api calls or jsonrest calls in the above setting.

Thanks. I do not have that extra module, but this is what I have settled instead. It gives me the same result as the solar-edge montoring site:

  - platform: jsonrest
    resource: !secret solarEdge_overview
    method: GET
    name: SolarEdge inverter
    scan_interval: 500

  - platform: template
    sensors:
      grid_today:
        friendly_name: "solar power today"
        value_template: '{{ (states.sensor.solaredge_inverter.attributes.overview.lastDayData.energy | float / 1000) | round(2) }}'
        unit_of_measurement: 'kWh'
      grid_now:
        friendly_name: "solar power now"
        value_template: '{{ (states.sensor.solaredge_inverter.attributes.overview.currentPower.power | float / 1000) | round(2) }}'
        unit_of_measurement: 'kW'

And i entered the siteid and api key in secrets.yaml file like this:

solarEdge_overview: https://monitoringapi.solaredge.com/site/<siteid>/overview.json?api_key=<apikey>

1 Like

HI,
yes i have that too, working fine.
Sometimes i get an over-quota error message, but can’t trace it for 100% certainty to the Solaredge.

DO you have any other sensors? there are many more options, but the ones i need most are with login credentials that wont be configured like above, and give unauthorized errors.
Most of all, i would like to have the separate Phase ( i have a 3 phase installation) sensors.

see below for a try to get that, maybe you can find the error, of make it work?

- platform: rest
  resource: !secret se_equipment_resource
  value_template: '{{ value_json.equipment.L1Data.activePower | float / 1000 |round(1) }}'
  name: 'SolarEdge L1 activePower'
  unit_of_measurement: 'Wh'
  scan_interval: 900

secrets:

se_equipment_resource: https://monitoringapi.solaredge.com/equipment/[siteid]/[serialnumber]/api_key=[apikey]

Check https://www.solaredge.com/sites/default/files/se_monitoring_api.pdf page 34

there is the full equipment overview, including all phases, but we can only read that with a date-range with a max span of one week in the url. like:

https://monitoringapi.solaredge.com/equipment/[site-id]/[serial-number]/data?startTime=2018-01-28%2011:00:00&endTime=2018-01-28%2013:00:00&api_key=[api-key]

the above works fine in a browser, and gives the full telemetry ea.

of course we can’t create a sensor with the hard coded date-range like this, so im looking for a way to have that created automatically and dynamically based on the current timestamp. Or maybe with an input selector?
Would you have suggestions doing so?
Ive asked the community template-wizards for help :wink: Dynamically create sensor based on current time?

Cheers,
Marius

Maybe you can help me here. Ive made another sensor for the Inventory.

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

i can’t get the separate attritbutes to show up though, i must be misplacing the various _ and . but think ive tried all combinations :wink:

{{states.sensor.solaredge_inventory.attributes.Inventory.inverters.name}}

Ive also tried it with a rest sensor, like my other sensors, but that too wont show the details, only the main sensor:

- platform: rest
  resource: !secret se_inventory_resource
  value_template: '{{ value_json.Inventory.inverters.name}}'
- platform: rest
  resource: !secret se_inventory_resource
  value_template: '{{ value_json.Inventory.inverters.SN}}'
- platform: rest
  resource: !secret se_inventory_resource
  value_template: '{{ value_json.Inventory.inverters.manufacturer}}'
- platform: rest
  resource: !secret se_inventory_resource
  value_template: '{{ value_json.Inventory.inverters.model}}'
- platform: rest
  resource: !secret se_inventory_resource
  value_template: '{{ value_json.Inventory.inverters.communicationMethod}}'
- platform: rest
  resource: !secret se_inventory_resource
  value_template: '{{ value_json.Inventory.inverters.connectedOptimizers}}'
- platform: rest
  resource: !secret se_inventory_resource
  value_template: '{{ value_json.Inventory.inverters.dsp1Version}}'
- platform: rest
  resource: !secret se_inventory_resource
  value_template: '{{ value_json.Inventory.inverters.dsp2Version}}'
- platform: rest
  resource: !secret se_inventory_resource
  value_template: '{{ value_json.Inventory.inverters.cpuVersion}}'

Please have a look would you?

Thanks,
Marius

check Can't get separate list items in a template

@VDRainer solved this for me, please use to your advantage!

Cheers,
Marius

1 Like

Thanks for all the work here guys.

You can of course also make a history graph on the home screen:

sensor:
  #- platform: yr
  - platform: jsonrest
    resource: https://monitoringapi.solaredge.com/site/SITESITESITE/overview.json?api_key=KEYKEYKEY
    method: GET
    name: SolarEdge inverter
    scan_interval: 400

  - platform: template
    sensors:
      grid_today:
        friendly_name: "Solar Power Today"
        value_template: '{{ (states.sensor.solaredge_inverter.attributes.overview.lastDayData.energy | float / 1000) | round(2) }}'
        unit_of_measurement: 'kWh'
      grid_now:
        friendly_name: "Solar Power Now"
        value_template: '{{ (states.sensor.solaredge_inverter.attributes.overview.currentPower.power | float / 1000) | round(2) }}'
        unit_of_measurement: 'kW'

# Solar graph
history_graph:
  gr1:
    name: Solar Graph
    entities:
      - sensor.grid_now
    hours_to_show: 24
    refresh: 60

It can’t seem to find my jsonrest file:

i placed it in: /home/ha/.homeassistant/custom_components/sensors

How did you do this, what parts do you used for this modulus-zwave-mqtt?

Seeing something interesting at openhab, maybe some leads to use modes over tcp

great link thanks.

i don’t read from the modbus, i read either directly from the solar edge Api, or have the values published via Mqtt (on my Hub that also reads the Modbus’s.)

heres a link on the Openhab forum about the Api:

if you want i can share my code on that, but i think it is several posts up in this thread already :wink:

+1 on standard component. I am using the REST Sensor, which processes the json as well now.

The entity graph as well as the history graph are showing gaps and not “connected steps” if you know what I mean. I figured out that by hovering over the data points in the graph, that some data points (10%) are shown as floats like 2534.36353476243 and the others are shown as integers (e.g. 2534). I can’t figure out why and think it is a bug.

First I tried only the REST Sensor, which looked like this:

- platform: rest
  name: SolarEdge
  scan_interval: 900
  json_attributes: 
    - overview
  value_template: '{{ value_json.overview.currentPower.power | int }}'
  unit_of_measurement: 'W'
  resource: !secret solaredgeportal

Then I added a template sensor, but exactly the same problem.

- platform: template
  sensors:
    solar_power_w:
      friendly_name: 'Solar Power W'
      value_template: '{{ states("sensor.solaredge") | int }}'
      unit_of_measurement: 'W'

32%20PM

Anyone else seeing this?

this is what I see:
json-rest senro
55

another graph showing the same info from my meters directly
09

maybe you can adjust your scan_interval settings?

Looks like you are having gaps as well.
Changing scan interval is not possible (rate limited rest service :frowning: and update frequency of solaredge power is 15mins anyway). Thanks for reply

Just a quick update.
I’m digging into modbus over tcp (yeah, that’s right!!) option available in my inverter; this should solve all the update time interval issues. Will post back with a detailed guide, as soon as I master the modbus power :wink:

thanks, I like that!

Looking forward to it!

Keen for this!

On the dutch website tweakers there is a topic on how to make your own monitoring portal for solaredge. I was wondering a similar setup is possible for the home assistant. I’m definitely lacking the the program skills to set this up.

The site is all in dutch, so I will give a short recap of the opening topic. The complete topic is a bit too long (~800 posts).
What the TS found out is that the first 2 day your solar edge inverter is connected to the internet, it communicates unencrypted with Solaredge server. Solare edge will send an encryption key to the inverter in this period. The good news is that this process can been intercepted. When you have this encryption key, you can use it to, the nice thing is that in this way you can gather more parameter as you can do by using the the API from Solar edge. You can for example also gather the temperature of the optimizers. As far as I understood this data is not supplied via the API or on the monitoring portal.

Now there is a catch to this off course. If you miss the encryption key there is no way you can listen in when the data is already encrypted. You can however perform a factory reset and start from scratch again, the downside is that all current data is lost as well. Or a 2nd option is to retrieve the key via a script + RS232 connection.

Here is the topic: https://gathering.tweakers.net/forum/list_messages/1721977

Since my programming skills are too limited to do something useful with this in home assistant, however I can help out translating stuff if needed.

After some digging I got this to work via the rest sensor (not using jsonrest):

  - platform: rest              
    name: solaredge_overview                                      
    scan_interval: 300          
    json_attributes:            
      - overview                                                     
    value_template: '{{ value_json.overview }}'
    resource: !secret solaredge_url            
  - platform: template                         
    sensors:                                                                         
      solaredge_currentpower:                  
        friendly_name: 'SolarEdge Current Power Production'
        value_template: '{{ states.sensor.solaredge_overview.attributes.overview.currentPower.power | float | round(2) }}'
        unit_of_measurement: 'W'                                                                                          
      solaredge_lastdayenergy:                                                                                            
        friendly_name: 'SolarEdge Last Day Energy Production'                                                             
        value_template: '{{ states.sensor.solaredge_overview.attributes.overview.lastDayData.energy | float | round(2) }}'
        unit_of_measurement: 'Wh'                                                                                         
      solaredge_lastmonthenergy:                                                                                          
        friendly_name: 'SolarEdge Last Month Energy Production'                                                           
        value_template: '{{ (states.sensor.solaredge_overview.attributes.overview.lastMonthData.energy | float / 1000) | round(2) }}'
        unit_of_measurement: 'kWh'                                                                                                   
      solaredge_lastyearenergy:                                                                                                      
        friendly_name: 'SolarEdge Last Year Energy Production'                                                                       
        value_template: '{{ (states.sensor.solaredge_overview.attributes.overview.lastYearData.energy | float / 1000) | round(2) }}' 
        unit_of_measurement: 'kWh'                                                                                                   
      solaredge_lifetimeenergy:                                                                                                      
        friendly_name: 'SolarEdge Life Energy Production'                                                                            
        value_template: '{{ (states.sensor.solaredge_overview.attributes.overview.lifeTimeData.energy | float / 1000) | round(2) }}' 
        unit_of_measurement: 'kWh'                            

The only thing I still want to do is add a sensor that calculates the Wh out of the current power - but I’m still pondering how that will work with HA.

2 Likes

any news about this? need help with testing?