WeatherHub
The problem with weather feeds is that they come and go every few years. The idea behind the WeatherHub plugin is to centralize multiple feeds and output the weather data as consistent, uniform tags in Samurize. This way, if a feed goes dead, it can be easily replaced with another, without changing the config. Also, if particular data is not available from one feed, you can fill it in from another. For any feed WeatherHub can use any TWC-compatible icon set (weather.com). Supported feeds: World Weather Online, Dark Sky, Weather Bug, Google.
Settings
METER settings apply to this meter only | |
Feed |
Which feed to use for this meter. |
Format |
What info to display (see tag matrix below). |
FEED settings apply to the feed type chosen for the meter | |
Locate |
Some feeds will accept your external IP as location. |
Location | Where you are on Earth. See Feed info below for details on how to specify it. |
API key | Some feeds require registration and a (free) API key. The link in the dialog points to the registration page. | Icon set folder |
Icons to use for this feed. If used in the path, the [FEED] variable will expand into the feed handle. (*) |
TWC compatible |
The icons use the TWC numbering scheme (weather.com). | Use night icons |
On: find night icons for feeds with day icons only (like Google). Off: don't use night icons, even for feeds that have them. Applies only when TWC-compatibility is on. | Sky icons |
For Weather Underground only: these icons show how the sky looks like, no precipitation. | Img type |
Icon format. Native means the default feed format. |
GLOBAL settings apply to WeatherHub as a whole | |
WeatherHub.ini |
The location and API keys in WeatherHub.ini will overwrite values in all (old and new) meters. |
Weekday |
Short: use shorter versions (e.g. "Mon" instead of "Monday"). Translate: use names native to your OS. |
Disable for 2 min. |
If your config starts with Windows, it may be more efficient to delay any activity until Win is less busy. |
Interval | To limit net usage, WeatherHub retrieves weather info at this interval, then caches it. Your config refresh rate has no bearing on this (only on how often your meter is redrawn). |
Decimal places |
Some numeric values come directly from the feed, others are computed. Computed values can be rounded off. Raw values are left intact. E.g. if the feed reports a value as "53" (no decimals), it will always be shown with no decimals. |
System wake-up |
Log: print out a debug log. Delay: wait this long after wake-up from sleep before reconnecting. |
(*) The feed handle is a short version of the feed name: WWO (World Weather Online), Dark Sky (DarkSky), Bug (Weather Bug), and Google.
Features and tag matrix
Red means the feed doesn't provide this data. Not WeatherHub's fault.
Feature | WWO | DarkSky | Bug | Tag | |
API key needed | Yes | Yes | Yes | No | |
Locate by IP | |||||
Forecast days | 5 | 4 | 7 | 4 | |
Usage limits for free accounts |
|||||
Requests | 0.5K/h | 1K/d | 5K/d | - | |
Min interval | 15 min | 15 min | ? | - | |
Tags to verify location |
|||||
City | [city] | ||||
Country | [country] | ||||
Latitude | [lat] | ||||
Longitude | [lon] | ||||
Elevation (ft) | [elevF] | ||||
Elevation (m) | [elevM] | ||||
Current conditions |
|||||
Timestamp UTC time | [c_timeU] | ||||
Timestamp loc. time | [c_timeL] | ||||
Temp. (F) | [c_tempF] | ||||
Temp. (C) | [c_tempC] | ||||
Description | [c_desc] | ||||
Icon (local) | [c_iconL] | ||||
Icon (server) | [c_iconS] | ||||
Wind (mph) | [c_windM] | ||||
Wind (km/h) | [c_windK] | ||||
Wind direction | [c_windD] | ||||
Precip. (in/h) | [c_precI] | ||||
Precip. (mm/h) | [c_precM] | ||||
Precip. (in/d) | [c_precDI] | ||||
Precip. (mm/day) | [c_precDM] | ||||
Prec. chance (%) | [c_precC] | ||||
Humidity (%) | [c_hum] | ||||
Dew point (F) | [c_dewF] | ||||
Dew point (C) | [c_dewC] | ||||
Visibility (miles) | [c_visM] | ||||
Visibility (km) | [c_visK] | ||||
Pressure (inHg) | [c_pressI] | ||||
Pressure (mB) | [c_pressM] | ||||
Cloud cover (%) | [c_cloud] | ||||
Moon phase (?) | [c_moonP] | ||||
Sunrise | [c_sunR] | ||||
Sunset | [c_sunS] | ||||
UV index | [c_uv] | ||||
Radar image | [c_radI] | ||||
Radar window | [c_radW] | ||||
Satellite img | [c_satI] | ||||
Forecast days |
|||||
Date | [f1_date] | ||||
Day of month | [f1_dayM] | ||||
Weekday name | [f1_dayW] | ||||
Month | [f1_month] | ||||
Min. temp. (F) | [f1_loF] | ||||
Min. temp. (C) | [f1_loC] | ||||
Max. temp. (F) | [f1_hiF] | ||||
Max. temp. (C) | [f1_hiC] | ||||
Description | [f1_desc] | ||||
Icon (local) | [f1_iconL] | ||||
Icon (server) | [f1_iconS] | ||||
Prec. chance (%) | [f1_precC] |
Sample configs (included)
To adapt the sample configs for your location replace the default location with yours in a text editor. You can also replace "Google" with another feed (you'll need an API key). Or you can create a WeatherHub.ini file (see below) and check the Always use values... box.
Simple test config
Above: Google weather config with a 4-day forecast. It uses a red/blue color ramp to show upcoming rises and drops in temp. with respect to today (see TempGrad). The ramp values are set for the Fahrenheit scale. You may need to adjust them for °C.
Same as above, but using TWC-compatible icons.
Icons
Each feed has its own native icons. They're not interchangeable, because they use different naming schemes and weather conditions. The TWC (weather.com) icon sets use numbered icons and they're sort of an interchangeable "standard". Native icons will match the weather condition exactly. TWC icons will be close but not exactly the same (but you get a bigger selection of icon sets).
It's more efficient to keep weather icons locally. However, the download does not include the native icon sets for each feed, as it might not be OK with the feed providers. Download the icons manually from the included link lists, or use WeatherIconsBatchDL below. The [c_iconL] & [f#_iconL] tags point to the local icon file, while [c_iconS] & [f#_iconS] are the URLs of images on the feed's server (or just filenames, if the feed doesn't provide icons).
Great icon sets: Shiny, Tick, IconBest, Flat
Collections: Icon Collection, Shutterstock
Feed info
Note: quote marks are used below to separate sets of data. Don't actually include them. Latitude and longitude are in decimal degrees, S and W are negative. See Wikipedia article on how to obtain geographic coordinates.
World Weather Online ("WWO")
Location input: "city", "city, state" (US only), "city, state, country", "city, country", IP address, US zip code, UK zip code, Canada postal code, US airport code (IATA), "latitude, longitude".
Links: API key. Icons are not public: see download for a list.
Dark Sky ("DarkSky")
Location input: "latitude, longitude", auto IP (tries to detect IP address).
Links: API key, they don't provide icons, see download for a list. Uses TWS-compatible numbering (turn on "TWS compatible")
Weather Bug ("Bug")
Location input: US zip code, "[world city code]" (use square brackets, e.g. [23748], use link below for a full list), "latitude, longitude".
Links: API key, world city codes. Icons are not public: see download for a list.
Google ("Google")
Location input: US zip code, Canadian postal code, "city, state" (US or Canada), "city, country" (won't work if there are multiple cities with the same name in one country). Note: Google doesn't officially support its weather API, nor do they publish any docs. Try other methods, they may work.
Links: icon sets
WeatherHub.ini
You can use a file called WeatherHub.ini in the plugin folder to specify feed locations and API values. Location sets the default location for all feeds. Feed_Location/Feed_APIKey set the location/API key for a particular feed. If feed location is not specified, the default location is used. To override values in existing configs, check the Always use values from WeatherHub.ini box and reload the config. Otherwise WeatherHub.ini will only affect newly created meters.
# Set default location for all feeds Location=88201 # Set API key for DarkSky DarkSky_APIKey=SampleKey_123456789 # Set API key for World Weather Online WWO_APIKey=SampleKey_123456789 latitude=33.3872 longitude=-104.5280
Notes
- You can mix multiple feeds in one config, but each feed adds to connection time.
- You can run WeatherHub in its own config if your refresh rate is sometimes delayed by net connection.
- Weather Underground no longer provides free keys, so it's no longer supported.
Download
Download WeatherHub_1.97.zip (72K), WeatherIconsBatchDL.zip (387K)