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
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