Weather script

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
Steve Horn
HouseBot Guru
Posts: 785
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Weather script

Post by Steve Horn »

I'm unclear on whats required on Weather.com to register and basically how this script works. From their site's registration process, it looks like they want a URL to direct the data to. What am I missing? Also, it looks from the script, while editing, that I'd have to supply a Partner ID and key. This is something that they presumably assign, yes?



signed,



confused in Alabama :?
Steve
ScottBot
Site Admin
Posts: 2806
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Steve,



Alan can probably answer this exactly, but I think what you do is:
  • Go to weather.com
  • Click on the "Sign In" link at the top of the screen.
  • Create an account.
  • Weather.com will send you an email with your own personal partner ID and license key.
  • Use the ID and key in the Device.
I think that this could probably be documented somewhere.... maybe right here :wink:
Scott
acheslow
Senior Member
Posts: 168
Joined: Wed Aug 20, 2003 3:23 pm
Location: Bothell, WA
Contact:

Post by acheslow »

Yep, that's pretty much it although when you register I think it has to be from this url:



http://registration.weather.com/registr ... loap/step1



If I remember correctly if it asks for a URL they are just assuming that you will use the weather data on a website and want to know that site's URL. Since you aren't putting the data up on the web you should be able to leave that field blank or make something up.



After registration weather.com will send you a partner ID, partner key, and link to the SDK. Download the SDK and unzip the icons to your drive. Then copy/paste the partner ID and key into the top of the script where it says:

Code: Select all

'	Weather.com partner ID
WeatherComPar = "xxxxxxxx"

'	Weather.com key
WeatherComKey = "xxxxxxxx"
You will also have to configure the following:

Set the DestFolder variable to the path where your weather.com icons are located. This is also where any downloaded images will be saved.

Set the WeatherComZip variable to the postal code of the city for which you want weather data.

Lower in the script you can customize these lines:

Code: Select all

getImage "http://image.weather.com/web/radar/us_atl_metroradar_large_usen.jpg", "W_radar"
getImage "http://image.weather.com/images/sat/regions/southeast_sat_720x486.jpg", "W_sat"


For each call to getImage you pass it the URL of an image and the name of a property in which to store the path/filename of the image where it is downloaded to your drive. The Weather.W_radar and Weather.W_sat properties are already defined in the export but you can manually create additional properties and insert additional calls to getImage.



You use these images in a theme by creating a dynamic image control associated to the same device property that you passed to getImage. For instance to display the radar image you would associate the image to the Weather.W_radar property.



Hope that helps, let me know if you have any other questions.
Steve Horn
HouseBot Guru
Posts: 785
Joined: Wed Apr 02, 2003 8:10 pm
Location: Pelham AL

Post by Steve Horn »

Thanks for the expanded explanation; the URL entry threw me off and I didn't think about making something up... Doooh. :oops:
Steve
Post Reply