This is a forecasting extension for the weewx weather system.
Copyright 2013-2016 Matthew Wall

This package includes the forecasting module, unit tests, and a sample skin.
The following forecast sources are supported:

  US National Weather Service (NWS)
  the weather underground (WU)
  open weathermap (OWM)
  UK Met Office (UKMO)
  Aeris Weather
  World Weather Online (WWO)
  Zambretti
  tide predictions using xtide

The forecast extension includes a few independent parts:

 - a forecast engine that downloads and/or generates forecast data
 - a database schema that is normalized to store data from various sources
 - a search list extension for using forecast data in reports
 - a pre-defined forecast_table for inclusion in reports
 - a pre-defined forecast_strip for inclusion in reports
 - icons for cloud cover, storms, rainfall, snow, etc.

The forecast_table displays forecast data in a table with time going down the
page.  The forecast_table.inc file is a cheetah template designed to be
included in other templates.  At the beginning of the file is a list of
variables that determine which forecast data will be displayed.

The forecast_strip displays forecast data in a compact form with time going
from left to right.  The forecast_strip.inc file is a cheetah template designed
to be included in other templates.  At the beginning of the file is a list of
variables that determine which forecast data will be displayed.


===============================================================================
Pre-requisites

If you want NWS forecasts, determine your 3-character forecast office
identifier and 6-character location identifier:

  http://www.nws.noaa.gov/oh/hads/USGS/

If you want WU forecasts, obtain an api_key:

  http://www.wunderground.com/weather/api/

If you want OWM forecasts, obtain an api_key:

  http://openweathermap.org/appid

If you want UK Met Office forecasts, obtain an api_key:

  http://metoffice.gov.uk/datapoint

If you want Aeris forecasts, obtain a client id and client secret:

  http://www.aerisweather.com/account

If you want WWO forecasts, obtain an api_key:

  https://developer.worldweatheronline.com/auth/register

If you want tide forecasts, install xtides:
  sudo apt-get install xtide
Then determine your location:
  http://tides.mobilegeographics.com/


===============================================================================
Installation instructions:

1) run the installer:

wee_extension --install weewx-forecast.tgz

2) modify weewx.conf for your location:

[Forecast]
    [[NWS]]
        lid = MAZ014                 # specify a location identifier
        foid = BOX                   # specify a forecast office identifier
    [[WU]]
        api_key = XXXXXXXXXXXXXXXX   # specify a weather underground api_key
    [[OWM]]
        api_key = XXXXXXXXXXXXXXXX   # specify an open weathermap api_key
    [[UKMO]]
        api_key = XXXXXXXXXXXXXXXX   # specify a UK met office api_key
        location = 2337              # specify code for UK location
    [[Aeris]]
        client_id = XXXXXXXXXXXXXXXX      # specify client identifier
        client_secret = XXXXXXXXXXXXXXXX  # specify client secret key
    [[XTide]]
        location = Boston            # specify a location

3) restart weewx:

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

This will result in a skin called forecast with web pages that illustrate how
to use the forecasts.  See comments in forecast.py for detailed customization
options.


===============================================================================
Credits:

Icons were derived from Adam Whitcroft's climacons.
