View Full Version : weather.com weather extractor for mlbdude2 1.8.7 (v1.0.1 / July 6)
nielm
07-06-2004, 09:12 AM
Attached is a java weather extractor for the weather.com XML feed...
Features: Global coverage
Imperial or metric units
customisable number of days to forecast (up to 10)
more forcast data (%chance of precipitation, wind, humidity)
Instructions in readme.txt in attached zipfile.
Any problems, post here, but note the known bugs section of the readme.
Note that because the weather icons are loaded using the description of the weather, not all icons are available in the mbdude2 skin. If an icon is not found to match the description, no icon will be shown
Weather.com's descriptions are very varied, and can include descriptions such as 'AM Sunny / PM Showers', so it is nearly impossible to create icons to match all descriptions.
However, To work around this, you need to create icons matching the missing desctiptions in the folder:
SageTV/STVs/OriginalV2/MlbDude/Default/weather
Update -- version 1.1.1 / July 7 Added more debugging info in readme.txt
Implement 1hr cache to speed up display if weather has been obtained recently, and to reduce load on weather.com's servers
Add forecast Wind, Humidity and % chance of precipitation
Update -- version 1.1.2 / July 8 make Precipitation and Humidity smaller, but add padding to force word-wrap.
Use non-breaking spaces where appropriate
Jack_PVR
07-06-2004, 09:41 AM
No readme,txt in the file....
Maybe you could post it here?
nielm
07-06-2004, 09:47 AM
D'oh -- updated attachment!
(I prefer to keep installation instructions in zipfile so that they don't go out of date if/when I release a new version)
Jack_PVR
07-06-2004, 09:58 AM
Thanks nice job, installed and working!!
kevthor
07-06-2004, 04:51 PM
I tried this and followed the instructions however when I click on weather in sage, I just hangs with the text "Loading..."
Any suggestions?
nielm
07-06-2004, 05:28 PM
Did you try running the batch file manually (the run a test part of the readme)?
Were you able to get weather info with the original getweather.exe?
What location code are you using in the sage.properties?
kevthor
07-06-2004, 05:37 PM
Sorry it was my own mistake. I didn't have the Mlbdube folder in the original2 folder.
It is working now, Thanks.
oh btw: is there any way fix the bug "Sometimes the weather.com descriptions don't match the available icons in the MLBdude skin, and a blank icon is shown..."
Thanks
Capt Dean
07-06-2004, 05:58 PM
Pretty sure I followed everything to the letter..... "Pretty sure" that is because my manual test yields the following:
Exception in thread "main" java.lang.NoClassDefFoundError: getweather3
Any ideas?
Thanks in advance
Alex0230
07-06-2004, 07:35 PM
I was having that issue when running the batch file because it wasn't taking my parameters....try just replacing the %1 and %2 with your zip and Weather.txt respectively in the batch file.
"C:\jre142_05\bin\java" getWeather3 85204 Weather.txt %units% %numdays%
If that still doesn't work, it may be a jre version issue...but less likely. If you think it is a jre issue, you make need atleast the 1.4.2_5 package available here:
https://sdlcweb2a.sun.com/ECom/EComActionServlet;jsessionid=sdlcweb2a.sun.com-5b41%3A40eb5666%3Ab55c19cc856c150
Capt Dean
07-06-2004, 08:07 PM
Tried exactly as you suggest... had jre _04 removed and installed up to _05.
Even edited the .bat precisely as you detail.
I still get the same exception error.
Alex0230
07-06-2004, 08:21 PM
Are you running the command from the commandline, if so try running it from being in the same directory as the batch file.
I was getting different messages if I tried to run the batch file from different starting points.
------------------------------------------------------------------------------
C:\Documents and Settings\Alex>"C:\Documents and Settings\Alex\Desktop\New Folde
r (2)\weathercom_getweather\getweather.bat"
ECHO is off.
Exception in thread "main" java.lang.NoClassDefFoundError: getWeather3
C:\Documents and Settings\Alex>cd Desktop
C:\Documents and Settings\Alex\Desktop>cd "New Folder (2)"
C:\Documents and Settings\Alex\Desktop\New Folder (2)>cd weathercom_getweather
C:\Documents and Settings\Alex\Desktop\New Folder (2)\weathercom_getweather>getw
eather.bat
ECHO is off.
invalid units: 5
GetWeather3 -- weather.com extractor -- version 1.0.1
Usage:
getWeather3 <addr> [outfile] [units] [days] [fulldetails]
where:
addr=http://xoap.weather.com/weather/local/LOCATIONID
or addr=LOCATIONID (weather.com location code or US zip)
or addr=file:test.xml (local xml file for debugging purposes)
outfile=weather.txt
units=m for metric units, =s for imperial
days=number of days to forecast (up to 10)
fulldetails -- output all information -- makes incompatible weather.txt
C:\Documents and Settings\Alex\Desktop\New Folder (2)\weathercom_getweather>
Capt Dean
07-06-2004, 09:55 PM
I had been running it directly from the path where the batch file was located.
I ran it "indirectly" from my desktop folder.....
same result: Exception error
Alex0230
07-06-2004, 10:33 PM
Now I feel like I'm just running you around in circles...I'm sorry, I'm just trying to give suggestions based off my experience. If I'm frustrating you...lol, just tell me to back off. ;)
At this point I don't see it being an issue with java libraries, just how it's being called....very strange you know. Nielm based the program off the one I wrote, with the same library calls..so if mine runs on your machine, so "should" his based off library compatibility. I was able to replicate your issue by just how I ran the command in the command line. But was still able to run it correctly on the same machine by just changing the way I ran it from the command line.
Have you tried using it in Sage despite the problems with the manual execution...hint here, if it takes more than 15 seconds, just go back to the main menu, it probably didn't work.
-----------------------------------
Sage Props:
mlbdude/weather_exe=\\STVs\\OriginalV2\\MlbDude\\getweather.bat
mlbdude/weather_exe_java=false
mlbdude/weather_file=\\STVs\\OriginalV2\\MlbDude\\Weather.txt
mlbdude/weather_provider=www.weather.com
mlbdude/weather_url=
mlbdude/weather_zip=<location_code>
ui/main_menu_weather_enabled=true
ui/main_menu_weather_text=Weather
Capt Dean
07-06-2004, 10:42 PM
Originally posted by Alex0230
Now I feel like I'm just running you around in circles...I'm sorry, I'm just trying to give suggestions based off my experience. If I'm frustrating you...lol, just tell me to back off.
Are you kidding me! :) You're helping me. Why would I get frustrated with you? I REALLY appreciate your help.
Yes, I have tried running it in Sage. It just hangs.
Let me verify. I unzip the weather folder.... copy all the files into the mlbdude folder where the getweather.exe file is and set the parameters in the .bat and in the sageproperties?
I've done all this. Man, what can I be messin' up here?
Alex0230
07-06-2004, 10:51 PM
Did you do it with Sage completely closed? Any changes to the params in the props file aren't taken if sage is running/sleeping.
This is how I would do it, see if you haven't tried an of these:
-I would say try unzipping the files in to the mlbdude folder where getWeather is.
-Make the change to your batch file only so you have to specify the path to the java exe. ex: C:\jre_142_05\bin\java getWeather3 %1 %2 %units% %numdays%
-Make the changes to your props file, exactly like this, but with your zip:
mlbdude/ weather_exe=\\STVs\\OriginalV2\\MlbDude\\getweathe
r.bat
mlbdude/weather_exe_java=false
mlbdude/weather_file=\\STVs\\OriginalV2\\MlbDude\\Weather.txt
mlbdude/weather_provider=www.weather.com
mlbdude/weather_url=
mlbdude/weather_zip=85009
ui/main_menu_weather_enabled=true
ui/main_menu_weather_text=Weather
-Restart Sage
-Cross Fingers
redman
07-07-2004, 01:22 AM
You Rock.
That is brilliant. I finally have everything starting to work properly.
UI on 350 output with the new drivers, Nice new skin, and now real weather working.
Thanks to you and everyone else.
:p
nielm
07-07-2004, 02:58 AM
Originally posted by Capt Dean
Exception in thread "main" java.lang.NoClassDefFoundError: getweather3
The error message is indicating that java.exe cannot find the getWeather3.class file. Normally you would not see this error if you are running the .bat file from the directory where the getWeather3.class file is.
Is that a direct copy of the error message -- because the the class name is case-sensitive, and it should be getWeather3 (note the capital 'W').
If so it seems that the class name is being magically translated to all lower case, and so the java.exe cannot find it...
Try putting getWeather3 in quotes ("getWeather3") in the batch file as a possible workaround and see if the manual test works...
(I tested on W2K and WXP -- are you running W98/ME?)
nielm
07-07-2004, 03:09 AM
Originally posted by kevthor
is there any way fix the bug "Sometimes the weather.com descriptions don't match the available icons in the MLBdude skin, and a blank icon is shown..."
quick answer: the icons are in:
SageTV/STVs/OriginalV2/MlbDude/Default/weather
and the names of the icons need to match the descriptions -- create new icons to match the missing descriptions.
long answer:
The weather icons are currently loaded based on the description.
Weather.com's descriptions are very varied, and can include descriptions such as 'AM Sunny / PM Showers', so it is nearly impossible to create icons to match all descriptions.
However, weather.com does include a weather icon ID in the XML feed, and I am working with mlbdude to be able to pass this icon ID to the STV, so that he can load an image from weather.com's icon set.
So, it will be fixed, eventually...
nielm
07-07-2004, 07:20 AM
Update -- version 1.1.1 / July 7 Added more debugging info in readme.txt
Implement 1hr cache to speed up display if weather has been obtained recently, and to reduce load on weather.com's servers
Add forecast Wind, Humidity and % chance of precipitation
Download here (http://forums.freytechnologies.com/forums/showthread.php?postid=48165#post48165)
nielm
07-07-2004, 07:27 AM
Attached is a Screenshot with the additional information shown...
mlbdude
07-07-2004, 07:51 AM
I had a 1hr cache in the .Net one as well. However, I removed it since the weather (at least in my area) is prone to sudden change and it was nice to be able to jump in and see an update.
Can this be configurable somehow?
nielm
07-07-2004, 08:08 AM
The 'cache' is the generated weather.txt file -- it is is not there, then it has to get new data, if it is there, then the timestamp is checked, so a very simple override is to delete the weather.txt file!
Perhaps you could add a 'refresh' button in the STV which deletes the weather.txt file before running getweather, or alternatively it could call getweather with an extra argument 'nocache' to force an update (obviously this would need an updated of all getweather programs to recognise this argument!)
(the main reson for the cache was because I kept on scrolling to the right to see future forecasts, then scrolled too far back to the left, taking me accidentally back to the main menu, so if I wanted to go back to the weather, I had to wait for another download!)
mlbdude
07-07-2004, 08:15 AM
Sounds good. The caching in my version uses the created date of the Weather.txt file so a "Refresh" from Sage should work fine.
Capt Dean
07-07-2004, 03:03 PM
Originally posted by nielm
The error message is indicating that java.exe cannot find the getWeather3.class file. Normally you would not see this error if you are running the .bat file from the directory where the getWeather3.class file is.
Is that a direct copy of the error message -- because the the class name is case-sensitive, and it should be getWeather3 (note the capital 'W').
If so it seems that the class name is being magically translated to all lower case, and so the java.exe cannot find it...
Try putting getWeather3 in quotes ("getWeather3") in the batch file as a possible workaround and see if the manual test works...
(I tested on W2K and WXP -- are you running W98/ME?)
note an exact quote. It actually is getWeather3
Tried the quotes. no good.
Running XP.
Maybe note, I'm doing this in client.
Brett
07-07-2004, 09:00 PM
Originally posted by nielm
Attached is a Screenshot with the additional information shown... Your screenshot has a different font size for the data below the pictures, how did you make it smaller?
nielm
07-08-2004, 01:43 AM
Originally posted by Capt Dean
not an exact quote. It actually is getWeather3
Tried the quotes. no good.
Maybe note, I'm doing this in client.
I also running it on a client in XP...
Can you try running a command prompt, then cd to the STVs/OriginalV2/mlbdude directory (where the getweather3.class file is) and run:
java getWeather3
java -cp . getWeather3
If you get 'java is not recognised as a command', then add the full path to the java.exe (eg "c:\program files\java\j2re1.4.2_03/bin/java.exe")
If one of these works, you should get a help message from getWeather3 -- update the .bat file with the command line that works!
nielm
07-08-2004, 01:53 AM
Originally posted by ThatGuy
Your screenshot has a different font size for the data below the pictures, how did you make it smaller? Don't know! I think I am using the default fonts sizes in the .properties file, but they should auto-scale
A quick test shows that the relative font size (and the amount of weather info displayed) depends on the window height, but it changes in 'jumps', so in some resolutions, the fonts will be relatively larger, leading to cut-off... in 1024x768, I get everything shown, while in 800x600, I get some cut-off...
In non-full screen mode, changing the width also helps...
JasonJoel
07-08-2004, 04:48 AM
Yeah, all of my 'precipitation' lines are cut off because the font is too big. :(
Also, there are no 'weather pictures' for certain forecasts (like isolated thunderstorms). I assume the picture just hasn't been made yet on those...
Jason
nielm
07-08-2004, 06:25 AM
Originally posted by JasonJoel
Also, there are no 'weather pictures' for certain forecasts (like isolated thunderstorms). I assume the picture just hasn't been made yet on those...Known bug -- documented in readme.txt :)
See this post:
http://forums.sage.tv/forums/showthread.php?postid=48321#post48321
(sorry, can't do much about the font size :()
gotuitdan
07-08-2004, 07:24 AM
Nielm:
Suggestion on the font size problem, as I have it to.
Could you shorten "precipitation" to "precip."? That would leave room for the actual percentage for those of us with the font size problem...
thanks!
dan.
Brett
07-08-2004, 08:19 AM
Also for the missing icons renaming the pictures in the weather folder fixes this for anyone curious.
nielm
07-08-2004, 09:32 AM
Originally posted by gotuitdan
Could you shorten "precipitation" to "precip."? Done:
Update -- version 1.1.2 / July 8 make Precipitation and Humidity smaller, but add padding to force word-wrap.
Use non-breaking spaces where appropriate
Download here (http://forums.freytechnologies.com/forums/showthread.php?postid=48165#post48165)
Capt Dean
07-08-2004, 09:33 AM
Originally posted by nielm
I also running it on a client in XP...
Can you try running a command prompt, then cd to the STVs/OriginalV2/mlbdude directory (where the getweather3.class file is) and run:
java getWeather3
java -cp . getWeather3
If you get 'java is not recognised as a command', then add the full path to the java.exe (eg "c:\program files\java\j2re1.4.2_03/bin/java.exe")
If one of these works, you should get a help message from getWeather3 -- update the .bat file with the command line that works!
Using java -cp . getWeather3 worked. Thanks
heirway
07-08-2004, 06:02 PM
All seems to be working except I receive no icon for "Isolated Thunder Storms".
mlbdude
07-08-2004, 07:32 PM
Icons are currently based on condition title. If you are missing one, copy one in the weather images directory to match that condition. The next version will work more integrated with the weather.com data but until then that is the only option.
Nielm and mlbdude,
works beautifully - thanks for your efforts it is very much appreciated.
I think I'll dump the weather forecast as a favourite now.
Jan
cmaffia
07-09-2004, 04:30 AM
Not sure why it took a reboot to make this work but it did.
Great job!
ntmitche
07-11-2004, 12:15 PM
I can't get this to work for me at all. I have the .bat file setup so that it creates a correct weather.txt file. The problem I am having is that I cannot get the sage program to add a weather button on the main menu. I have added the code into the sage.prperties file and It stays in there when I close sage and look at it again. Am I missing something or...? thanks for any help
Alex0230
07-11-2004, 12:30 PM
You need to close sage completely first before editing the props file. Sage rewrites the properties file on close, so if you don't close it first....all your changes will get overwrriten. From what you said, it sounded like that was the problem.
If you have custom5 mapped on your remote, you can try that....just to verify you have the correct STV loaded. Custom5 in the MlbDude STV loads the weather module. You'll need the latest MlbDude STV to get the weather module running.
http://forums.freytechnologies.com/forums/showthread.php?s=&threadid=5755
dagar
07-11-2004, 07:53 PM
I have a Sage-customization-noobie (TM) question:
Can this mod work with the mlbdude combo-mod?
Brett
07-12-2004, 07:59 AM
No, the weather module is not yet in that mod. They are working on ways to make plugins work so that this will not be a problem in the future.
I noticed these 3 lines in the weather.txt file:
curr_recorded_at=
curr_updated=
curr_humidity=
Since there is a large empty space above "Data provided by..." in the mlbdude skin, I think it would be nice if this information could be added in that area somehow.
The data for my area sometimes comes from an airport 20 miles away, other times from one 60 miles away. So, it would be nice to now how close the info is to home.
Also, even if the getweather app retrieves a new file, the data providers only update the info periodically so it could be several hours old. So, it would be nice to know that also.
And, of course, the current humidity would seem logical to have displayed along with the current conditions, temp, and wind speed.
Could these 3 extra items be added to the display, or would it add too much to the complexity of working with other weather add-ins?
heffe2001
07-16-2004, 01:17 PM
Is there a way with this mod to actually add a button to the main menu for the weather? Or will that be in a later version of Mlb's main script?
I have custom5 programmed on a button, but not having it on a menu you can see is a WAF killer for me...
Coolwave
07-16-2004, 01:20 PM
All you need is these two lines in your properties files and Weather will show up on the main menu.
ui/main_menu_weather_enabled=true
ui/main_menu_weather_text=Weather
dcannon
07-16-2004, 01:48 PM
I created to new icons for use with MLBDude weather module. These are for the "Scattered T-Storms" and "Isolated T-Storms" description from the weather.com plug-in. The graphic is modeled from the graphics weater.com uses, but I used the style from the existing graphics.
On a side note, for the descriptions that contain illegal file name characters characters; can the code that displays the icons use a string compare to direct anything with for instance a "/" to use a different legal character instead, then just name the icon with the substitute character. Another way would to use a properties file that uses a string compare to link to a properties file entry, then a file could be titled anything, and could limit the number of repetitve images with different names.
mlbdude
07-16-2004, 01:58 PM
Originally posted by dcannon
I created to new icons for use with MLBDude weather module. These are for the "Scattered T-Storms" and "Isolated T-Storms" description from the weather.com plug-in. The graphic is modeled from the graphics weater.com uses, but I used the style from the existing graphics.
On a side note, for the descriptions that contain illegal file name characters characters; can the code that displays the icons use a string compare to direct anything with for instance a "/" to use a different legal character instead, then just name the icon with the substitute character. Another way would to use a properties file that uses a string compare to link to a properties file entry, then a file could be titled anything, and could limit the number of repetitve images with different names.
It is already doing this for that I believe (can't confirm till I get home). Look for an ~ in the existing icons. I think that will turn into a /.
dcannon
07-16-2004, 02:09 PM
I did see the ~, but I tried creating an icon for "Rain/Thunder" with a ~ instead, but it didn't display. The description may have spaces in it though. I will check it out and post back.
EDIT: The description did have spaces in it. I changed the file name of the icon. It didn't display though until Sage had been completely shut down, then restarted. Sleeping didn't make it appear. Thanks MLBDude
mlbdude
07-16-2004, 02:12 PM
I could also be replacing another character.
dcannon
07-16-2004, 02:21 PM
Another great implementation similar to weather.com would the use of the moon in the icons instead of the sun for "tonight" forecasts
wwright129
07-17-2004, 07:21 AM
hello, all
O.K so I have successfully run the getweather.bat file via command prompt and it generated the correct output file"weather.txt" So I know thats working. Then I shutdown sage and edited the properties file? I just cut and pasted the info from this thread and replaced the location with my zip. Then started sage but I do not see anything related to weather. So any thoughts on why.
Here is the appropriate part of the props file:
max_uptime=54261176
mlbdude/background=MlbDude\\default\\background.png
mlbdude/epg_selected_color=0xcccccc
mlbdude/epg_timeout=false
mlbdude/epg_title_color=0xffffcc
mlbdude/main_currently_recording=false
mlbdude/main_upcoming_recordings=false
mlbdude/mini_guide_look_ahead=true
mlbdude/osd_color_border=false
mlbdude/right_image_root=\\STVs\\OriginalV2\\MlbDude\\Default\\
mlbdude/selected_image=MlbDude\\default\\menu-selected.png
mlbdude/selected_menu_font_color=0xffffcc
mlbdude/show_menu_scroll_icons=true
mlbdude/weather_exe=\\STVs\\OriginalV2\\MlbDude\\getweather.bat
mlbdude/weather_exe_java=false
mlbdude/weather_file=\\STVs\\OriginalV2\\MlbDude\\Weather.txt
mlbdude/weather_provider=www.weather.com
mlbdude/weather_url=
mlbdude/weather_zip=<32909>
mmc/always_tune_channel=false
Thanks, wwright129
Jakebucky
07-17-2004, 07:33 AM
With Sage completely off, add this to your property file:
ui/main_menu_weather_enabled=true
ui/main_menu_weather_text=Weather
wwright129
07-17-2004, 09:31 AM
Thanks that worked.
One other thing, it's not updating automatically, I have to delete the weather.txt file and run the getweather.bat file manually, as sage does not grab it after I've deleted the weather.txt file? I just says retrieving data, but never retrieves it?
Thanks again, wwright129
broderp
07-17-2004, 09:58 PM
Can this Module be made to work WITHOUT the entire skin upgrade?
I kinda like the OEM skin as is (Don't want all the added stuff yet from the skins) and the only thing missing is a weather module like myHTPC has.
Can a version of this be made to install separate from all other skins?
mlbdude
07-18-2004, 05:57 AM
The technology does not currently exist to make features available as "modules". You have to take all or nothing.
broderp
07-19-2004, 07:39 AM
Originally posted by mlbdude
The technology does not currently exist to make features available as "modules". You have to take all or nothing.
Symantics. Your skin is actually a "module" that contains tons of upgrades and cool features, but you could have just as easly made it with ONE solitare feature, say the MINI GUIDE, and nothing else.
All I really mean is that before anyone takes this awesome "module" and incorporate it into yours, MAL's, or OPUS4's (Maldude), they PLEASE make it work with the DEFAULT SAGE 2.0 SKIN that we get with SAGE 2.0 from the "box".
I think it would provide a nice "test" as well should issues arrise with other Skins, and not the OEM one. Kind of like a "control".
Or is what your saying is that this Weather module was created using your (or someone elses) skin, hence the need to have the skin already installed for this to work?
mlbdude
07-19-2004, 07:57 AM
I suppose you could create dozens of skins based on the default one with just one of the features in it. Maybe users will want two of the features so there are some more. It is extremely difficult to integrate a single menu into a core STV right now let alone keeping it up to date as bugs are fixed.
Once Frey updates the core to allow us to release individual Menu's as modules it will be more what you are looking for.
ErsatzTom
07-19-2004, 09:21 AM
Relentless. Or maybe I should say RELENTLESS. ;)
t
heirway
07-20-2004, 10:52 AM
When I bring up the weather screen the Precip & Humidity display on the same line and do not line up properly. Does anyone know why this is happening?
heffe2001
07-20-2004, 01:50 PM
Thanks for the help guys, it's working 100% and it's on my main menu :).
McTurok
07-22-2004, 09:24 PM
Originally posted by dcannon
I created to new icons for use with MLBDude weather module. These are for the "Scattered T-Storms" and "Isolated T-Storms" description from the weather.com plug-in. The graphic is modeled from the graphics weater.com uses, but I used the style from the existing graphics.
On a side note, for the descriptions that contain illegal file name characters characters; can the code that displays the icons use a string compare to direct anything with for instance a "/" to use a different legal character instead, then just name the icon with the substitute character. Another way would to use a properties file that uses a string compare to link to a properties file entry, then a file could be titled anything, and could limit the number of repetitve images with different names.
Any idea where you all are getting those weather icons from? I'd like to see a source for them all and make some better ones.
I'm looking at three days in a row for "partly sunny" skies and the weather icon is just of the sun. Not quite accurate enough for me.
So I'd like to design a few better discriptive ones for myself and I will share them here when I've completed for others to use if they chose.
Thanks
dcannon
07-23-2004, 02:03 PM
I just took the icons that came with the MLBDude skin and combined a couple (the sun and showers/thunder storm images) and gave them titles based on weather.com descriptions.
allesad
07-25-2004, 12:38 PM
I just completed the install of mlbdude 1.8.7 with the lastest weather.com extractor.
While in SageTV, I only get weather icons for my current day WX, and the last 2 days of the 5 day forecast...the other 3 days are blank any idea why? I seem to have all the weather icons in the directory.
Also, I selected "s" for Imperial units of measure in the .bat file and saved it. When I test run the program from the CMD prompt, the weather.txt file reads in Metric units, as does SageTV.
Appreciate any help.
McTurok
07-25-2004, 01:11 PM
Maybe there aren't images for those types of weather days. Look up in your weather images directory for images with the same discription as on the 3 that are missing.
allesad
07-25-2004, 03:44 PM
I checked the weather sub-directory under MlbDude\Default2\Weather and I have 68 files(.png).
Nothing unique about the weather here in KY.
Figured I change the zip code to 89701 and re-run..bingo 5 days of WX Icons. The I changed it to 90210...one day missing (AM Clouds / PM Sun).
So I guess not all the icons exist for all the WX conditions...
coppit
07-25-2004, 04:55 PM
First, thanks for this.
Second, a bug: Scattered T-storms image is missing.
McTurok
07-25-2004, 05:02 PM
Your missing my point.... If you looked a few pages back in this thread you will see someone posted 2 new images that were missing. Your issue was one he was having too so he made up to new ones and they now are used when the weather is given the status of "Scattered T-Storms" for example.
Understand?
You have to see the status of that day you are missing the image for.
"Scattered T-Storms"
Therefore you MUST have an image called "Scattered T-Storms.png" in your weather images folder.
Dig deeper into your issue. Or atleast give us more information.
Edit: started typing this before the above post was made by coppit.
coppit
07-25-2004, 07:19 PM
nielm,
As a courtesy to people whose eyes are buggin out from reading 20+ pages on the mlbdude thread, do you mind putting the filename=weather description information on the first post? (At least until a more reliable method is found)
Thanks!
ukmgranger
07-28-2004, 07:17 AM
Does Sage automatically update the weather when you go into the weather page, or do I have to set up a .bat file to download the weather every hour or so?
The only way I have managed to get it to work so fas is thus:
created a .bat file (in the same directory as the getweather.bat file) that contains:
getweather.bat ukxx0085 weather.txt
By running this I seem to be able to download the correct weather which Sage can read. If I remove the 'weather.txt' file from the directory Sage does not download a new one.
Here are my properties:
mlbdude/=weather_exe\=\\STVs\\OriginalV2\\MlbDude\\getweathe
mlbdude/auto_close_osd_options=true
mlbdude/background=MlbDude\\default\\background.png
mlbdude/epg_selected_color=0xcccccc
mlbdude/epg_timeout=false
mlbdude/epg_title_color=0xffffcc
mlbdude/main_currently_recording=false
mlbdude/main_upcoming_recordings=false
mlbdude/mini_guide_look_ahead=true
mlbdude/osd_color_border=false
mlbdude/right_image_root=\\STVs\\OriginalV2\\MlbDude\\Default\\
mlbdude/selected_image=MlbDude\\default\\menu-selected.png
mlbdude/selected_menu_font_color=0xffffcc
mlbdude/show_menu_scroll_icons=true
mlbdude/use_file_music_library=false
mlbdude/use_mini_guide=true
mlbdude/weather_exe=\\STVs\\OriginalV2\\MlbDude\\weather.bat
mlbdude/weather_exe_java=false
mlbdude/weather_file=\\STVs\\OriginalV2\\MlbDude\\Weather.txt
mlbdude/weather_provider=www.weather.com
mlbdude/weather_url=
mlbdude/weather_zip=<UKXX0085>
Any help would be grand!
nielm
07-28-2004, 07:38 AM
Originally posted by ukmgranger
[B]Does Sage automatically update the weather when you go into the weather page
yes -- provided that the weather.txt file is more than 1 hour old, otherwise it will use the cached data.
The following property should not exist (but will not cause any harm if it does):mlbdude/=weather_exe\=\\STVs\\OriginalV2\\MlbDude\\getweatheand the flename in the following property should be getweather.batmlbdude/weather_exe=\\STVs\\OriginalV2\\MlbDude\\weather.batCheck the readme in the zipfile for the correct property names.
Diginerd
07-28-2004, 01:40 PM
If you set up a windows schduled task to delete the weather.txt file say every 5 minutes, would that decrease the polling interval?
mlbdude
07-28-2004, 02:05 PM
In the next release of the STV you will also be able to do a refresh which will delete the file and rerun. Weather in my area changes very quickly too :).
ukmgranger
07-29-2004, 04:53 AM
This is driving me insane!!
I can get the 'getweather.bat' file to download a weather report, but Sage will not update a weather report on its own. If there is no 'weather.txt' file in the mlbdude directory Sage just says 'Loading.......' and does nothing.
I added the 'start /wait cmd /k' prefix to my .bat file, but no cmd boxes appear when I click weather in Sage.
I have done all the run from cmd tests as indicated in the readme, but to no avail.
Here is my getweather.bat:
@echo off
rem numdays is number of days to forecast -- between 1 and 10
set numdays=5
rem units is metric (m) or standard/imperial (s)
set units=m
rem %1 is weather.com url or location code
rem %1 is output file name (weather.txt)
echo %1
start /wait cmd /k java "getWeather3" UKXX0085 weather.txt %units% %numdays%
rem For debug purposes, add the following before the
rem 'java "getWeather3"' ... command:
rem 'start /wait cmd /k '
rem This will cause a command window to pop up containing
rem the output of the getWeather command -- useful
rem for debugging within SAGE.
rem Close this command window by typing "exit"
Here are the relevant parts of my .properties file:
mlbdude/auto_close_osd_options=true
mlbdude/background=MlbDude\\default\\background.png
mlbdude/epg_selected_color=0xcccccc
mlbdude/epg_timeout=false
mlbdude/epg_title_color=0xffffcc
mlbdude/main_currently_recording=false
mlbdude/main_upcoming_recordings=false
mlbdude/mini_guide_look_ahead=true
mlbdude/osd_color_border=false
mlbdude/right_image_root=\\STVs\\OriginalV2\\MlbDude\\Default\\
mlbdude/selected_image=MlbDude\\default\\menu-selected.png
mlbdude/selected_menu_font_color=0xffffcc
mlbdude/show_menu_scroll_icons=true
mlbdude/use_file_music_library=false
mlbdude/use_mini_guide=true
mlbdude/weather_exe=\\STVs\\OriginalV2\\MlbDude\\getWeather.bat
mlbdude/weather_exe_java=false
mlbdude/weather_file=\\STVs\\OriginalV2\\MlbDude\\Weather.txt
mlbdude/weather_provider=www.weather.com
mlbdude/weather_url=
mlbdude/weather_zip=<UKXX0085>
As far as I can see - all is well. Someone please call me a fool and point out some really stupid error!! ;)
mlbdude
07-29-2004, 05:00 AM
Try making the case of the Weather.txt in your properties file to weather.txt. It looks like that is how you are generating the file.
ukmgranger
07-29-2004, 05:20 AM
Thats not really where the problem is occurring. If there is a weather.txt file that has been downloaded manually, Sage displays this fine. It is only when Sage has to initiate the downloading of a new weather.txt file that he problem occurrs.
I did try your solution however and it didn't work.
I'm starting to strugle - this is one of my missus' favorite features.
nielm
07-29-2004, 06:12 AM
Originally posted by ukmgranger
I added the 'start /wait cmd /k' prefix to my .bat file, but no cmd boxes appear when I click weather in Sage.
Your mlbdude/weather_exe property line is probably still incorrect...
The properties lines as shown in the forums contains some extra spaces and odd newlines (but this may not be the case in reality!)
Check also that there are no hidden spaces at the end of the batchfile name in the properties file -- This happens sometimes with copy/paste...
ukmgranger
07-29-2004, 06:29 AM
I have just looked through the sage.properties again and I just cant see anything wrong with it. There are no extra spaces after anything (even though pasting it into this forum added one!?!).
Any more ideas? :)
nielm
07-29-2004, 07:03 AM
A few of the obvious:
is the getweather.bat file in the location
<sagetv directory>\STVs\OriginalV2\MlbDude\getWeather.bat
Sage executes the command by (effectively)
cd <full_path_to_sagetv directory>\STVs\OriginalV2\MlbDude
<full_path_to_sagetv directory>\STVs\OriginalV2\MlbDude\getWeather.bat
You could try the same to see if it runs...
Regarding the spaces -- really check that there is nothing at the end of the line -- Click the end of the line, and backspace until the 't' disappears, then delete until the next line merges , then hit t/Return to replace them...
This sounds stupid, but it has caught me out before
ukmgranger
07-29-2004, 07:19 AM
There are deffo no spaces in my .properties file.
my getweather.bat file is located here:
C:\Program Files\Frey Technologies\SageTV\STVs\OriginalV2\MlbDude\getweather.bat
As I have said, I have run this .bat from the command line and it works fine?!?
Mmmmmmmm - I think the cogs of my mind are starting to seize up.
The line in the getweather.bat should be:
java "getWeather3" %1 %2 %units% %numdays%
so that the %1 and %2 variables can be passed to it by the STV from the properties file.
Also, be sure that getweather.bat, GetWeatherJava, and the getWeather3.class files are all located in the MlbDude folder.
I don't think the "< >" arrows are required around the zipcode item in the properties file either.
Other than that, the lines you originally posted for the properties file appear to be correct.
nielm
07-29-2004, 12:27 PM
Originally posted by mls
The line in the getweather.bat should be:
java "getWeather3" %1 %2 %units% %numdays%
so that the %1 and %2 variables can be passed to it by the STV from the properties file.
.. but the problem seems to be that the entire bat file is not being executed, so whether this command line is correct or not should not make much difference... With the start cmd /k prefit the bat file should have popped up a command prompt showing any errors relating to missing classes/command line arguments, and this window is not being shown.
I don't think the "< >" arrows are required around the zipcode item in the properties file either.This could be related to the problem, as this value gets put on the command line that Sage executes and '<>' are special characters...
Note that this value can also be edited in Detailed Setup/enhancements, which is easier than shutting down Sage and editing the props file!
ukmgranger
07-29-2004, 03:52 PM
Cheers guys!
I'll give the '<>' idea a try out in the morning.
Thanks for all your help on this matter
Laterz
;)
ukmgranger
07-30-2004, 01:10 AM
Thanks Nielm - you were spot on with the 'special characters' <>.
Its works beautifully now.
I'm guessing that I must have copied them in from somewhere as I dont think that I would have just randomly put in the specials?!?
Anyway thanx again :)
nielm
07-30-2004, 02:06 AM
Originally posted by ukmgranger
Thanks Nielm - you were spot on with the 'special characters' <>.
It was mls that pointed me towards that :) Thanks mls!
chutio13
08-09-2004, 10:34 PM
I have done everything as noted in this thread and I cannot get weather to show up on the sage menu. When I run the weather.bat manually the txt file does update.... I don't know why it isn't showing up.
Opus4
08-09-2004, 10:39 PM
Do you mean you don't have the weather button on the main menu? Is this property set in Sage.properties (edit the properties file only after completely exiting SageTV, not just putting it to sleep):
ui/main_menu_weather_enabled=true
Are there many items on the main menu & perhaps you need to scroll down to see it?
If this isn't it... exactly what is missing?
- Andy
chutio13
08-09-2004, 11:10 PM
I have the setting in properties just as you have stated, and I have scrolled all the way down and the last thing is sleep on the main menu. I only have maldude 1.0a installed, not the 1.8.7 could that be it?
Opus4
08-09-2004, 11:13 PM
Originally posted by chutio13
I only have maldude 1.0a installed, not the 1.8.7 could that be it? Yes, that's it. MalDude only has up to MlbDude2 v1.8.6. I have had no time to do updates to it lately.
- Andy
chutio13
08-09-2004, 11:29 PM
installed mlbdude 1.8.6 and it still didn't show up....
Opus4
08-09-2004, 11:37 PM
That's because you need to install 1.8.7.... or was that just a typo & you really installed 1.8.7? :)
- Andy
chutio13
08-10-2004, 10:18 AM
I installed 1.8.7
Opus4
08-10-2004, 10:21 AM
And you switched to mlbdude2.stv instead of maldude.stv?
- Andy
chutio13
08-10-2004, 10:52 AM
sorry for sounding dumb, but you mean in the Sage properties switching to mlbdude2.svt? I might not have, I'll check tonight and let you know.....
Opus4
08-10-2004, 11:37 AM
Yes, I mean in the properties file.
And, just in case... always remember to exit SageTV before editing the properties file. :)
- Andy
chutio13
08-10-2004, 09:45 PM
I changed it MlbDude2.svt and save it, then opened sage and it didn't show up. then I went into the properties and it shows MlbDude.svt. Why is it doing that?? should I delete mlbdude.svt from the folder?
Opus4
08-10-2004, 09:51 PM
1) The file should be MlbDude2.stv -- STV, not SVT.
2) Did you edit the properties file while SageTV was completely closed, not just sleeping?
3) Is MlbDude2.stv in the SageTV\STVs\OriginalV2 folder?
You can also go to Setup -> Detailed Setup -> Advanced, and choose the button next to "SageTV Application Definition (.STV File). If you do, it seems best to exit & restart after making the election there.
- Andy
chutio13
08-10-2004, 10:13 PM
ok, I got it working so that weather shows up in the menu, but now it hangs on Loading.......
and a command windows stays open. When I run the batch file manually, weather.txt is generated properly. but not from sage. I put in the exact path to java.exe, I get C:\Program not a valid internal or external command
chutio13
08-10-2004, 10:16 PM
here is what i have....
@echo off
rem numdays is number of days to forecast -- between 1 and 10
set numdays=5
rem units is metric (m) or standard/imperial (s)
set units=s
rem %1 is weather.com url or location code 85737
rem %1 is output file name (weather.txt)
echo %1
start /wait cmd /k java "getWeather3" 85737 Weather.xt %units% %numdays%
nielm
08-11-2004, 02:47 AM
the command window stays open because you enabled this feature... the
remove the "start /wait cmd /k" from the command line
From the readme.txtNow, whenever Sage runs this grabber, a Windows command prompt window will appear containing any output from the getWeather grabber, followed by a command prompt.
Type 'exit' to close this window and return to Sage, allowing the Sage to read the weather.txt file
(NOTE: Do not close the window by clicking on [x] because Sage will
see this as a failure to run the file)
You get C:\Program not a valid internal or external command because you need to put pathnames that contain spaces in quotes:
"C:\Program Files\java\jre1.4.2_04\bin\java.exe"
chutio13
08-11-2004, 09:08 PM
I did that it is stuck at loading....
nielm
08-12-2004, 01:14 AM
Ther weather.txt filename in the bat file is also wrong -- it shows up as weather.xt (perhaps you should fall back to the original bat file in the zip)...
chutio13
08-12-2004, 10:18 PM
thank you all very much for the help, I finally got it working....
Gaurav
08-23-2004, 01:11 PM
works beautifully.....
a small kink - when the current wind speed is "CALM", it is displayed as -
"CALM calmmph"
Would love to see animated real time radar maps.
wardy
09-24-2004, 04:16 AM
Weather is working ok however I am getting no Icons in my weather section can someboy pleas tell me the path where the icons should be located. can this location be changed in the sage.propertiesfile
thanks in advance
wardy
Xenophon
10-08-2004, 01:49 AM
Exception in thread "main" java.lang.NoClassDefFoundError:getWeather3
for the life of me I cant get rid of this error, getWeather3.class is in MLBDUDE folder!!, and as a result getweather.bat will not create a weather.txt file outside of Sage.
Naturally inside Sage, Weather hangs at loading. Weather suite works ok.
First question. No one talks about getWeather3.java file thats included. Is it simply enough to add it to MLBDUDE folder or do I have to go download stuff and mess around with that as well?
2nd. Heres my getweather.bat file
@echo off
rem numdays is number of days to forecast -- between 1 and 10
set numdays=5
rem units is metric (m) or standard/imperial (s)
set units=s
rem %1 is weather.com url or location code
rem %1 is output file name (weather.txt)
echo %1
"C:\Program Files\java\j2re1.4.2_05\bin\java.exe" "getWeather3" 60402 weather.txt %units% %numdays%
I have played around with lots of the suggestions here: added the full path instead of just "java", moved around quotation marks, altered upper and lower cases, mlbdude2 1.8.7 is in mlbdude folder, have weather extractor 1.1.2 also.
Any other ideas for me? is this compatible with j2re1.4.2_05? I get some help information back from java -cp . getweather deal but what should I be looking for if anything there?
nielm
10-08-2004, 03:57 AM
The error message means that java cannot find the file getweather3.class -- it needs to be in the SageTV main folder where the sage.exe is (not the MLBdude folder).
Alternatively, in your batch file change the java.exe line to specify with -cp the full path to the directory where your getweather3.class is
"C:\Program Files\java\j2re1.4.2_05\bin\java.exe" -cp "C:\Program Files\Frey Technologies\SageTV" "getWeather3" 60402 weather.txt %units% %numdays%
(getaweather3.java is the source code which is not used by anything)
Xenophon
10-08-2004, 06:54 AM
Thanks Nielm, got it working =). On to the next project gettin the comm skip to work hehe.
vBulletin® v3.7.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.