WUnderground Plugin Installation and Use

Posted on
Sat Aug 23, 2014 6:04 pm
DaveL17 offline
User avatar
Posts: 5262
Joined: Aug 20, 2013
Location: Chicago, IL, USA

WUnderground Plugin Installation and Use

Download the plugin here: [Download]

Overview:
The Weather Underground plugin scrapes key weather data from a JSON feed provided by Weather Underground. It allows the user to be able to create devices that represent individual locations for which weather data is presented. The weather data is presented by setting up devices (the data are stored in device state values.) Each location is represented by an individual device. There are also individual device types for different kinds of weather information.

Features:
International locations.
Metric and standard units.
Configurable language.
Severe weather alerts.
Supports day/night icons for control pages.
Supports custom labels for control pages.
Indicator to show plugin health.
Notification of plugin updates.

Device Types:
Basic Weather
Astronomy
Hourly Forecasts (24 hours)
Ten Day Forecasts
Tidal Forecasts
Weather Almanac (records)
WUnderground Image Downloader

Installation:
Installation is easy. Double-click on the downloaded plugin file and, if Indigo doesn't prompt you to enable it, go to the Plugins menu and select 'Enable'.

Configuration:
There are nine main plugin settings.
Screen Shot 2014-12-25 at 5.15.28 AM.png
WUnderground Plugin configuration dialog.
Screen Shot 2014-12-25 at 5.15.28 AM.png (167.23 KiB) Viewed 3657 times

[1] The first is the API key. The key is obtained from the Weather Underground developer site. The plugin will not work without an API key. There are three API plan levels available at Weather Underground, and the plugin requires a Cumulus or Anvil plan for full functionality. See Weather Underground for more details.

[2] The second plugin setting controls the language that will be used for the Weather Underground data that is returned by the plugin. This setting will not have any effect on the plugin configuration menus which will always be in english.

[3] The third setting controls how frequently the plugin will reach out to the Weather Underground site to retrieve data. PLEASE NOTE: the basic developer plan allows for up to 10 downloads per minute and 500 downloads per day. While this sounds like a lot, one location downloading every 5 minutes results in 288 calls. Two locations would exceed the daily limit. Use carefully.

[4] The fourth setting is a counter value that helps to keep you from exceeding your maximum allowable number of downloads from Weather Underground. The base number of 500 is the default. You can set this number to any value you like (positive integer) and when the number is reached, the plugin will stop calling Weather Underground until the next day.

[5] The fifth setting is for the precision of the temperature displayed in the Indigo Item List. You can select 1 decimal point (the same as the data sent by Weather Underground, or 0 decimal points. This only affects the Item List display.

[6] The sixth setting is for the precision of the temperature displayed in control pages and so on. Again, you can select 1 decimal point or 0 decimal points.

[7] The seventh setting is to control whether severe weather alerts are written to the Indigo Log (or not). These text values are also saved to device states (regardless of the setting of this control.)

[8] The eighth setting is for notifications of plugin updates. To receive email notifications of plugin updates, enable the feature (checkbox) and enter a valid email address. It is your Indigo install that sends you the email, so this feature will only work if you have email set up for your Indigo server. See Indigo preferences.

[9] The final setting controls debug output. There are three levels of debugging output: low, medium and high. Important Note: if you select 'High', sensitive information will be written to the log such as your API key and email address (if you've configured update notifications.)

Plugin Menu
Within the Indigo Plugins menu, there are several features.
Screen Shot 2015-03-08 at 9.36.43 PM.png
Plugin Menu Features
Screen Shot 2015-03-08 at 9.36.43 PM.png (29.26 KiB) Viewed 3334 times

Check for Plugin Updates - If configured within the plugin, selecting this menu item will force the plugin to check to see if a newer version is available. Also, if configured, the plugin will check for updates automatically once per day (see below.)

Refresh Data Now - Selecting this menu item will force the plugin to refresh all weather devices.

Write Weather Data to File - Selecting this menu item will perform a data dump of all weather data that your plugin devices are requesting (for all locations.) It will save this data to the Indigo logs directory and for convenience, will write the path to the data to the Indigo log window. There is little reason to take this step unless we need to conduct in-depth debugging.

Toggle Debugging - Selecting this menu item will toggle the debugging feature on and off. There are additional debugging options that should be considered (see above.)

Use:
To use the plugin, create a new device. There are several device types (Weather Device, Hourly Forecast Device, Image Downloader Device, Ten Day Forecast Device and Tidal Device) and several device settings for each. Weather devices provide information about current conditions and forecasts for the location you specify. Hourly Forecast devices provide more granular information about the weather forecast for the next 24 hours. Image Downloader devices copy an image from a web location and save it to the local machine. Tidal devices provide forecasted tidal information for the source location. Ten Day Forecast devices provide 10 daily forecasts and other information for the source location. Important Note: you must have a Cumulus or Anvil plan with Weather Underground to use many of these device types (those that require it will specify in the device configuration dialogs.)

Screen Shot 2014-12-25 at 5.13.03 AM.png
WUndgerground Weather Device configuration dialog.
Screen Shot 2014-12-25 at 5.13.03 AM.png (124.92 KiB) Viewed 3657 times
Screen Shot 2014-12-25 at 5.04.04 AM.png
WUnderground Hourly Forecast Device configuration dialog.
Screen Shot 2014-12-25 at 5.04.04 AM.png (116.17 KiB) Viewed 3657 times
Screen Shot 2015-02-27 at 4.54.10 AM.png
WUnderground Tides Device
Screen Shot 2015-02-27 at 4.54.10 AM.png (46.55 KiB) Viewed 3358 times
Screen Shot 2015-03-08 at 9.41.08 PM.png
Ten Day Forecast Configuration
Screen Shot 2015-03-08 at 9.41.08 PM.png (70.45 KiB) Viewed 3334 times
Screen Shot 2015-03-08 at 9.41.37 PM.png
Image Downloader Configuration
Screen Shot 2015-03-08 at 9.41.37 PM.png (58.98 KiB) Viewed 3334 times


Each device has corresponding states that can be used in Triggers, Actions, Control Pages and 'linked to' from other scripts.

Icons:
The plugin contains two condition states to use for control page icons. "Day/Night Icon" will be prepended with the characters - "nt_" when the value of the Indigo variable isDaylight is FALSE. For example, 'cloudy' during the day and 'nt_cloudy' at night. This will allow users to use multiple images. "All Day Icon" leaves the icon name unchanged. 'cloudy' stays 'cloudy'. Here is an example of day/night icon names:

weather+cloudy.png
Cloudy weather icon.
weather+cloudy.png (12.77 KiB) Viewed 3877 times

weather+nt_cloudy.png
Cloudy weather icon (night time).
weather+nt_cloudy.png (9.25 KiB) Viewed 3877 times

Disclaimer:
I've done my best to provide a stable and well-functioning plugin, but there is no guarantee that it will be error-free. For this reason, you should not rely on the plugin where personal safety is concerned.

The developer of this plugin has no affiliation with Weather Underground. Weather Underground is a registered trademark of The Weather Channel, LLC. both in the United States and internationally. The Weather Underground Logo is a trademark of Weather Underground, LLC.
wundergroundLogo_4c_horz.png
WUnderground logo
wundergroundLogo_4c_horz.png (19.54 KiB) Viewed 3813 times

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest