Now I got it! The call to https://monitoringapi.solaredge.com/site/yourSiteID/currentPowerFlow.json?api_key=yourAPIkey does not return values in my account (Why??)… But this one: https://monitoringapi.solaredge.com/site/YOUR_SITE_CODE/overview.json?api_key=YOUR_API_KEY does return data. . No I will try to figure out the current power that is supplied.
How does this work? What kind of data did you store in the secrets file?
you have to enter your site id and api key.
read the whole thread and see the ways you can obtain these.
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>
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:
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 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
{{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
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
+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'
Anyone else seeing this?
this is what I see:
json-rest senro
another graph showing the same info from my meters directly
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 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
thanks, I like that!
Looking forward to it!
Keen for this!