Has someone had success with getting access to the #sungrow API? I am not sure, but I think I already submitted a request months ago, but it doesn't show up in the dashboard at all. I just submitted another one.
@pv First part works: I can retrieve data from the API. I hoped for minute resolution, but 5 minutes is good enough.
p1 is yield today in Wh
p24 is active power in W
p27 is grid frequency in Hz
It only returns data for up to three hours per request. But I got my first line chart.
7 requests later, I got the data of a full day. 186 kWh in total. The chart is nice for the bot. More interesting is the raw data do do all kinds of experiments. For example calculating how various battery sizes would change self consumption.
Time to get to sleep.
What data do I need to simulate various battery sizes? The measures are in 5 minute intervals.
Total Active Power in W (Measuring Point ID p24) tells me how much energy was harvested at that moment. By dividing it by 12, I get the Wh. I could use Total Yield in Wh (p2) but then I need to subtract the data from the previous time frame.
Next I need to know how much energy the house used. I could look at the Meter Active Power in W (p8018) from the meter, which tells me how much energy flows to or from the grid. Divided by 12 to get Wh.
The difference is how much energy I could send or would need from the battery.
Because there are limits to how fast energy can be stored and returned, I probably should wait with the division until the end to not have to go back and forth multiple times.
The battery has a storage capacity in Wh and a charge/discharge limit in W.
Examples:
p24: 4.000 W
p8018: 2.000 W
-> house uses 6.000 W
Battery with 5.000 W discharge limit needs to provide 2000/12 Wh -> 167 Wh
p24: 4.000 W
p8018: -2.000 W
-> house uses 2.000 W
Battery could charge 2000/12 Wh -> 167 Wh
p24: 1.000 W
p8018: 7.000 W
-> house uses 8.000 W
Battery can only provide 5000/12 Wh -> 417 Wh
2000 W (167 Wh) have to be bought
Fields:
PV W, Meter W, House W, Battery W, Battery Wh, Grid W, Grid sold Wh, Grid bought Wh
I calculated how different battery sizes would influence our energy balance. Based on data from 2025. Charging limits and battery losses not taken into account.
25 MWh production from 28,8 kWp #pv
9 MWh load
Current setup with no battery
3,1 MWh from grid
20,3 MWh to grid
1 kWh battery: 0,5 MWh from battery
5 kWh battery: 1,6 MWh from battery
10 kWh battery: 1,9 MWh from battery
15 kWh battery: 2,0 MWh from battery
20 kWh battery: 2,1 MWh from battery
100 kWh battery: 2,4 MWh from battery
1000 kWh battery: 2,8 MWh from battery
5000 kWh battery: 2,8 MWh from battery
The optimal battery size based on that data would have been 7 kWh (256 cycles) to 10 kWh (194 cycles).
Over a lifespan of 10 years, a 7 kWh battery would save 3600 € (1794 kWh times 10 years times 0,2 € (current energy price 0,26 € - 0,6 € lost feed in earning)).
From a financial perspective, a battery still doesn't make sense to me in our situation. Maybe if the inverter needs replacing or if the heat pump changes our usage profile enough.
Visualization of the state of charge of a 7 kWh battery simulation. In January and February it the battery would have be empty most of the time. From March to October it would be more than half full most of the time.
Second and third diagram show only January and June.
Never got a confirmation, but my app passed review and I now have access to the API. Yay. Let's see, if I can use it to get @pv working again. #sungrow