After having a rooftop solar array installed on my home in 2019, I wanted to analyze its actual performance and compare it to projections. In particular, we ended up with a smaller inverter (7kW) than recommended for our total panel capacity (11kW). We often experience some shading on our panels, so the inverter should not limit (or “clip”) the energy production too greatly – but I want to quantify the extent of the clipping effect.
That analysis is for later, though. Here is how I first retrieved the production data for my system from the SolarEdge API, in fifteen-minute intervals. It pulls data for both energy (watt-hours generated) and power (power production, in watts). I think the power is average power over that 15 minute period, though I don’t see that documented and it doesn’t line up exactly with energy generation. I’m a Python beginner and relied on my brother, who kindly wrote almost all of this code.
Setup: you’ll need your SolarEdge API key, which you can get by following their instructions (pp. 5-6). You’ll also need to install the solaredge Python package (and Python itself, if you haven’t used it before). In addition to an API key, the script below refers to a site ID. You can find that in the mySolarEdge app, under information about your site, or via the results of a query to the API.