OpenWeather current data support in weewx-DWD

135 views
Skip to first unread message

Karen K

unread,
Aug 23, 2024, 11:06:34 AM8/23/24
to weewx-user
weewx-DWD provides an interface to various weather services. It uses their APIs to retrieve weather and forecast data for use in WeeWX.

OpenWeather is an UK based company that provides weather data based on calculations for every point on earth.

Now weewx-DWD was updated to support retrieving actual weather data from OpenWeather by their API. It includes additional observation types to the archive record. The observation types are named like the standard observation types of core WeeWX, but prepended by a configurable prefix. You can retrieve data for more than one location in parallel.

The configuration is simple. Specify latitude and longitude and the language, the text messages should be provided in. You need an API key which you get from OpenWeather for free. The configuration section in weewx.conf could look like this:

[WeatherServices]

    path = '.'

    [[current]]

        [[[FichtelbergOWM]]]

            provider = OpenWeather

            station = Fichtelberg

            latitude = 50.4283

            longitude = 12.9536

            lang = 'en'

            prefix = 'xyz'

            api_key = 'API key that you got from OpenWeather'


This would retrieve current weather data for mount Fichtelberg in Saxony. You can specify any other location around the world.

The prefix is set to 'xyz' here. This means, if you want to display the temperature you would write $current.xyzOutTemp in the skin template. $current.xyzIcon.raw provides an icon file name, and $current.xyzIcontitle.raw a text message describing the current weather.

As OpenWeather does not provide dewpoint, it is calculated within weewx-DWD using the WeeWX formula.

WeeWX uses a constant archive interval, but OpenWeather provides their data with a varying interval. Therefore, weewx-DWD stores the data it got from OpenWeather to a separate database. This database can be made available to WeeWX by configuring an appropriate binding. 

I see no use in putting downloaded data into LOOP packets here, as their data is updated at most once per 5 minutes.

There is an additional feature I could not test: If your station is mounted on a vehicle and its location is available in WeeWX by observation types called latitude and longitude, you can specify "station = mobile", and data is always retrieved for the current location of the station as defined by the observation types latitude and longitude. I am sure there is at least one person who wants to try this feature.

Karen K

unread,
Aug 25, 2024, 4:55:01 AM8/25/24
to weewx-user
Now there is a more detailed description of the interface including a list of observation types available at the OpenWeather wiki article.

Stefan Gliessmann

unread,
Aug 25, 2024, 1:05:57 PM8/25/24
to weewx-user
There is an additional feature I could not test: If your station is mounted on a vehicle and its location is available in WeeWX by observation types called latitude and longitude, you can specify "station = mobile", and data is always retrieved for the current location of the station as defined by the observation types latitude and longitude. I am sure there is at least one person who wants to try this feature.

... and that person is going to test this very soon :)
Reply all
Reply to author
Forward
0 new messages