Content-Length: 333753 | pFad | https://github.com/bburton/weewx-columbia-ms

45 GitHub - bburton/weewx-columbia-ms: WeeWX weather driver for the Columbia Weather Systems MicroServer
Skip to content

WeeWX weather driver for the Columbia Weather Systems MicroServer

License

Notifications You must be signed in to change notification settings

bburton/weewx-columbia-ms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Columbia Weather Systems MicroServer Driver for WeeWX

weewx-columbia-ms

Copyright 2020 by William Burton
Distributed under terms of the GPLv3

This is a WeeWX driver that retrieves data from a Columbia Weather Systems MicroServer. The MicroServer supports a variety of Columbia weather stations. This driver has been tested against WeeWX 3.9.2 under Python 2.7 and WeeWX 4 under Python 3.6.

To obtain weather data from the MicroServer, this driver polls the MicroServer via HTTP downloading the Enhanced XML version of the current data from /tmp/latestsampledata_u.xml at the specified host and port. For more information on the format, see the Columbia Weather Systems MicroServer User Manual, Appendix B, Enhanced Web Server available at http://columbiaweather.com/resources/manuals-and-brochures in PDF format.

There is not currently a predefined way to upload historical data into WeeWX. However, if the MicroServer daily log files have been manually downloaded, it should be possible to configure the wee_import utility to import one file at a time.

Installation

  1. install weewx, select 'Simulator' driver http://weewx.com/docs/usersguide.htm#installing

  2. download the driver wget https://github.com/bburton/weewx-columbia-ms/releases/download/v1.0.0/weewx-columbia-ms-1.0.0.tar.gz

  3. install the driver sudo wee_extension --install weewx-columbia-ms-1.0.0.tar.gz

  4. configure the driver sudo wee_config --reconfigure --driver=user.columbia-ms

  5. start weewx sudo /etc/init.d/weewx start or sudo systemctl start weewx

Driver options

Use the host and port options to tell the driver where to find the MicroServer:

[ColumbiaMicroServer]
    # This section is for the Columbia Weather Systems MicroServer.

    # The driver to use
    driver = user.columbia_ms

    # How many times per minute to poll the MicroServer
    polls_per_minute = 4

    # Number of seconds to shift polling earlier so loop packet completes
    # processing before the top of the minute.
    poll_lead_seconds = 5

    # Number of retries to perform a quick retry
    quick_retries = 3

TODO

  1. Verify units in XML input file with assumptions in the code.

The XML file downloaded from the MicroServer is the enhanced version which includes the units of each item as an attribute so it's possible to determine if the station temperatures are configured in celcius or farenheight, rain is in mm, cm or inches, wind speed in kph, mph or knots, etc. However, at present, the code assumes all US/imperial units have been configured and does not check these units. At the very least, checking needs to be implemented to avoid corrupt data or better if the driver can automatically convert data if appropriate.

  1. Implement a way to load historical data.

The MicroServer by default logs one record per minute to a CSV file on a microSD card with a new CSV file started for each day. These CSV files are automatically pruned after one year so there's never more than about 365 files or days of data on the MicroServer.

Probably the best way to import historical data is to implement a new import configuration class based on the import implementations used with the wee_import utility. This requires the following functionality:

a. Option to download all or a date range of files from the MicroServer. This will require logging in as the admin user and screen-scraping the Data Logs page (/admin/logfiles.php) to retrieve the URL of each available file. Then, each file within the range would be downloaded. It would be preferable to point this to a known folder and avoid downloading any file that was already downloaded. Note that the file for "today" is always a partial file so it may be best not to download it.

b. Import daily CSV files from a folder, optionally based on a date-range. The import function needs to be separate from the download so it will be possible to upload older archived files into WeeWX that are no longer on the MicroServer but were previously downloaded by other means. Since the MicroServer logs records at a one minute interval, the import process needs to have the ability to resample the data to match the archive interval as configured in weewx.conf.

Non-goals

The MicroServer does not have any API's to support the following functions:

  • Query of hardware status
  • Setting hardware configuration
  • Obtain historical data in the same format as the current data.

Since there already exists a full-featured web-based administration console, spending much effort to duplicate the console functionality is probably not worth the effort as screen-scraping and reverse-engineering would have to be done.

About

WeeWX weather driver for the Columbia Weather Systems MicroServer

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/bburton/weewx-columbia-ms

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy