The weather in conky

Conky system monitor is a handy tool you can use to display various information about your system. Besides other useful data it can show weather conditions. Unfortunately, URI provided by conky manual page for $weather variable doesn’t work any longer.

But it is quite easy to fix that problem. Use this URI instead (it is listed in conky github wiki for versions 1.10.5 and later):
http://tgftp.nws.noaa.gov/data/observations/metar/stations/

For example, use this string in your conky configuration file to show the temperature:
${weather http://tgftp.nws.noaa.gov/data/observations/metar/stations/ zzzz temperature}
Change zzzz to the ICAO code of the airport nearest to your location (find it here or here). See man conky or conky github wiki for other weather data types.

5 Likes

Also:

How do I know which station to use?
Trying to read thru and bewildering trying to find for Portland,Or.

KHIO – Hillsboro Airport – Portland, Oregon
KPDX – Portland International Airport – Portland, Oregon
KTTD – Troutdale Airport – Portland, Oregon

2 Likes

Thanks for the info!

1 Like

Another way to show the weather is to use an external service. I saw a post on the forum about wttr.in and used it in my conky:

The line in my conky config:
${texeci 1800 curl -s wttr.in | sed -n '3,7{s/\d27\[[0-9;]*m//g;s/^..//;s/ *$//;p}'}

4 Likes

Forum kindly sponsored by Bytemark