Skip to content

A WeeWX extension to support Weather Display Live and the Carter Lake/Saratoga weather website templates.

License

Notifications You must be signed in to change notification settings

gjr80/weewx-weewx-wd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

End of Life Notice

Note: This WeeWX extension is no longer being actively developed and supported though it should continue to operate under WeeWX 4.5.1 and earlier (note that WeeWx-WD will not operate under WeeWX v4.6.0 and later). WeeWX-WD users are encouraged to replace the WeeWX-WD extension with the WeeWX-Saratoga extension. The WeeWX-Saratoga extension was designed in conjunction with the Saratoga weather website templates and utilises the direct WeeWX support now incorporated in the Saratoga templates. The key difference between the WeeWx-Saratoga and WeeWX-WD extensions are:

  • the WeeWX-Saratoga extension produces the same clientraw family of files as produced by WeeWx-WD
  • the WeeWX-Saratoga extension produces a loop packet based near realtime clientraw.txt allowing near realtime updates of the Saratoga dashboard
  • the WeeWx-Saratoga extension produces a tags file, WEEWXtags.php for use by the Saratoga templates
  • the WeeWX-Saratoga extension no longer produces the testtags.php tags file
  • the WeeWX-Saratoga extension does not support the now defunct Pocket PWS Android application
  • the WeeWX-Saratoga extension supports WeeWX v4.6.0 and later

WeeWX-WD

A WeeWX extension to support Weather Display Live, Carter Lake/Saratoga weather website templates and the Pocket PWS Android weather app.

Forked from https://bitbucket.org/ozgreg/weewx-wd

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

Weather Display live:

  • clientraw.txt
  • clientrawextra.txt
  • clientrawdaily.txt
  • clientrawhour.txt

Carter Lake/Saratoga templates:

  • testtags.php
  • daywindrose.png

Pocket PWS:

  • weewx_pws.xml

The WeeWX-WD extension utilises a separate database to record a number of observations in addition to those normally recorded by WeeWX. The WeeWX-WD extension then uses this and standard WeeWX data to produce a number of files used as source data for Weather Display Live, the Carter Lake/Saratoga weather website templates and the Pocket PWS Android weather app.

Pre-Requisites

The WeeWX-WD extension requires WeeWX v3.4.0 or later. Both Python 2 and Python 3 are supported when using WeeWX v4.0.0 or later.

Pyephem is required to support advanced ephemeris tags.

File Locations

As WeeWX file locations vary by system and installation method, the following symbolic names, as per the WeeWX User's Guide - Installing WeeWX, are used in these instructions:

  • $BIN_ROOT (Executables)
  • $SKIN_ROOT (Skins and templates)
  • $SQLITE_ROOT (SQLite databases)
  • $HTML_ROOT (Web pages and images)

Where applicable the nominal location for your system and installation type should be used in place of the symbolic name.

Installation Instructions

Note: If upgrading a previous WeeWX-WD installation please refer to the Upgrade Guide in the WeeWX-WD wiki.

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

Installation using the wee_extension utility

  1. Download the WeeWX-WD extension from the WeeWX-WD extension the WeeWX-WD extension releases page into a directory accessible from the WeeWX machine.

    $ wget -P $DOWNLOAD_ROOT https://github.com/gjr80/weewx-weewx-wd/releases/download/v2.1.3/weewxwd-2.1.3.tar.gz
    

    replacing the symbolic name $DOWNLOAD_ROOT with the path to the directory where the WeeWX-WD extension is to be downloaded (eg, /var/tmp).

  2. Stop WeeWX:

    $ sudo /etc/init.d/weewx stop
    

    or

    $ sudo service weewx stop
    

    or

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

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

    Note: Depending on your system/installation the above command may need to be prefixed with sudo.

    Note: Depending on your WeeWX installation the path to wee_extension may need to be provided, eg: $ /home/weewx/bin/wee_extension --install....

    This will result in output similar to the following:

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

     $ sudo /etc/init.d/weewx start
    

    or

     $ sudo service weewx start
    

    or

     $ sudo systemctl start weewx
    
  5. This will result in the WeeWX-WD data files being generated during each report generation cycle. The WeeWX-WD extension installation can be further customized (eg units of measure, file locations etc) by referring to the WeeWX-WD wiki.

Manual installation

  1. Download the WeeWX-WD extension from the WeeWX-WD extension releases page into a directory accessible from the WeeWX machine.

    $ wget -P $DOWNLOAD_ROOT https://github.com/gjr80/weewx-weewx-wd/releases/download/v2.1.3/weewxwd-2.1.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-2.1.3.tar.gz
    
  3. Copy files from within the resulting folder as follows:

    $ cp weewxwd/bin/user/*.py $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
        enabled = True
        [[[Units]]]
            [[[[TimeFormats]]]]
                date_f = %d/%m/%Y
                date_time_f = %d/%m/%Y %H:%M
            [[[[Groups]]]]
                group_altitude = foot
                group_degree_day = degree_C_day
                group_rainrate = mm_per_hour
                group_rain = mm
                group_speed = km_per_hour
                group_speed2 = km_per_hour2
                group_pressure = hPa
                group_temperature = degree_C            
    
    [[wdPWS]]
        HTML_ROOT = public_html/WD
        skin = PWS
        enabled = False
        [[[Units]]]
            [[[[Groups]]]]
                group_rainrate = mm_per_hour
                group_rain = mm
                group_speed = km_per_hour
                group_speed2 = km_per_hour2
                group_pressure = hPa
                group_temperature = degree_C
                
    [[wdClientraw]]
        HTML_ROOT = public_html/WD
        skin = Clientraw
        enabled = True
        [[[Units]]]
            [[[[StringFormats]]]]
                percent = %.0f
                degree_compass = %.0f
                watt_per_meter_squared = %.0f
                mm = %.1f
                NONE = --
                knot = %.1f
                degree_C = %.1f
                km = %.1f
                foot = %.0f
                uv_index = %.1f
                hPa = %.1f
                
    [[wdStackedWindRose]]
        HTML_ROOT = public_html/WD
        skin = StackedWindRose
        enabled = True
        [[[Units]]]
            [[[[TimeFormats]]]]
                date_f = %d/%m/%Y
                date_time_f = %d/%m/%Y %H:%M
            [[[[Groups]]]]
                group_speed2 = km_per_hour2
                group_speed = km_per_hour            
    
  6. In weewx.conf, add the following section:

    [Weewx-WD]
        data_binding = wd_binding
        sunshine_threshold = 120
        [[Supplementary]]
            data_binding = wdsupp_binding
            [[[WU]]]
                api_key = replace_me
                enable = False
            [[[DS]]]
                api_key = replace_me
                enable = False
            [[[File]]]
                file = /path/and/filename
                enable = False
    
  7. In weewx.conf, add the following sub-section to [Databases]:

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

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

    [[weewxwd_mysql]]
        database_name = weewxwd
        database_type = MySQL
    
    [[wd_supp_mysql]]
        database_name = wdsupp
        database_type = MySQL
    
  8. In weewx.conf, add the following sub-section to the [DataBindings] section:

    [[wd_binding]]
        database = weewxwd_sqlite
        table_name = archive
        manager = weewx.manager.DaySummaryManager
        schema = user.wdschema.weewxwd_schema
    
    [[wdsupp_binding]]
        database = wd_supp_sqlite
        table_name = supp
        manager = weewx.manager.Manager
        schema = user.wdschema.wdsupp_schema
    

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

    [[wd_binding]]
        database = weewxwd_mysql
        table_name = archive
        manager = weewx.manager.DaySummaryManager
        schema = user.wdschema.weewxwd_schema
    
    [[wdsupp_binding]]
        database = wd_supp_mysql
        table_name = supp
        manager = weewx.manager.Manager
        schema = user.wdschema.wdsupp_schema
    
  9. In weewx.conf, modify the services lists in [Engine] as indicated:

    • process_services. Add user.wd.WdWXCalculate eg:

      process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, weewx.engine.StdQC, weewx.wxservices.StdWXCalculate, user.wd.WdWXCalculate
      
    • archive_services. Add user.weewxwd3.WdArchive AND user.wd.WdSuppArchive eg:

      archive_services = weewx.engine.StdArchive, user.wd.WdArchive, user.wd.WdSuppArchive
      
  10. Start WeeWX:

     $ sudo /etc/init.d/weewx start
    

    or

     $ sudo service weewx start
    

    or

     $ sudo systemctl start weewx
    
  11. This will result in the WeeWX-WD data files being generated during each report generation cycle. The WeeWX-WD extension installation can be further customized (eg units of measure, file locations etc) by referring to the WeeWX-WD wiki.

Support

General support issues may be raised in the Google Groups weewx-user forum. Specific bugs in the WeeWX-WD extension code should be the subject of a new issue raised via the Issues Page.

Licensing

The WeeWX-WD extension is licensed under the GNU Public License v3.

About

A WeeWX extension to support Weather Display Live and the Carter Lake/Saratoga weather website templates.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages