SolarEdge solar panels support


#61

While I’m working on getting this working, anyone know of a way to only have this sensor update while the sun is above the horizon? Figure no need in making needless api requests at night.


#62

Thank you for your help with this I now have it pulling in the current solar production and I also put together a template to subtract the production - myusage so I can now see what my actual usage is. Thank you @Mariusthvdb for your help and guidance.


#63

I keep getting: ‘Could not render template SolarEdge Current Power Production, the state is unknown.’

My url is correct, I get a json response…

My config looks like:

   #Zonnepanelen
  - platform: rest
    name: solaredge_overview
    scan_interval: 300
    json_attributes:
      - overview
    value_template: '{{ value_json.overview }}'
    resource: https://monitoringapi.solaredge.com/site/407140/overview.json?api_key=XXXXXX

  - platform: template
    sensors:
      solaredge_overview_last_day:
        friendly_name: Last day
        value_template: '{{ (states.sensor.solaredge_overview.attributes.overview.lastDayData.energy | float / 1000) | round(1) }}'
        unit_of_measurement: 'kWh'
      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'

Any ideas?


#64

what happens when you enter:

‘{{ states.sensor.solaredge_overview.attributes.overview.currentPower.power | float | round(2) }}’

in the dev-tools template tester?


#65

Then I get:
Error rendering template: UndefinedError: ‘None’ has no attribute ‘attributes’


#66

which means your {{states.sensor.solaredge_overview}} has no attributes…

try to go down up to the position you get a state respons in the right side panel.

what gives: {{states.sensor.solaredge_overview.state}}

btw your lastdaydata sensor does result in a respons?


#67

This gives no result. And no, my lastdaysensor is also not working…

This is the response from my url:
{"overview":{"lastUpdateTime":"2018-06-07 09:45:25","lifeTimeData":{"energy":3683457.0,"revenue":247.4385},"lastYearData":{"energy":1133019.0},"lastMonthData":{"energy":68993.0},"lastDayData":{"energy":6479.0},"currentPower":{"power":2293.0},"measuredBy":"INVERTER"}}


#68

final try then:
{{states.sensor.solaredge_overview}}


#69

The result: ‘none’ :frowning:


#70

ok your sensor isnt called sensor.solaredge_overview then.

go to the states page in dev tools: <>

and enter solaredge, to see what is found in your installation


#71

I then only find:

  • solaredge_overview_last_day
  • solaredge_currentpower

#72

cool.

they must show state on that same page? could you screenshot that?


#73


#74

i figured as much:
your ‘mother’ Rest sensor isnt displayed, which means it isnt created. Hence you cant template any attributes from it.

soy have to look into the base configuration of the Rest sensor.

this is what i use(d)

- platform: jsonrest
  resource: !secret se_overview_resource
  method: GET
  name: SolarEdge Overview
  scan_interval: 3600

Note that i use the jsonrest version, which needed the json custom component installed (which is very easy since it only needed dropping the file in the CC folder )
But that might not be necessary any longer with newer Hassio versions.

check to see if you definition is fully compliant why the rest sensor definition on https://www.home-assistant.io/components/sensor.rest/

and your apikey is correct?
could try to take out the json_attributes there, that might not be necessary and prevents further templating? I never used it fwiw.

btw, your scan_interval is rather short, there’s a max api call set by SolarEdge, so you might want to take that up a bit.
I know thats not very useful for monitoring realtime sun power, but that’s what it is.
If you’r really after monitoring real time you could consider adding a modbus or having a hub readout the smart meter…

I use those and that works perfectly. Also, rest sensors tended to give may errors and connection issues. The reason I stopped using them ;-((


#75

Thnx for your help @Mariusthvdb! For now I will use pvoutput, can’t get the REST component to work.


#76

is this a new feature? i have been using the jsonrest custom component up to now, would this new functionality make that unnecessary then?

Havent seen any updated documentation or announcement on this, but would be very interested indeed.
Cheers,
Marius


#77

So I’ve received my solar panels today! :sun_with_face:
Including an Solar Edge HD Wave 5000 thingy…

I’ve chosen to take the path where I intercept the traffic from the SolarEdge to their platform.
So far that was pretty easy to do and now have all data I’d like (including data from each optimizer)

Next step, hooking it up to InfluxDB and MQTT.


#78

you might understand we’re very interested how you’ve managed to do that… care to share already, or will you keep us waiting for another magical add-on :wink:


#79

This would be an amazing add on!


#80

Is this through the RS485/RS232 interface? The way you worded it makes me think you did something like intercepting HTTP requests. I hope it’s not that (because they should be using TLS).