Jump to content


Photo
- - - - -

[download] Module: Weather Underground Driver


  • Please log in to reply
8 replies to this topic

#1 123

123

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1978 posts
  • Location:Montreal, QC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1

Posted 03 May 2012 - 11:21 AM

Posted Image

File Name: Module: Weather Underground Driver
File Submitter: 123
File Submitted: 03 May 2012
File Updated: 03 May 2012
File Category: Premise
Author: 123
Contact: Support Topic or PM
Version: 1.3

Weather Underground Driver reports weather data collected by Weather Underground. It can report weather in Imperial or Metric units and in three languages (English/Spanish/FrenchCanadian, others are possible). It can display weather icons in any one of 12 different styles (9 standard Weather Underground styles plus 3 custom styles created by Chuck Lyons). Current conditions, a Ten-Day forecast, and Weather Alerts, are presented in Premise Browser. MiniBrowser is also supported but less information is displayed.

There are two zip archives involved; ensure you download and install both. Wunderground_V1.3.zip contains the driver and full documentation. Wunderground_Icons.zip contains twelve sets of 38 weather icons.

The WeatherUnderground driver reports approximately 55 weather parameters in the following categories:
  • Location
  • Current Conditions
  • Moon
  • Almanac
  • Ten-Day Forecast
  • Weather Alerts
Here are the reported parameters; you can create a PropertyChange script for any parameter.


-- Location --
  • City, State, Country
  • TimeZone Name and Offset
-- Current Conditions --
  • Observation Date and Time
  • Last Updated
  • Temperature
  • Summary
  • Barometric Pressure and Direction
  • Wind Speed, Gust, and Direction
  • Humidity
  • Heat Index and Wind Chill
  • Visibility
  • UV Level
  • Dew Point
  • Icon Code
-- Moon --
  • Illumination and Age
-- Almanac --
  • Temperature High and Low
-- Daily Forecast --
  • Day, Month, Day Name
  • Forecast Time
  • Temperature High and Low
  • Forecast Summary
  • POP
  • Humidity (Avg/Max/Min)
  • PPC (All/Day/Night)
  • Snow (All/Day/Night)
  • Wind Speed, Direction, and Max Speed
  • Day Icon Code
  • Verbal Day Summary
  • Night Icon Code
  • Verbal Night Summary
-- Alert --
  • Type and Description
  • Date and Time
  • Expiry Data and Time
  • Message, Phenomena, and Significance

Click here to download this file

#2 123

123

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1978 posts
  • Location:Montreal, QC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1

Posted 03 May 2012 - 11:41 AM

This driver has been working well for me for over two months. I hope it works equally well for others.

I noticed that some of the data, retrieved from Weather Underground, can be reported using a non-numeric "NA" string indicating the information was unavailable. In the driver's documentation, I supplied an example of a PropertyChange script that tested if the value is numeric prior to proceeding with a calculation. Keep this in mind when writing your own scripts otherwise you run the risk of testing if temperature "NA" is greater than 80, or similar nonsensical comparison, and Premise will, of course, cause the script to halt at the offending line.

Weather Underground does not consistently use "NA", or at least it do not when I was developing the driver a few months ago, and I've seen "N/A" reported (for Humidity). They also use "-9999" to report an unavailable value. Again, keep this in mind when using the driver's properties and do not assume values will always be numeric.

Edited by 123, 03 May 2012 - 11:44 AM.


#3 w84no1

w84no1

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 110 posts
  • Location:Central Virginia
  • Experience:average
  • Software:EventGhost, Premise
  • Tech:Z-Wave
  • Audio:AirPlay
  • Video:XBMC
  • CCTV:ip
  • Phone:OBi100/110

Posted 03 May 2012 - 03:43 PM

Thanks for posting. I was going to add Google weather to my jQuery UI, but it only has a 3 day forecast.

#4 123

123

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1978 posts
  • Location:Montreal, QC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1

Posted 03 May 2012 - 05:57 PM

The attached diagram displays the driver's object's and properties. On this day (May 3, 2012) Grand Rapids, MI is experiencing severe weather with no less than four Weather Alerts. Grand Rapids doesn't know it but it makes for a great example of the driver's ability to report multiple Weather Alerts.

Eagle-eyed folks might notice that the driver lists 11 days. The eleventh day does not contain any data. It is a vestigial remnant, dating back to when Weather Underground delivered 11 days of weather data for Canadian cities (now all cities get 10).

Attached Files


Edited by 123, 03 May 2012 - 06:01 PM.


#5 123

123

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1978 posts
  • Location:Montreal, QC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1

Posted 03 May 2012 - 06:02 PM

Premise Browser view of weather in Grand Rapids.

Attached Files



#6 123

123

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1978 posts
  • Location:Montreal, QC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1

Posted 03 May 2012 - 06:04 PM

Premise Browser view of weather when a weather icon is clicked. In this case, the current day's weather icon (either day or night) was clicked. The day's descriptive weather forecast is displayed in the central pane.

Attached Files



#7 123

123

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1978 posts
  • Location:Montreal, QC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1

Posted 03 May 2012 - 06:05 PM

Premise Browser view of Weather Alerts. This dialog box is displayed when the red "Weather Alert" message is clicked.

Attached Files



#8 samgreco

samgreco

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 472 posts
  • Location:Villa Park, IL
  • Experience:average
  • Software:Premise
  • Tech:X10-PLC, X10-RF, UPB
  • Audio:Xantech
  • Video:SageTV
  • Phone:FreePBX

Posted 03 May 2012 - 11:43 PM

Your usual awesomeness 123. Installed and rethemed. Works absolutely perfectly. Only thing I haven't been able to figure out is how to change the text color in the Conditions panel. Everything else worked flawlessly.

Attached Files



#9 123

123

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1978 posts
  • Location:Montreal, QC
  • Experience:average
  • Software:Premise
  • Hardware:Elk M1

Posted 04 May 2012 - 06:59 AM

Nice! I like that 50's Retro-Future look!

The color of the font in the Conditions pane is hard-coded and not governed by a Selector.

I used a TABLE element to organize the property labels and values into two even columns. As a result, the TABLE refused to inherit the CSS properties of the DIV it is residing in (the Conditions pane; governed by a Selector) and I had to resort to using inline CSS. Let me know if you know of a way to force the TABLE to inherit the DIV's CSS.

To alter the hard-coded font color, navigate to:
Modules > WeatherUnderground > DisplayManager > DisplaySummary

Go to line 8 and change the color to whatever works best for you. This line governs the appearance of the text for detailed Current Conditions.

sHTML = sHTML & ("<table border=0 STYLE=""Color:white;font-family:Tahoma;font-size:10pt;font-weight:normal;line-height:15px;"">" & vbcrlf)

Repeat the modification on line 83.This line governs the appearance of the text for a descriptive daily weather forecast.

FYI: As it stands, the font size is maxed out for the given space. If you increase it, the TABLE expands in height and the last row gets cropped by the DIV.


PS
Given that you have it up and running, you've confirmed my installation instructions are effective. :)

Edited by 123, 04 May 2012 - 08:46 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users