c5te1n / node-red-contrib-dwd-local-weather

Node Red node to retrieve local weather forecast from DWD (Germany)
Apache License 2.0
13 stars 11 forks source link

Wrong results for fields "ww" (this is most important MOSMIX element) and "W1W2" due to interpolation #34

Closed Mike-FUT closed 2 years ago

Mike-FUT commented 2 years ago

The fields "ww" and "W1W2" can't be used at the moment because they are interpolated based on the look-ahead hours.

Those fields are code fields so the numbers are no values and they rather have certain meanings. Interpolation breaks these because for example 45 means fog and there is no 44,5 or 44 or whatever. So these values must not be changed otherwise they won't work anymore. This is rather unfortunate because the most important field in the MOSMIX data is "ww" which is the actual weather forecast and that can't be used at the moment.

I'm afraid my programming skills outside .NET are very limited so I can't write a pull request to fix these two fields but I would appreciate if someone could have a look into it. Documentation for "ww" and "W1W2" can be found here: https://www.dwd.de/DE/leistungen/opendata/help/schluessel_datenformate/kml/mosmix_element_weather_xls.xlsx?__blob=publicationFile&v=3 There is no need to parse any of these in the code because that can be easily done in the change node. Only make sure these fields are not interpolated.

c5te1n commented 2 years ago

Hi Mike, luckily there is no need to add any code here. You can use the output modifiers < and > to get the last / next value for the selected time and it will automatically disable all interpolation. Please see documentation in the readme.