sfirke / solaredge

Script(s) to extract SolarEdge data via the API
Mozilla Public License 2.0
1 stars 2 forks source link

Daylight saving time error when dowload a full year data #1

Open MaykThewessen opened 2 months ago

MaykThewessen commented 2 months ago

I get an error when downloading a whole year, due to summer time difference (DST) error

issue is that during DST switch, one hour gets data missing at DST reversal, two hour data points are overlapped, thus broken data again How to solve this? And download full year 15min power values?

How to get the full year data in one line?

instead of adding up days after each other

sfirke commented 2 months ago

I can't try it out right now, but I just had to deal with this same problem for data at my job -- hourly usage data from building electrical meters. I did some research and concluded that the generic best practice way to handle this was:

  1. For the two hours that occur twice, average them
  2. For the hour that never occurs, take the average of the preceding and following value

Now this time change happens at ~2am at least where I live. During that time the solar generation would be zero. Meaning that this method could be applied with no hit to precision of the data, unlike at say, a water plant that uses electricity 24/7.

Something should be added to the script to incorporate this check for data missingness/duplication.