Skip to content

devices

DaveL17 edited this page May 15, 2019 · 4 revisions

Wunderground 7 devices are where most of the plugin’s magic happens and there are myriad device types that the plugin supports. Each weather device type has a custom-tailored configuration dialog that contains settings specific to the implementation for that individual type of device. As usual, we start by creating a new Indigo device, selecting Wunderground 7 as the Device Type. Next, select the Device Model drop-down menu and the list of currently supported devices will appear. The list of devices is arranged alphabetically. Once you have selected the appropriate device type, you should select Edit Device Settings… Selecting the Edit Device Settings… button will cause the device’s custom-tailored configuration dialog to appear. The available options will vary based on the type of device selected. The following devices are presently supported within the Wunderground 7 Plugin

Weather Device Configuration Dialog

  • WUnderground Weather
    The WUnderground Weather Device is probably the most common type of device that you will use within the plugin. It provides current Weather Conditions with short-term (day/night) forecast. The Weather Device contains the most comprehensive information available within a single plugin device, and contains aspects of data supported by the other plugin device types. For example, the Weather Device type contains forecast data for the current day plus 3 future days. If the user wants more forecast periods, then the Ten Day Forecast device should be used. The Weather Device type includes many variables related to current conditions, future conditions, yesterday's totals and so on. The location setting controls how the associated data will be sourced, whether it is through automatic detection or explicitly specified using any number of formats. See “Location Formats” for more information. There are additional settings for Weather Units, Display Units and Severe Weather Alerts.

  • 10-Day Weather Forecast
    The WUnderground Ten Day Forecast Device is much like the Hourly Forecast Device. The Ten Day Forecast Device displays forecast data for, you guessed it, the next 10 days. In this context, Day 1 is typically today and Day 2 is tomorrow. However, at some point throughout the day, we’re no longer interested in the forecast for today, in which case Day 1 becomes tomorrow. Nonetheless, each is managed internally by WU, so we needn’t worry about that. Like the Hourly Forecast Device, the Ten Day Forecast devices maintains data about temperature, humidity, wind, precipitation, etc. The location setting controls how the associated data will be sourced, whether it is through automatic detection or explicitly specified using any number of formats. See “Location Formats” for more information. There are additional settings for weather units, wind speed, wind direction and display units.

  • 24-Hour Weather Forecast
    The WUnderground Hourly Forecast Device provides weather forecast information for the next 24 hours. The 24 hour cycle begins with the time the data are downloaded, and proceed forward for 24 1-hour increments. In other words, if the data are downloaded at 16:00, the first observation will be for 17:00 and proceed in 1 hour increments to about 16:00 the following day. The forecast information includes data on forecast conditions, humidity, chance of precipitation, temperatures, and wind (among others.) There are settings for weather units—for example, standard or metric—and wind direction. The Hourly Forecast Device also includes data to support custom control page display units text and images (see Using Custom Control Page Images below for more information.) The location setting controls how the associated data will be sourced, whether it is through automatic detection or explicitly specified using any number of formats. See “Location Formats” for more information.

  • Astronomy Information
    The WUnderground Astronomy Device provides information on the phase of the moon, sunrise, sunset, and associated values. There is only one setting for the Astronomy device—location. The location setting controls how the associated data will be sourced, whether it is through automatic detection or explicitly specified using any number of formats. See “Location Formats” for more information.

  • Weather Almanac
    The WUnderground Almanac Device is a simple device that provides historical weather information for the specified location. The device will report record high, normal, and record low data for temperatures in degrees F and degrees C, as well as the year in which the record took place. There are just a couple settings for the Almanac device— including Location and Display Units. The location setting controls how the associated data will be sourced, whether it is through automatic detection or explicitly specified using any number of formats. See “Location Formats” for more information. The display units field is for placing custom labels and symbols with the data when it is displayed on control pages. For example, adding the degree symbol will change 12.3 to “12.3°” and adding a units specifier “12.3 °C” for display on control pages. Any value may be placed in this field as long as it is a valid Unicode string character.

  • Tide Forecast
    The WUnderground Tides Device provides information on high and low tide, lunar information and other data as appropriate. Presently, data are available for U.S. locations only (this is a limitation of WU data and not the plugin or Indigo.) The location setting controls how the associated data will be sourced, whether it is through automatic detection or explicitly specified using any number of formats. See “Location Formats” for more information.

  • Image Downloader (for satellite imagery)
    The WUnderground Satellite Image Downloader Device is a little bit different from the other WUnderground devices. The purpose of this device is to manage the use of weather radar images in control pages. You might ask yourself, “Self, why would I want to use the Satellite Image Downloader Device?” to which you would answer, “For instances where the image source might not always be available, the control page would then be able to display the last successful downloaded image file.” In other words, to ensure that you always have a satellite image to display on your weather control page. The location setting controls where the desired image comes from, and the destination location controls where the image will be saved. The user should then link to this image file on the local server using the format specified in the example dialog text. The construction of the image Destination Location is: /path/to/image/folder/imagename.png

  • WUnderground Radar (for "real-time" satellite imagery)
    The WUnderground Radar Device is used for displaying radar imagery through direct use of the Weather Underground API. In other words, this device will construct a radar image in near real time based on the user-specified configuration. The image will be updated at the same frequency as other weather devices. Note, unlike the WUnderground Image Downloader device, the WUnderground Radar device will use an API call for each refresh cycle (because it relies directly on the Weather Underground API). So you'll need to account for that usage in your daily totals. The image is downloaded and saved as a GIF file (WU does not provide an option to download a PNG file).

    To configure the WUnderground Radar device, you must tell it not only how the image should appear, but also the necessary location information and boundaries of the image. There are three types of location settings that you can use:

    Bounding Box:
    to use the Bounding Box image type, you must supply the latitude and longitude of the four sides of the box. It is best to begin with the latitude and longitude of your server and then provide a few extra degrees (plus and minus) which will present an image with your server at the center. Then, begin to add and subtract fractional degrees to recenter the image to taste.

    Location:
    to use the Location image type, you supply location information like you would with any other weather device. See the next section for the various available options for determining location.

  • Radius:
    to use the Radius image type, you must supply the latitude and longitude of your server and a radius value from that center point. When using the Radius type, a button will appear that will allow the plugin to obtain your latitude and longitude values from the Indigo server. The radius can be specified in either nautical miles or kilometers.

To use the image, add it to a control page as a Refreshing Image URL control. The image is placed in the Indigo Static images folder and the URL to the image should be specified using the following convention:

file:///Library/Application%20Support/Perceptive%20Automation/Indigo%207/IndigoWebServer/images/controls/static/WUradar.gif

where WUradar is the image name specified in the device configuration settings. You can copy the URL above and use it with the default image name, or change the name to match your custom setting. Note that using %20 in place of spaces is optional, but Indigo will rightly complain that a valid URL can not contain spaces (the image should still display correctly on a control page, but may not display properly in the control page editor and an error message will be displayed to the Indigo event log).

Location Formats

The location specified for each weather device type controls how data will be sourced for the device. The following location formats are currently supported by the plugin:

  • autoip
    The auto IP location parameter will attempt to provide the data that is most appropriate for the location associated with the user’s current IP address. This address is your external IP address, and not the address of your Indigo Server. This is not always the best approach and relies extensively on how accurate your ISP reports locations. For example, sometimes my auto IP location is several hundred miles away. Simply enter autoip into the location field.

  • City
    The format of the city location parameter will be dictated by whether your location is a U.S. city. Cities within the U.S. should format the location as STATE/CITY_NAME and non-U.S. cities should format the location as COUNTRY_NAME/CITY_NAME. The following formats are all examples of valid formats: CA/San_Francisco, IL/Chicago, Canada/Toronto, Canada/Quebec_City, United_Kingdom/London

  • Latitude/Longitude
    the latitude/longitude location parameter should be entered latitude followed by longitude, with the values separated by a comma (no spaces.) For example, the following formats are both valid: 48.86,2.29 or -33.86,151.22

  • ICAO Airport Station
    the ICAO airport location parameter will supply data sourced to any one of a number of ICAO reporting stations—for example, KORD (O’Hare) or CYYZ (Toronto). To find an ICAO airport locator ID for your local airport (if appropriate) go to an ICAO locator site such as Avcodes

  • Personal Weather Station
    Personal Weather Station location parameters are keyed to individual weather stations within the Weather Underground Personal Weather Station network. Each weather station has a unique identifier which should be preceded by the code pws: (for example, pws:KMNCHASK10)

  • US ZIP Code
    Lastly, the US ZIP Code location parameter can be used, of the format 12345. This is a Weather Underground feature and unfortunately, other country’s parcel post locator codes are not currently supported.