jdemaeyer / brightsky

JSON API for DWD's open weather data.
https://brightsky.dev/
MIT License
287 stars 18 forks source link

SYNOP parsers may require support for 3-minute and 12-minute intervals #124

Closed firewiremb closed 1 year ago

firewiremb commented 2 years ago

As of today, numerous parameters are missing:

Example1: https://api.brightsky.dev/current_weather?lat=49.720409&lon=11.187324 Bildschirmfoto vom 2022-01-24 18-53-23

Example2: https://api.brightsky.dev/current_weather?lat=48.720409&lon=11.087324 Bildschirmfoto vom 2022-01-24 18-56-35

Example3: https://api.brightsky.dev/current_weather?lat=48.790409&lon=11.087324 Bildschirmfoto vom 2022-01-24 18-58-16

jdemaeyer commented 2 years ago

Hi @firewiremb, thanks for the report!

Example1: https://api.brightsky.dev/current_weather?lat=49.720409&lon=11.187324

Bright Sky should automatically fill the missing fields from the nearby Bamberg station (which has almost all fields) but it seems that this fallback mechanism somehow stopped working.

I'll look into why and get back to you!

jdemaeyer commented 2 years ago

It seems that SYNOP records switched away from "precipitation in the past 10 minutes" and to "precipitation in the past 12 minutes" and "precipitation in the past 3 minutes".

As we used the 10-minute field to calculate precipitation_10, precipitation_30, and precipitation_60 in the current_weather table, these are now null everywhere. This in turn makes our fallback mechanism fail because it looks for records where all missing fields are not null.

I will hotfix the fallback mechanism so that it ignores missing precipitation fields until this is sorted out.

jdemaeyer commented 2 years ago

I've pushed a new release containing aecae5aef7d9406b9b82d8374b7c48e3b4e1ab1a, which adds a work-around to the fallback mechanism so that it ignores missing precipitation fields.

current_weather should now look as before except that the precipitation_xx fields will always be empty. I will try to properly resolve this issue by adding support for the new SYNOP record format sometime this week.

Thanks again for the report @firewiremb! This somehow slipped through the cracks of our monitoring.

jdemaeyer commented 2 years ago

current_weather should now look as before except that the precipitation_xx fields will always be empty.

It seems that the SYNOP reports have reverted to reporting 10-minute precipitation, so current_weather should now also be returning precipitation fields.

firewiremb commented 2 years ago

Hello Jakob,

Since yesterday at 4:00 p.m. the problem has reappeared. For https://api.brightsky.dev/current_weather?lat=48.72&lon=11.08, "null" is returned for precipitation_xx, wind_gust_speed_xx, and sunshine_xx, respectively. Before the problem occurred, the fallback values for the Harburg station (id 11772) were returned for these values from the Neuburg station (id 11798).

Greetings firewire

jdemaeyer commented 2 years ago

Heyho @firewiremb,

thanks for the report. This apparent regression is actually an upstream issue with the DWD - their TLS certificate for the open data server expired yesterday around 16:02. This currently prevents Bright Sky from downloading any new weather records.

I've been mailing with them yesterday / this morning and they assured me they're working on it, so I expect this to be fixed sometime today. If they don't have a new certificate by this evening, I will hotfix Bright Sky to (temporarily) disable certificate checking, which should restore service.

jdemaeyer commented 2 years ago

Should be resolved now

firewiremb commented 2 years ago

I can confirm that. Thank you for the quick support

jdemaeyer commented 1 year ago

Closing as this seems to have been a transient issue