Wiki

Clone wiki

weewx-wd / Users Guide

Index

About weewx-WD

weewx-WD is a weewx extension that generates the data files used by Weather Display Live, SteelSeries Gauges, Carter Lake/Saratoga weather website templates and the Pocket PWS Android weather app.

weewx-WD consists of a number of weewx services, Search List Extensions (SLE) and skins that produce the following data files:

clientraw.txt, clientrawextra.txt, clientrawdaily.txt, clientrawhour.txt, customclientraw.txt, testtags.php, daywindrose.png and weewx_pws.xml

As of v1.0.0, weewx-WD utilises a separate database to record a number of addition observations not normally recorded by weewx. This database is known as the weewx-WD database.

Installing weewx-WD

Installing with the wee_extension utility

Note: In the following code snippets the symbolic name $DOWNLOAD_ROOT is the path to the directory containing the downloaded Weewx-WD extension.

  1. Download the weewx-WD extension from the weewx-WD Bitbucket downloads site into a directory accessible from the weewx machine.

    wget -P $DOWNLOAD_ROOT https://bitbucket.org/ozgreg/weewx-wd/downloads/weewxwd-1.0.3.tar.gz
    

    where $DOWNLOAD_ROOT is the path to the directory where the weewx-WD extension is to be downloaded.

  2. Stop weewx:

    sudo /etc/init.d/weewx stop
    

    or

    sudo service weewx stop
    
  3. Install the weewx-WD extension downloaded at step 1 using the weewx wee_extension utility:

    wee_extension --install=$DOWNLOAD_ROOT/weewxwd-1.0.3.tar.gz
    

    this will result in output similar to the following:

    Request to install '/var/tmp/weewxwd-1.0.3.tar.gz'
    Extracting from tar archive /var/tmp/weewxwd-1.0.3.tar.gz
    Saving installer file to /home/weewx/bin/user/installer/weewx-WD
    Saved configuration dictionary. Backup copy at /home/weewx/weewx.conf.20161027130000
    Finished installing extension '/var/tmp/weewxwd-1.0.3.tar.gz'
    
  4. Start weewx:

    sudo /etc/init.d/weewx start
    

    or

    sudo service weewx start
    

Manual installation

  1. Download the weewx-WD extension from the weewx-WD Bitbucket downloads site into a directory accessible from the weewx machine.

    wget -P $DOWNLOAD_ROOT https://bitbucket.org/ozgreg/weewx-wd/downloads/weewxwd-1.0.3.tar.gz
    

    where $DOWNLOAD_ROOT is the path to the directory where the weewx-WD extension is to be downloaded.

  2. Unpack the extension as follows:

    tar xvfz weewxwd-1.0.3.tar.gz
    
  3. Copy files from within the resulting folder as follows:

    cp weewxwd/bin/user/*.py $BIN_ROOT/user
    cp weewxwd/bin/user/wd_database $BIN_ROOT/user
    cp -R weewxwd/skins/Clientraw $SKIN_ROOT
    cp -R weewxwd/skins/Testtags $SKIN_ROOT
    cp -R weewxwd/skins/SteelGauges $SKIN_ROOT
    cp -R weewxwd/skins/PWS $SKIN_ROOT
    cp -R weewxwd/skins/StackedWindRose $SKIN_ROOT
    

    replacing the symbolic names $BIN_ROOT and $SKIN_ROOT with the nominal locations for your installation.

  4. Edit weewx.conf

    vi weewx.conf
    
  5. In weewx.conf, modify the [StdReport] section by adding the following sub-sections:

    [[wdTesttags]]
        HTML_ROOT = public_html/WD
        skin = Testtags
    
    [[wdPWS]]
        HTML_ROOT = public_html/WD
        skin = PWS
    
    [[wdClientraw]]
        HTML_ROOT = public_html/WD
        skin = Clientraw
    
    [[wdStackedWindRose]]
        HTML_ROOT = public_html/WD
        skin = StackedWindRose
    
    [[wdSteelGauges]]
        HTML_ROOT = public_html/WD
        skin = SteelGauges
    
  6. In weewx.conf, add the following section:

    [Weewx-WD]
        data_binding = wd_binding
    
  7. In weewx.conf, add the following sub-section to [Databases]

    [[weewxwd_sqlite]]
        driver = weedb.sqlite
        database_name = archive/weewxwd.sdb
        root = /home/weewx/
    

    if using MySQL instead, add something like (with settings for your MySQL setup):

    [[weewxwd_mysql]]
        host = localhost
        user = weewx
        password = weewx
        database_name = weewxwd
        driver = weedb.mysql
    
  8. In weewx.conf, add the following sub-section to the [DataBindings] section:

    [[wd_binding]]
        manager = weewx.manager.DaySummaryManager
        schema = user.weewxwd3.schema
        table_name = archive
        database = weewxwd_sqlite
    

    if using MySQL instead, add something like (with settings for your MySQL setup):

    [[wd_binding]]
        manager = weewx.manager.DaySummaryManager
        schema = user.weewxwd3.schema
        table_name = archive
        database = weewxwd_mysql
    
  9. In weewx.conf, modify the services lists in [Engine] as indicated:

    • process_services. Add user.weewxwd3.WdWXCalculate eg:

      process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, weewx.engine.StdQC, weewx.wxservices.StdWXCalculate, user.weewxwd3.WdWXCalculate

    • archive_services. Add user.weewxwd3.WdArchive eg:

      archive_services = weewx.engine.StdArchive, user.weewxwd3.WdArchive

  10. Start weewx:

    sudo /etc/init.d/weewx start
    

    or

    sudo service weewx start
    

Configuring weewx-WD

Changing the units of measure

By default weewx-WD uses metric units (mm, m, km, hPa and C) and 'd/m/y' date formats in customclientraw.txt, testtags.php, daywindrose.png and weewx_pws.xml.

To change the units:

  1. Edit weewx.conf:

    vi weewx.conf
    
  2. Locate the [StdReport] section.

  3. Add the following settings under the respective [[wdXxxxxx]] sub-sections as required:

    [[wdTesttags]]
        # wdTesttags uses the 'Testtags' skin to produce testtags.php with
        # 'metric' units (mm, m, km, hPa, C) and d/m/y date formats. These
        # units and formats can be overridden in the 'Groups' and
        # 'TimeFormats' sections below by uncommenting/altering one or more of
        # the settings. Whilst Weewx may support a wider range of units the
        # Saratoga templates only support a subset of these units as listed
        # against each setting.
        [[[Units]]]
             [[[[Groups]]]]
                group_altitude     = foot           # Options are 'foot' or 'meter'
                group_degree_day   = degree_F_day   # Options are 'degree_F_day' or 'degree_C_day'
                group_pressure     = inHg           # Options are 'inHg', 'mbar' or 'hPa'
                group_rain         = inch           # Options are 'inch' or 'mm'
                group_rainrate     = inch_per_hour  # Options are 'inch_per_hour' or 'mm_per_hour'
                group_speed        = mile_per_hour  # Options are 'mile_per_hour', 'km_per_hour', 'knot', or 'meter_per_second'
                group_speed2       = mile_per_hour2 # Options are 'mile_per_hour2', 'km_per_hour2', 'knot2', or 'meter_per_second2'
                group_temperature  = degree_F       # Options are 'degree_F' or 'degree_C'
            [[[[TimeFormats]]]]
                date_f         = %m/%d/%Y           # Options are '%m/%d/%Y' or '%d/%m/%Y'
                date_time_f    = %m/%d/%Y %H:%M     # Options are '%m/%d/%Y %H:%M' or '%d/%m/%Y %H:%M'
    
    [[wdPWS]]
        # wdPWS uses the 'PWS' skin to produce weewx_pws.xml with 'metric'
        # units (mm, m, km, hPa, C). These units can be overridden in the
        # 'Groups' section below by uncommenting/altering one or more of the
        # settings.
        [[[Units]]]
            [[[[Groups]]]]
                group_pressure     = inHg           # Options are 'inHg', 'mmHg', 'mbar', or 'hPa'
                group_rain         = inch           # Options are 'inch', 'cm', or 'mm'
                group_rainrate     = inch_per_hour  # Options are 'inch_per_hour', 'cm_per_hour', or 'mm_per_hour'
                group_speed        = mile_per_hour  # Options are 'mile_per_hour', 'km_per_hour', 'knot', or 'meter_per_second'
                group_speed2       = mile_per_hour2 # Options are 'mile_per_hour2', 'km_per_hour2', 'knot2', or 'meter_per_second2'
                group_temperature  = degree_F       # Options are 'degree_F' or 'degree_C'
    
    [[wdStackedWindRose]]
        # wdStackedWindRose uses the 'StackedWindRose' skin to produce a
        # windrose image file daywindrose.png with 'metric' units (km) and
        # d/m/y date formats. These units and formats can be overridden in the
        # 'Groups' and 'TimeFormats' sections below by uncommenting/altering
        # one or more of the settings.
        [[[Units]]]
            [[[[Groups]]]]
                group_speed        = mile_per_hour  # Options are 'mile_per_hour', 'km_per_hour', 'knot', or 'meter_per_second'
                group_speed2       = mile_per_hour2 # Options are 'mile_per_hour2', 'km_per_hour2', 'knot2', or 'meter_per_second2'
            [[[[TimeFormats]]]]
                date_f         = %m/%d/%Y           # Options are '%m/%d/%Y' or '%d/%m/%Y'
                date_time_f    = %m/%d/%Y %H:%M     # Options are '%m/%d/%Y %H:%M' or '%d/%m/%Y %H:%M'
    
    [[wdSteelGauges]]
        # wdSteelGauges uses the 'SteelGauges' skin to produce
        # customclientraw.txt with 'metric' units (mm, m, km, hPa, C). These
        # units can be overridden in the 'Groups' section below by
        # uncommenting/altering one or more of the settings. Whilst Weewx may
        # support a wider range of units the Saratoga templates only support a
        # subset of these units as listed against each setting.
        [[[Units]]]
            [[[[Groups]]]]
                group_pressure     = inHg           # Options are 'inHg', 'mbar' or 'hPa'
                group_rain         = inch           # Options are 'inch' or 'mm'
                group_rainrate     = inch_per_hour  # Options are 'inch_per_hour' or 'mm_per_hour'
                group_speed        = mile_per_hour  # Options are 'mile_per_hour', 'km_per_hour', 'knot', or 'meter_per_second'
                group_speed2       = mile_per_hour2 # Options are 'mile_per_hour2', 'km_per_hour2', 'knot2', or 'meter_per_second2'
                group_temperature  = degree_F       # Options are 'degree_F' or 'degree_C'
    

    The above settings would be suitable for US customary units. Note that whilst weewx offers a wide variety of different units, only a subset of the available units may be used in the testtags.php and customclientraw.txt files.

    The clientraw series of files (clientraw.txt, clientrawextra.txt, clientrawdaily.txt and clientrawhour.txt) use fixed units that should not be changed.

  4. Reload the weewx configuration file:

    sudo /etc/init.d/weewx reload
    

    or

    sudo service weewx reload
    

Changing the location of generated files

By default weewx-WD places the generated files in the $HTML_ROOT/WD folder. If you wish to place the generated files in another directory:

  1. Edit weewx.conf:

    vi weewx.conf
    
  2. Change/add the following settings under the respective [[wdXxxxxx]] sub-sections in the [StdReport] section of weewx.conf and set as required:

    [[wdXxxxxxxxx]
        skin = WD/Testtags
        HTML_ROOT = ../sync/public_html/WD
    
  3. Reload the weewx configuration file:

    sudo /etc/init.d/weewx reload
    

    or

    sudo service weewx reload
    

Month averages

testtags.php and clientrawdaily.txt both contain a number of tags/fields that contain the average rainfall or temperature for each month (eg, January average temperature is the average temperature over all Januarys). These values can be determined in one of two ways; they may be calculated from historical weewx data or they may be set manually. The default method is to calculate the averages from historical weewx data. In this case, historical averages will be calculated for each month provided the archive contains at least one complete month of observations for that month. If there is no complete month of observations for the month concerned the averages for that month will be set to N/A or 0. Consequently, at least 12 complete months of observations are required for all 12 month averages to have numeric results. In cases where the user does not have at least 12 complete months of data or if the user prefers, the month averages can be set manually.

Using manually set month averages

To set the month averages manually:

  1. Edit weewx.conf:

    vi weewx.conf
    
  2. Locate the [Weewx-WD] section.

  3. If not already included add the following sub-section under [Weewx-WD]:

    [[Averages]]
        [[[Rainfall]]]
            Jan =
            Feb =
            Mar =
            Apr =
            May =
            Jun =
            Jul =
            Aug =
            Sep =
            Oct =
            Nov =
            Dec =
        [[[Temperature]]]
            Jan =
            Feb =
            Mar =
            Apr =
            May =
            Jun =
            Jul =
            Aug =
            Sep =
            Oct =
            Nov =
            Dec =
    

    Note that each of the [[[Xxxxxx]]] sections is known as an average group.

  4. Add the required month average (including units label) after the = on each line. The format for each setting is a number followed by one or more spaces then a unit label (eg 54.3 mm or 27.2 F). Note that the unit labels used are not weewx unit labels or groups. The following labels are accepted:

    • Rainfall. mm, cm or in for millimetres, centimetres or inches respectively.

    • Temperature. C or F for degrees Celsius or degrees Fahrenheit respectively.

    The units used need bear no relation to the units being displayed on your website or in your archive as weewx-WD automatically converts them as required.

    Care should be taken with the setting format as if one or more month settings cannot be resolved calculated month averages will be used for that average group (eg in the [[[Rainfall]]] average group Jan = 54.0mm, Jan = 1.2 feet or Jan = 54.0 will result in all rainfall month averages being calculated from historical archive data).

  5. Reload the weewx configuration file or start weewx:

    sudo /etc/init.d/weewx reload
    

    or

    sudo service weewx reload
    

    or if weewx is not running:

    sudo /etc/init.d/weewx start
    

    or

    sudo service weewx start
    

Reverting to calculated month averages

Once manual month averages are in use the user may revert to calculated month averages.

To revert to calculated month averages for all average groups:

  1. Edit weewx.conf:

    vi weewx.conf
    
  2. Delete the entire [[Averages]] section under [Weewx-WD].

    or

    Clear all settings (eg, Jan =) from each average group.

    or

    Delete the entire setting line for all settings from each average group.

  3. Reload the weewx configuration file or start weewx:

    sudo /etc/init.d/weewx reload
    

    or

    sudo service weewx reload
    

    or if weewx is not running:

    sudo /etc/init.d/weewx start
    

    or

    sudo service weewx start
    

To revert to calculated month averages for one average group:

  1. Edit weewx.conf:

    vi weewx.conf
    
  2. Delete the entire average group (eg [[[Temperature]]]) section under [[Averages]] [Weewx-WD].

    or

    Clear all settings (eg, Jan =) from the average group concerned.

    or

    Delete the entire setting line for all settings from the average group concerned.

  3. Reload the weewx configuration file or start weewx:

    sudo /etc/init.d/weewx reload
    

    or

    sudo service weewx reload
    

    or if weewx is not running:

    sudo /etc/init.d/weewx start
    

    or

    sudo service weewx start
    

weewx-WD Database Management

As of version 1.0.0, weewx-WD maintains its own database containing weewx-WD specific observations. Just as weewx includes a utility to manage certain aspects of the weewx database; weewx-WD also includes a utility, wd_database, to manage certain aspects of the weewx-WD database.

Using the wd_database utility

Note: In the following code snippets the symbolic name $BIN_ROOT must be replaced with the nominal location for your installation. Refer to the Where to find things section of the weewx User's Guide.

To assist in the setup and maintenance of the weewx-WD database the wd_database utility has been developed to allow the user to:

  1. Create the weewx-WD database, --create-archive. In some circumstances the user may need to create an empty weewx-WD database. This command is the weewx-WD equivalent of the weewx wee_database --create-archive command. To create the weewx-WD database:

    $ wd_database --create_archive
    

    if successful, this will result in output similar to:

    Using configuration file /home/weewx/weewx.conf.
    Using weewx database binding 'wx_binding', which is bound to database 'archive_sqlite'
    Using weewx-WD database binding 'wd_binding', which is bound to database 'weewxwd_sqlite'
    Creating weewx-WD database.
    Created database 'weewxwd.sdb'
    

    if the weewx-WD database already exists this will result in output similar to:

    Using configuration file /home/weewx/weewx.conf.
    Using weewx database binding 'wx_binding', which is bound to database 'archive_sqlite'
    Using weewx-WD database binding 'wd_binding', which is bound to database 'weewxwd_sqlite'
    Creating weewx-WD database.
    Database 'weewxwd.sdb' already exists. Nothing done.
    

    Note: Normally there is no need to create the weewx-WD database, it will be created automatically the first time weewx is run after installing weewx-WD.

  2. Display the weewx-WD archive status, --status. Performs a rudimentary check of the first and last good time stamps of the weewx-WD and weewx archives to determine whether any weewx-WD derived observations can be constructed from historical weewx archive data. The check will only identify data that can be inserted before the first good time stamp and after the last good time stamp of the weewx-WD archive. Gaps in weewx-WD data will not be identified. No changes to any data are made, the only action is the display of an appropriate message. This function is useful if an earlier version of weewx-WD has been in use, or if weewx-WD has been installed sometime after weewx was first operating, and the user wants to check the extent of any data to be reconstructed. To display the weewx-WD database status:

    $ wd_database --status
    

    if there is data available that can be reconstructed, the output will be similar to:

    Using configuration file /home/weewx/weewx.conf.
    Using weewx database binding 'wx_binding', which is bound to database 'archive_sqlite'
    Using weewx-WD database binding 'wd_binding', which is bound to database 'weewxwd_sqlite'
    Reconstruction of weewx-WD database 'weewxwd.sdb' table 'archive' data
    from 2014-02-13 00:05:00 AEST (1392213900) to 2016-12-01 20:55:00 AEST (1480589700)
    (up to approx 1023 days) is recommended.
    

    if there is no data available for reconstruction, the output will be similar to:

    Using configuration file /home/weewx/weewx.conf.
    Using weewx database binding 'wx_binding', which is bound to database 'archive_sqlite'
    Using weewx-WD database binding 'wd_binding', which is bound to database 'weewxwd_sqlite'
    Reconstruction of Weewx-WD database 'weewxwd' table 'archive' is not required
    
  3. Copy weewx-WD legacy data from the weewx archive, --copy-v2-data. Copies any legacy weewx-WD data that may still be stored in the weewx database, or may be derived from data stored in the weewx database. Data will only be copied or derived from the weewx database for timestamps earlier than the earliest and later than the latest timestamp in the weewx-WD archive. This function should be used with care if weewx database fields extraTemp1 or extraTemp2 are in use for other observations. To copy weewx-WD legacy data from the weewx archive:

    $ wd_database --copy-v2-data
    

    if legacy data was identified in the extraTemp1 or extraTemp2 fields or may be derived from other fields in the weewx archive the output will be similar to:

    Using configuration file /home/weewx/weewx.conf.
    Using weewx database binding 'wx_binding', which is bound to database 'archive_sqlite'
    Using weewx-WD database binding 'wd_binding', which is bound to database 'weewxwd_sqlite'
    552 records have been identified to backfill database 'weewxwd' from 2014-12-24 17:19:59 AEST (1419405599) to 2014-12-26 15:54:59 AEST (1419573299) (approx 2 days). This may take some time (hours) to complete.
    Are you sure you wish to proceed (y/n)? y
    Processing 552 records...
    552 record(s) over 1 period(s) covering approximately 2 day(s) processed in 0:00:39.
    

    if no legacy data can be copied or otherwise derived from the weewx archive the output will be similar to:

    Using configuration file /home/weewx/weewx.conf.
    Using weewx database binding 'wx_binding', which is bound to database 'archive_sqlite'
    Using weewx-WD database binding 'wd_binding', which is bound to database 'weewxwd_sqlite'
    No 'extraTemp1' or 'extraTemp2' data found in database 'weewx' that need to be cleared. No data changed.
    
  4. Clear any weewx-WD legacy data from the weewx database, --clear-v2-data. Clears any legacy weewx-WD data that may still be stored in the weewx database. This function is only applicable to users who have previously used weewx-WD 0.9.3 or earlier and upgraded to weewx 3.0.0 or later. This option will search for any weewx-WD legacy data in the weewx archive and, if found, set it to None (or NULL in SQL terms). This function should be used with care if extraTemp1 or extraTemp2 are in use for other observations. To clear any weewx-WD legacy data from the weewx database:

    $ wd_database --clear-v2-data
    

    if successful, the output will be similar to:

    Using configuration file /home/weewx/weewx.conf.
    Using weewx database binding 'wx_binding', which is bound to database 'archive_sqlite'
    Using weewx-WD database binding 'wd_binding', which is bound to database 'weewxwd_sqlite'
    'extraTemp1' and 'extraTemp2' data in database 'weewx' from 2014-12-24 17:20:00 AEST (1419405600) to 2014-12-26 15:55:00 AEST (1419573300) (approx 2 days) is about to be cleared. Any data in these fields will be irretrievably lost.
    Are you sure you wish to proceed (y/n)? y
    Done. 'extraTemp1' and 'extraTemp2' cleared in 553 records (approx 2 days).
    

    if no extraTemp1 or extraTemp2 data was found, the output will be similar to:

    Using configuration file /home/weewx/weewx.conf.
    Using weewx database binding 'wx_binding', which is bound to database 'archive_sqlite'
    Using weewx-WD database binding 'wd_binding', which is bound to database 'weewxwd_sqlite'
    No 'extraTemp1' or 'extraTemp2' data found in database 'weewx' that need to be cleared. No data changed.
    
  5. Delete the weewx-WD daily summaries, --drop-daily. Deletes/drops the weewx-WD daily summary tables. This is the weewx-WD equivalent of the weewx wee_database --drop-daily command. To delete the weewx-WD daily summaries:

    $ wd_database --drop-daily
    

    this results in output similar to:

    Using configuration file /home/weewx/weewx.conf.
    Using weewx database binding 'wx_binding', which is bound to database 'archive_sqlite'
    Using weewx-WD database binding 'wd_binding', which is bound to database 'weewxwd_sqlite'
    Proceeding will delete all your daily summaries from database 'weewxwd.sdb'
    Are you sure you want to proceed (y/n)?
    

    if the user answers 'y' the daily summaries are dropped resulting in output similar to:

    Dropping daily summary tables from database 'weewxwd.sdb' ...
    Dropped daily summary tables from database 'weewxwd.sdb'
    

    if the user answers 'n' the utility exits with output similar to:

    Action cancelled. Nothing done.
    
  6. Backfill the weewx-WD daily summary tables from the weewx-WD archive, --backfill-daily. Backfills the weewx-WD daily summaries from the weewx-WD archive. This is the weewx-WD equivalent of the weewx wee_database --backfill-daily command. To backfill the weewx-WD daily summary tables from the weewx-WD archive:

    $ wd_database --backfill_daily
    

    if the backfill is completed, the output will be similar to:

    Using configuration file /home/weewx/weewx.conf.
    Using weewx database binding 'wx_binding', which is bound to database 'archive_sqlite'
    Using weewx-WD database binding 'wd_binding', which is bound to database 'weewxwd_sqlite'
    Backfilling daily summary tables in database 'weewxwd.sdb' ...
    Daily summaries up to date in database 'weewxwd.sdb'.
    

Using MySQL

weewx-WD supports the same database systems that weewx supports. weewx-WD defaults to using SQLite to provide the weewx-WD database.

To use a MySQL database

If you wish to use MySQL to provide the weewx-WD database:

  1. Edit weewx.conf:

    vi weewx.conf
    
  2. Change the database setting under [Bindings], [[wd_binding]] in weewx.conf to weewxwd_mysql as follows:

    [[wd_binding]]
        manager = weewx.manager.DaySummaryManager
        schema = user.weewxwd3.schema
        table_name = archive
        database = weewxwd_mysql
    
  3. Change the [[weewxwd_mysql]] section under [Databases] in weewx.conf to suit your installation eg:

    [[weewxwd_mysql]]
        host = localhost
        user = weewx
        password = weewx
        database_name = weewxwd
        driver = weedb.mysql
    

Changing the MySQL database name and archive table name

The weewx-WD MySQL database name can be changed if necessary, as can the name of the weewx-WD archive table. To change the weewx-WD MySQL database name and/or the archive table name:

  1. Edit weewx.conf:

    vi weewx.conf
    
  2. Under [Databases] in weewx.conf change the following to suit your installation:

    [[wd_binding]]
        ...
        table_name = archive
    
    [[weewxwd_mysql]]
        ....
        database_name = weewxwd
    

Determining weewx-WD Version

To display the version numbers of the weewx-WD Python files:

$ wd_database --version

This will result in output similar to:

wd_database version:                         1.0.3
weewx-WD version:                            1.0.3
weewx-WD SLE version:                        1.0.3
weewx-WD Astronomical SLE version:           1.0.3
weewx-WD Tagged Statistics version:          1.0.3
weewx-WD Stacked Windrose Generator version: 1.0.3

Trouble Shooting

weewx-WD services are not running

When the weewx-WD services are running correctly lines such as the following should be included in the weewx log file when weewx saves an archive record to database:

Dec  1 20:55:17 jessie weewx[699]: manager: added record 2016-12-01 20:55:00 AEST (1480589700) to database 'weewxwd.sdb'
Dec  1 20:55:17 jessie weewx[699]: manager: added record 2016-12-01 20:55:00 AEST (1480589700) to daily summary in 'weewxwd.sdb'

If such lines are not included in the weewx log it is possible the weewx-WD services have not been correctly configured/installed. To confirm correct configuration/installation of the weewx-WD services:

  1. Confirm the file weewxwd3,py is located in the $BIN_ROOT/user directory. If the file is missing it should be extracted from the weewx-WD extension package and copied to the $BIN_ROOT/user directory.

  2. Edit weewx.conf:

    vi weewx.conf
    
  3. Under [Engine] in weewx.conf check the weewx-WD services have been correctly added to the process_services and archive_services lines. These lines should look similar to:

    process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, weewx.engine.StdQC, weewx.wxservices.StdWXCalculate, *user.weewxwd3.WdWXCalculate*
    archive_services = weewx.engine.StdArchive, *user.weewxwd3.WdArchive*
    
  4. If the lines are different, correct them, save weewx.conf and stop then start weewx:

    sudo /etc/init.d/weewx stop
    sudo /etc/init.d/weewx start
    

    or

    sudo service weewx stop
    sudo service weewx start
    

weewx-WD Installed Files and Their Locations

The weewx-WD files are stored in the following locations:

  • $BIN_ROOT/user.

    • imageStackedWindRose3.py
    • wdAstroSearchX3.py
    • wdSearchX3.py
    • wdTaggedStats3.py
    • wd_database
    • weewxwd3.py
  • $SKIN_ROOT/Clientraw

    • clientraw.txt.tmpl
    • clientrawdaily.txt.tmpl
    • clientrawextra.txt.tmpl
    • clientrawhour.txt.tmpl
    • skin.conf
  • $SKIN_ROOT/PWS

    • weewx_pws.xml.tmpl
    • skin.conf
  • $SKIN_ROOT/SteelGauges

    • customclientraw.txt.tmpl
    • skin.conf
  • $SKIN_ROOT/Testtags

    • skin.conf
    • testtags.php.tmpl

For more information on the location of weewx files refer to the Where to find things section of the weewx User's Guide.

Updated