If I didn’t messe-up things I had to remove it with 0.87.1 as it went away. I’ll check again.
Ah yes, there were some changes in 0.87 (names of the monitored_conditions were updated). You can find the most resent ones at https://www.home-assistant.io/components/sensor.solaredge/. Let me know how it goes!
Would be nice if the 10 minutes polling rate could be configured.
I use the API for other requests as well and I don’t want to exceed the 300 limit.
An even better solution would be to somehow specify it based on time of day as well.
Since there is no production during night, I’m not interested to get that frequent update then.
But during daytime I might want faster response.
Have no idea if it’s possible, but I think it would be quite useful.
Jumping in here as my panels get installed on Tuesday and should be live with solaredge by Friday! I’d love to help out if anyone needs an end user to test things. Can’t offer much in terms of coding.
Nice, enjoy! Testing the component and reporting any issues or suggestions for improvement would be great!
Hiya, like the idea and have been looking into this. I was thinking of adding an option to tie this to the sun_rise
and sun_set
events. However, on some days my panels also seem to generate power during twilight. Another option would be to set and check for solar elevation. All these options however would result in differences in data resolution throughout the year. Although this might not be an issues, there seemed to be quite a few factors which influence when to start/stop retrieving the data from SolarEdge (and that was before I started considering locations where the sun does not set at all during summer). Then there’s also the power flow sensors which will be added soon and give an overview of your power consumption, grid power and energy storage (if you have additional sensors). For these you do want day and night information.
I’ll give it some more thought and see if I can find some general solution (it’s possible I’m over complicating things - if I do, let me know).
With the next update the SolarEdge component will use a maximum of 4 different API requests (depending on the monitored_conditions
). If you monitor all possible conditions this will result in 292 API requests per day (every 10 minutes for site_overview and power_flow, and every 12 hours for site_details and site_equipment).
We could use dawn and dusk instead of sunrise and sunset to ensure all of the daylight hours are covered.
That should cover everyone, even in extreme locations where the sun has extremely long up/down times during parts of the year.
And then have an option like max_requests with which you can set the maximum number of request the component will do throughout the day?
I know we have a limited number of API requests, I output to PVOutput as well
So I’m guessing if I use this component, that will push it over the 300? limit
Hiya, according to PVOutput they update SolarEdge data every 15 minutes. The SolarEdge component (in its current state) updates every 10 minutes so you should be fine. However, some planned updates add additional monitored_conditions which will increase the number of API requests when used. Would it be possible to use the PVOutput component from HA in your case?
I’m not sure what my use case is yet
I connect data, I’m logging all data sent from the inveter to Solaredge into a mysql database as well (Doesnt capture usage) and have grafana graphs with my different orientations etc
Also have a rainforest eagle, and this might be more useful, as negative usage = cheap power(free) and could trigger turning on items maybe
So I’m sort of following this thread for now
I use both and haven’t hit the limit as far as I can tell.
Thank you GidoHakvoort GidoHakvoort for breaking this down but I’m still a little lost as to where I need to place this code or how. I’m new to Home Assistant and don’t have the assumed knowledge yet, so yeah total lost. Would you be able to offer a little more details on how to implement this solution please.
Hi @nixdat, you’re welcome and off course. Not sure how much information you need but the the steps for adding this component are roughly:
- Find your site_id
- Find your api_key
- Add the SolarEdge component to your Home Assistant configuration
- Restart Home Assistant
In order to find your site_id and api_key go to https://monitoring.solaredge.com and login with your account details. Go to the ‘Admin’ overview and click on ‘Site Access’. Here you will find a section ‘API Access’ with both your site_id and api_key. You can also generate a new key here. In case you have no account details or do not see the ‘Admin’ overview (it should be next to ‘Dashboard’ and ’ Layout’) contact your installer. Once you have the site_id and api_key, add the following lines to your configuration.yaml
file:
sensor:
- platform: solaredge
api_key: YOUR_API_KEY
site_id: YOUR_SITE_ID
After restarting Home Assistant you should see a new sensor: solaredge_current_power
. You can change the sensors by adding the property monitored_conditions and specify which conditions you would like to monitor. Have a look here for more information on what’s currently available. Hope this helps.
thank you GidoHakvoort for the information. I have taken a look at the provided link, found my API / Site ID and now have successfully added solar edge to my home assistance instant. What I’m still not clear on is where does the below code go. Is this apart of the configuration.yaml file or in a new file called input.yaml. I can add the sensor you have listed in your post on the 18th Feb but can’t work out how the code below fits in.
{“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}}}
Hopefully this makes senses if not please let me know and I will try and explain in a different way
thanks nick
Hi @nixdat, glad to hear it’s working. The code you’re referring to will be part of some updates to the SolarEdge component in the future (see here). I will post something here once it has been included in a new HA release!
Is there benefit to pulling the data from pvoutputs api? Their api call limit is 60 per hour at the free tier. Would keep some folks from hitting the Solaredge api limit? I’m not sure if pvoutput contains every datapoint solaredges api offers though. Been cranking out electric since Thursday here =)
@GidoHakvoort is there an easy way for hassio users that we can test out the code that pulls more specific data that hasn’t made its way to an official HA release yet?
Love that you’re in the process of using the new API endpoints solaredge published.
Turns out they’re also available right from the HD model inverters IP address if they’re connected to a home network, but pulling them into HA is way over my head, I can see them when I call the api from the command line though!
Hi @AndyRPH, you should be able to add custom components and use this to try the updated SolarEdge component. First make a custom_component
directory in your config
directory and add a subdirectory solaredge
. Then download the files from the repository (click on a file and select raw
for a direct link) and place them in the solaredge
folder. Next you can update your configuration file (have a look at the new conditions here) and restart HA. Let me know if it works!
Worked great! Now I just need the sun to come up tomorrow and generate some data. Thanks!!