Samurize utilities muSpec

Samurize plugins

These plugins are for the Samurize desktop info/ gadget app. It's a very mature and capable app, though, sadly, it appears to be dying. Still, I use these plugins daily and find them very useful, so I decided to make them available.



Aphex Twin muSpec logo musician's
spectrograph


WeatherHub

Temp. grad

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, Weather Underground, Weather Bug, Google.

Settings

Weather GUI

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
by IP

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
names

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), Wunder (Weather Underground), Bug (Weather Bug), and Google.

Features and tag matrix

Red means the feed doesn't provide this data. Not WeatherHub's fault.

Feature WWO Wunder Bug Google 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 0.5K/h 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
Each day has its own set of tags: f1_, f2_, f3_, etc.

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.

Weather config
Simple test config

Weather 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.

Weather config
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.

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.

Weather Underground ("Wunder")

Location input: "state/city_name", (CA/San_Francisco), US zip code, "country/city" (Australia/Sydney), "latitude, longitude", US airport code (KJFK), "autoip" (tries to detect IP address).

Links: API key, icon sets.

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 location for Weather Underground only
Wunder_Location=Roswell, NM
# Set API key for Weather Underground
Wunder_APIKey=SampleKey_123456789
# Set API key for World Weather Online
WWO_APIKey=SampleKey_123456789

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.

Download

Download WeatherHub_1.96.zip (58K), WeatherIconsBatchDL.zip (387K)