
wminfo README.conky.weather.wmi


The conky.weather.wmi plugin displays the weather information taken from:

    http://weather.noaa.gov/

By default it displays the weather conditions for KNYC, EPWR, and YSSY
airports (these are the codes of New York, USA; Wroclaw, Poland; Sydney,
Australia). The appropriate commands for this codes are:

    conky.weather.wmi KNYC
    conky.weather.wmi EPWR
    conky.weather.wmi YSSY

or:

    wminfo -p 'conky.weather.wmi KNYC' -u 6
    wminfo -p 'conky.weather.wmi EPWR' -u 6
    wminfo -p 'conky.weather.wmi YSSY' -u 6

If you would like to display the weather conditions for the other location
you have to modify all WEATHER entries in conky configuration file --
~/.wminfo/conky.conf -- changing the ICAO code and then run the
conky.weather.wmi plugin using that code instead of KNYC, EPWR, or YSSY.

To find the four letters ICAO code go to the following site, select a state
or a country, and then select a location:

    http://weather.noaa.gov/

The conky.weather.wmi plugin displays the following information in the odd
steps:

    +---------+
    |EPWR 1630|
    |TMP: 4 C |
    |PRS: 1028|
    |HUM: 92% |
    |WND: 3   |
    +---------+

and the following information in the even steps:

    +---------+     +---------+
    |EPWR 1630|     |EPWR 1630|
    |WTH: RAIN|     |SKY: CLEA|
    |PRS: 1028| or: |PRS: 1028|
    |HUM: 92% |     |HUM: 92% |
    |WND: SE  |     |WND: SE  |
    +---------+     +---------+

The second and the last line differ in odd and even steps.  The consecutive
data mean:

* EPWR 1630  -- weather conditions for EPWR airport at 16:30 in local time;
* TMP: 4 C   -- temperature is 4 C;
* WTH: RAIN  -- weather conditions: displayed in the even steps;
* SKY: CLEAR -- sky conditions: displayed in the even steps when the weather
                  conditions are undefined;
* PRS: 1028  -- pressure is 1028 hPa;
* HUM: 92%   -- humidity is 92%;
* WND: 3     -- wind speed is 3 km/h;
* WND: SE    -- wind direction is a Southeast.

                                      *
                                    *   *

In order to change the weather monitor in conky.conf from EPWR (Wroclaw,
Poland) to UUDD (Moscow, Russia) it is necessary to replace all ``EPWR''
labels with ``UUDD'' ones.

The settings for Wroclaw, Poland look like:

    WEATHER: EPWR ; \
    TME="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EPWR last_update 30}" ; \
    TMP="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EPWR temperature 30}" ; \
    WTH="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EPWR weather 30}" ; \
    SKY="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EPWR cloud_cover 30}" ; \
    PRS="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EPWR pressure 30}" ; \
    HUM="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EPWR humidity 30}" ; \
    WDS="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EPWR wind_speed 30}" ; \
    WDD="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EPWR wind_dir 30}"

The valid setting for Moscow, Russia are:

    WEATHER: UUDD ; \
    TME="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ UUDD last_update 30}" ; \
    TMP="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ UUDD temperature 30}" ; \
    WTH="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ UUDD weather 30}" ; \
    SKY="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ UUDD cloud_cover 30}" ; \
    PRS="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ UUDD pressure 30}" ; \
    HUM="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ UUDD humidity 30}" ; \
    WDS="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ UUDD wind_speed 30}" ; \
    WDD="${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ UUDD wind_dir 30}"

                                      *
                                    *   *

The weather object of conky refreshes the information every 30 minutes.  If
you would like to force it to refresh the information at a given time,
reload the daemon.  To achieve that it is enough to use the command
wminfo-conky -r.  In order to synchronize the phases of conky.forecast.wmi
and conky.weather.wmi plugins it is enough to run the command counter -r. 
To automate these processes you may add to your crontab the following task:

    15,45 * * * * /usr/bin/wminfo-conky -r ; /usr/bin/counter -r

                                      *
                                    *   *

Some weather or cloud condition names are longer than four letters.  In such
a case you may scroll the line of the text to read the entire entry.

                                      *
                                    *   *

The weather.wmi and the conky.weather.wmi plugins use the common counter
file.  So do not run them at the same time or modify them in order to use
the separate counter files.

                                      *
                                    *   *

If you put a few weather monitors in the conky.conf file after a couple of
minutes or hours conky daemon will break without any error messages.  The
only method to avoid that is to run the crontab entry that monitors your
conky daemon and restarts it after the breakdown:

    */1 * * * * if [ "`ps aux | grep "$USER" | grep conky | grep -vE 'grep|wminfo'`" == "" ] ; then conky -c "$HOME/.wminfo/conky.conf" -d 2> "$HOME/.wminfo/conky.log"; fi

(You should define the above crontab entry as the user which uses
~/.wminfo/conky.conf file monitoring a few weather stations.  Do not put
that in the system-wide root crontab configuration because that cannot
help.)

