weather script in europe

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
marc hooijschuur
Member
Posts: 1
Joined: Mon Mar 22, 2004 3:12 am

weather script in europe

Post by marc hooijschuur »

can i get local weather information in europe with this script

I tried to replace the weathercomzip with place and country but that did not work.



any suggestions would be welcome



Thanks Marc
acheslow
Senior Member
Posts: 168
Joined: Wed Aug 20, 2003 3:23 pm
Location: Bothell, WA
Contact:

Post by acheslow »

Go to http://xoap.weather.com/search/search?where=london and replace london with the name of the city you want to look up. This will display an XML result with the name and location id of every matching city. Find the location ID for the city you want and put that into the WeatherComZip variable. For example, for the above query your browser would display:

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1" ?> 
- <!-- This document is intended only for use by authorized licensees of The Weather Channel. Unauthorized use is prohibited. Copyright 1995-2002, The Weather Channel Enterprises, Inc. All Rights Reserved.
  --> 
- <search ver="2.0">
  <loc id="CAXX0255" type="1">London, Canada</loc> 
  <loc id="UKXX0085" type="1">London, United Kingdom</loc> 
  <loc id="USAR0340" type="1">London, AR</loc> 
  <loc id="USKY1090" type="1">London, KY</loc> 
  <loc id="USOH0520" type="1">London, OH</loc> 
  <loc id="USTX0788" type="1">London, TX</loc> 
  <loc id="USWV0443" type="1">London, WV</loc> 
  </search>
For London, UK you would set WeatherComZip="UKXX0085"
jacco van der Ven
Senior Member
Posts: 136
Joined: Tue Oct 21, 2003 4:16 pm
Location: The Netherlands

Weather Theme

Post by jacco van der Ven »

Thanks for the link I have it running

Is there a Weather theme sample that we can download.
acheslow
Senior Member
Posts: 168
Joined: Wed Aug 20, 2003 3:23 pm
Location: Bothell, WA
Contact:

Post by acheslow »

The one I am using for my personal use has some "borrowed" graphics that wouldn't be appropriate for me to share. I'll put one together using one of the standard Cebotics themes and post it shortly.
acheslow
Senior Member
Posts: 168
Joined: Wed Aug 20, 2003 3:23 pm
Location: Bothell, WA
Contact:

Post by acheslow »

I've updated the download on my site to include a sample theme which makes use of many of the Weather device properties.



http://www.cheslow.com/modules.php?op=m ... load&cid=3
ScottBot
Site Admin
Posts: 2806
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Alan,



If you could combine the two configuration exports it would be better. The Import process resolves object identifiers (Device IDs, Property IDs, etc) between the exporting and importing systems. Although you may be able to import and export the files fine on your machine, others will not be able to unless their Device IDs (for the Weather device script) are exactly the same as yours, which is probably not too likely.



You would just need to re-export the entire thing including the original Weather items and the new Theme items.
Scott
acheslow
Senior Member
Posts: 168
Joined: Wed Aug 20, 2003 3:23 pm
Location: Bothell, WA
Contact:

Post by acheslow »

OK sorry about that. I replaced the download with a single combined export file. Please let me know if there are any problems with it.



Thanks
ScottBot
Site Admin
Posts: 2806
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

Alan,



For some reason, the configuration export file (which is really just a zip file) contains path info for the files. This is causing a problem when importing. If I remove the path info, I can import. Did you manually create the export file?



Also, I was able to get Weather Panel to show. But the other two complain about not finding atlanta_260x195.jpg and southeast_sat_720x486.jpg.
Scott
acheslow
Senior Member
Posts: 168
Joined: Wed Aug 20, 2003 3:23 pm
Location: Bothell, WA
Contact:

Post by acheslow »

Hmm. I created the export from the Export Configuration menu but then manually edited the XML files in the hbx archive to get rid of the full path info (I thought!!). For instance I changed

Code: Select all

<Property ... Value="\\Shaggy\C\Program Files\HouseBot\Config\Scripts\weather.vbs"/>
to

Code: Select all

<Property ... Value="Config\Scripts\weather.vbs"/>


I thought everything was supposed to be relative to the HB root. Can you tell what needs to be changed?



The jpegs are downloaded by the weather.vbs script. Once the script runs they should appear in the panel. Let me know if that doesn't work.
ScottBot
Site Admin
Posts: 2806
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Post by ScottBot »

The editing that you did is fine. You can actually use ^^HB_Root^^ in the path to specify the HB root path and the export utility will expand it appropriately on the destination box.



The problem seems to be that when you recreated the .hbx file it added the path to all of your files to the .hbx archive. Well actually it showed Weather.hbx\ as the path, so I'm not sure if that's really a path or not. Anyway, there's an option in Winzip when adding files to the archive as to whether to save full path info. If you create or re-create the hbx file, you need to make sure that you DON'T save full path info.



Hope that makes sense.
Scott
acheslow
Senior Member
Posts: 168
Joined: Wed Aug 20, 2003 3:23 pm
Location: Bothell, WA
Contact:

Post by acheslow »

I see. I used the native XP compression before. I've now downloaded WinZip and resaved the archive without the folder names. Hope it works this time.
Post Reply