[mythtv-users] MythWeather

Mark Paulus mark.paulus at verizonbusiness.com
Tue Oct 24 13:49:11 UTC 2006


In my investigations, the msnbc weather api that mythweather utilizes is 
pretty flaky.  I wrote a script to query the site n times in a row, with 
a 5 second sleep between each one.  In 50 queries, I have UpdateTimes 
from all over yesterday, and nothing from today:

$ grep LastUp weather.*
weather.0:                      this.swLastUp = "10/23/2006 00:54:00";
weather.1:                      this.swLastUp = "10/23/2006 14:55:00";
weather.10:                     this.swLastUp = "10/23/2006 13:55:00";
weather.11:                     this.swLastUp = "10/23/2006 00:54:00";
weather.12:                     this.swLastUp = "10/23/2006 17:55:00";
weather.13:                     this.swLastUp = "10/23/2006 00:54:00";
weather.14:                     this.swLastUp = "10/23/2006 13:55:00";
weather.15:                     this.swLastUp = "10/23/2006 00:54:00";
weather.16:                     this.swLastUp = "10/23/2006 17:55:00";
weather.17:                     this.swLastUp = "10/23/2006 17:55:00";
weather.18:                     this.swLastUp = "10/23/2006 13:55:00";
weather.19:                     this.swLastUp = "10/23/2006 00:54:00";
weather.2:                      this.swLastUp = "10/23/2006 14:55:00";
weather.20:                     this.swLastUp = "10/23/2006 17:55:00";
weather.21:                     this.swLastUp = "10/23/2006 00:54:00";
weather.22:                     this.swLastUp = "10/23/2006 00:54:00";
weather.23:                     this.swLastUp = "10/23/2006 00:54:00";
weather.24:                     this.swLastUp = "10/23/2006 17:55:00";
weather.25:                     this.swLastUp = "10/23/2006 00:54:00";
weather.26:                     this.swLastUp = "10/23/2006 17:55:00";
weather.27:                     this.swLastUp = "10/23/2006 00:54:00";
weather.28:                     this.swLastUp = "10/23/2006 17:55:00";
weather.29:                     this.swLastUp = "10/23/2006 17:55:00";
weather.3:                      this.swLastUp = "10/23/2006 00:54:00";
weather.30:                     this.swLastUp = "10/23/2006 00:54:00";
weather.31:                     this.swLastUp = "10/23/2006 01:54:00";
weather.32:                     this.swLastUp = "10/23/2006 17:55:00";
weather.33:                     this.swLastUp = "10/23/2006 01:54:00";
weather.34:                     this.swLastUp = "10/23/2006 01:54:00";
weather.35:                     this.swLastUp = "10/23/2006 17:55:00";
weather.36:                     this.swLastUp = "10/23/2006 17:55:00";
weather.37:                     this.swLastUp = "10/23/2006 13:55:00";
weather.38:                     this.swLastUp = "10/23/2006 00:54:00";
weather.39:                     this.swLastUp = "10/23/2006 00:54:00";
weather.4:                      this.swLastUp = "10/23/2006 00:54:00";
weather.40:                     this.swLastUp = "10/23/2006 00:54:00";
weather.41:                     this.swLastUp = "10/23/2006 00:54:00";
weather.42:                     this.swLastUp = "10/23/2006 17:55:00";
weather.43:                     this.swLastUp = "10/23/2006 01:54:00";
weather.44:                     this.swLastUp = "10/23/2006 01:54:00";
weather.45:                     this.swLastUp = "10/23/2006 17:55:00";
weather.46:                     this.swLastUp = "10/23/2006 01:54:00";
weather.47:                     this.swLastUp = "10/23/2006 01:54:00";
weather.48:                     this.swLastUp = "10/23/2006 01:54:00";
weather.49:                     this.swLastUp = "10/23/2006 01:54:00";
weather.5:                      this.swLastUp = "10/23/2006 15:55:00";
weather.6:                      this.swLastUp = "10/23/2006 00:54:00";
weather.7:                      this.swLastUp = "10/23/2006 00:54:00";
weather.8:                      this.swLastUp = "10/23/2006 17:55:00";
weather.9:                      this.swLastUp = "10/23/2006 00:54:00";

Here's the script.  Just change the "acid=" parm to your area/zip code.

#!/bin/bash
if  [ x$1  = "x" ]; then
     echo "need a limit"
     exit 0
fi

i=0
while [[ $i -ne $1 ]];
do
     wget --debug --cache=off -O weather.$i 
http://www.msnbc.com/m/chnk/d/weather_d_src.asp?acid=80919
     sleep 5
     i=$((i+1))
done

Rich West wrote:
> Where in the world does it get its weather data from?  I mean, it 
> couldn't be more off for me.. :(
> 
> Now that I tackled the big problem with getting the remote to work, I 
> started getting everything else squared away.  My wife immediately 
> complained about the "current conditions" summary page being totally 
> inaccurate (radar is about right, I would guess).
> 
> For example, right now, it is saying that it is 54 degrees and partly 
> cloudy.  That is UP 3 degrees from earlier, and it is 11:15pm at night.  
> I checked the weather.com site, and it is saying (for my area, that the 
> current conditions are 46 Degrees and Cloudy).
> 
> Is there some log, some where, that can tell me what might be going on 
> (eg: if it is getting an error or encountering some other problem along 
> the way)?
> 
> -Rich
> 
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
> 
> 

-- 
Mark Paulus
2424 Garden of the Gods Rd  | Phone:  v622-5578 / 719-535-5578
0419/117 - LEC Access ; D5-1010   | FAX:    719-535-1665
Colo Springs, CO  80919    | 1800PageMCI / 1406052
AIM : mgpaulus1    /  sametime : mark.paulus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mark.paulus.vcf
Type: text/x-vcard
Size: 296 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20061024/f3adee35/attachment.vcf 


More information about the mythtv-users mailing list