It is currently May 19th, 2024, 2:32 pm

Help with setting up weather in 10 Foot Hud

Get help with creating, editing & fixing problems with skins
legolas1042
Posts: 10
Joined: February 21st, 2010, 5:31 am

Re: Help with setting up weather in 10 Foot Hud

Post by legolas1042 »

Actually, I may be able to help here... I was having a very similar problem earlier... (Having just started using rainmeter in the last 12 hours this is fresh in my mind...) that exact url was not working so I looked around a bit and discovered that if I put w= instead of p=...
http://weather.yahooapis.com/forecastrss?p=#WeatherCode#&u=#Unit#
http://weather.yahooapis.com/forecastrss?w=#WeatherCode#&u=#Unit#
it worked
User avatar
jsmorley
Developer
Posts: 22633
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with setting up weather in 10 Foot Hud

Post by jsmorley »

legolas1042 wrote:Actually, I may be able to help here... I was having a very similar problem earlier... (Having just started using rainmeter in the last 12 hours this is fresh in my mind...) that exact url was not working so I looked around a bit and discovered that if I put w= instead of p=...
http://weather.yahooapis.com/forecastrss?p=#WeatherCode#&u=#Unit#
http://weather.yahooapis.com/forecastrss?w=#WeatherCode#&u=#Unit#
it worked
This is a good catch. We are probably all going to have to adjust things sometime in the future, as "p" is being depreciated by Yahoo / Weather.com.

From http://developer.yahoo.com/weather/

*****************************
RSS Request

The Weather RSS feed request follows simple HTTP GET syntax: start with a base URL and then add parameters and values after a question mark (?). Multiple parameters are separated by an ampersand (&).

The base URL for the Weather RSS feed is

http://weather.yahooapis.com/forecastrss

In this section, Summary shows how to make an RSS request with different parameters; Request Parameters shows a table summarizing those parameters.
Summary

For the Weather RSS feed there are two parameters:

* w for WOEID.
* u for degrees units (Fahrenheit or Celsius).

The WOEID parameter w is required. Use this parameter to indicate the location for the weather forecast as a WOEID.

http://weather.yahooapis.com/forecastrss?w=location

For example, to get weather for Yahoo! Headquarters in Sunnyvale, CA, use the WOEID code for Sunnyvale (2502265):

http://weather.yahooapis.com/forecastrss?w=2502265

The location parameter needs to be a WOEID. To find your WOEID, browse or search for your city from the Weather home page. The WOEID is in the URL for the forecast page for that city. You can also get the WOEID by entering your zip code on the home page. For example, if you search for Los Angeles on the Weather home page, the forecast page for that city is http://weather.yahoo.com/united-states/california/los-angeles-2442047/. The WOEID is 2442047.

The optional u (units) parameter indicates the degree units for the weather forecast. By default, Yahoo! Weather returns temperature information in degrees Fahrenheit. Use the u parameter to explicitly specify the degree units in Fahrenheit (f) or Celsius (c). The units parameter is case sensitive. For example, to get the weather forecast in Sunnyvale, CA in Celsius:

http://weather.yahooapis.com/forecastrss?w=2442047&u=c

Note that choosing Celsius degree units changes all the weather units to metric, for example, wind speed will be reported as kilometers per hour and barometric pressure as millibars.

Yahoo! Weather returns an RSS 2.0 feed in response to this request. You can subscribe to the request URL with My Yahoo! or another RSS feed aggregator, or you can incorporate the information in the RSS response into your own application. See RSS Response Elements for information on the elements contained in the RSS feed.

Request Parameters
Parameter Description Example
w WOEID w=2502265
u Units for temperature (case sensitive)
f: Fahrenheit
c: Celsius u=c

Note: The old location parameter 'p' has been deprecated and will be removed in the future releases. Hence users are encouraged to migrate to the 'w' parameter which provides deep integration into Y! GeoPlanet. The old documentation is archived here.

****************************

The important thing here is that if and when they really do remove "p=" almost all skins currently out there using Yahoo weather are going to need to be adjusted. Right now, most skins use "p=" and then the user puts in either their Zip Code (US) or the code from the RSS feed that looks like USVA0140 (for Fairfax, VA), or FRXX0076 (for Paris, France). It looks like soon we will need to use "w=" and the WOEID, which is found by going to your weather and using the NUMBER from the URL which will look like this:

http://weather.yahoo.com/united-states/virginia/chantilly-2378074/
http://weather.yahoo.com/france/ile-de-france/paris-615702/

So I would use URL=http://weather.yahooapis.com/forecastrss?w=2378074&u=f

Paris would use URL=http://weather.yahooapis.com/forecastrss?w=615702&u=c

For now, "p=" is still working fine for me with "22033" (my Zip Code), but based on that developer page, we'd better start adjusting...


================================
Edit: Here is a url that can help you find your WOEID. Just put in your City, State or City, Country and it will return the WOEID:

http://sigizmund.info/woeidinfo/
User avatar
Digi
Posts: 46
Joined: December 24th, 2009, 10:35 pm

Re: Help with setting up weather in 10 Foot Hud

Post by Digi »

right... was reading this thread and trying to change the temp from f to c in the 10 foot hud skin, it wont change cos if you go to the website a nd after finding your city and adjusting the temp when u press the rss feed it wont remember what u chose....this is the url http://xml.weather.com/weather/local/UKXX0052?cc=&dayf=6 ... i tried to change it to totally different url from yahoo weather and it wont work... no idea why ...any advice jsmorley mate

the skin is Created by Stephen R Gibson, based on MoxaWeather.


here is the ini file

Code: Select all

[]
10-Foot HUD (White) - Created by Stephen R Gibson, based on MoxaWeather.

; added by RainBrowser
;http://rainmeter.net//index.php?title=Rainmeter_101#.5BMetadata.5D

[Metadata]
Name=
=
Description=
Instructions=
Version=
Tags=
License=
Variant=
Preview=

;End of added Metadata

[Variables]
;Find your weather code at Weather.com (like UKXX0296 below) and replace the one in this URL.
;To have the temperature display in Farenheit, delete "&unit=m" from the URL.
URL=http://xml.weather.com/weather/local/UKXX0052?cc=&dayf=6
Font=rockwell

------------------------------------MEASURES-------------------------------------------

[]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=3600
=#URL#
RegExp="(?)<weather ver="(.*)">(.*)<tmp>(.*)</tmp>(.*)<t>(.*)</t>(.*)<icon>(.*)</icon>(.*)<day d="1" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="2" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)<day d="3" t="(.*)" dt="(.*)">(.*)<hi>(.*)</hi>(.*)<low>(.*)</low>(.*)<icon>(.*)</icon>(.*)<t>(.*)</t>(.*)"
StringIndex=1

[]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=3

[]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=5
Substitute="Fair":"FAIR","Cloudy":"CLOUDY","Showers in the Vicinity":"SHOWERS","Partly":"PARTLY","Mostly":"MOSTLY","Fog":"FOG","Clouds":"CLOUDS","Light":"LIGHT","Rain":"RAIN","Sunny":"SUNNY","Clear":"CLEAR"

--------------------------------------------------------------------------------

[]
Meter=IMAGE
X=0
Y=0
W=120
H=160
SolidColor=0, 0, 0, 1

[]
MeasureName=MeasureWeatherTemp
Meter=STRING
X=550
Y=0
FontColor=255,255,255,80
StringStyle=NORMAL
FontSize=60
StringAlign=RIGHT
StringStyle=BOLD
FontFace=rockwell
Antialias=1
Postfix="°"

[]
MeasureName=MeasureWeatherDesc
Meter=STRING
X=550
Y=68
FontColor=255,255,255,80
FontSize=42
StringAlign=RIGHT
StringStyle=BOLD
FontFace=rockwell
Antialias=1

thanks alot in advance
Last edited by Digi on February 21st, 2010, 6:12 pm, edited 1 time in total.
[url=http://www.rainmeter.net/forum/viewforum.php?f=85][center][b]H.E.R.O[/b][/center][/url]
[url=http://www.rainmeter.net/forum/viewtopic.php?f=83&t=1525][center][b]V.I.S.O.R[/b][/center][/url]
[url=http://www.rainmeter.net/forum/index.php][center][b]Rainmeter Help[/b][/center][/url]
User avatar
jsmorley
Developer
Posts: 22633
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with setting up weather in 10 Foot Hud

Post by jsmorley »

Digi wrote:right...i was reading this thread and trying to change the temp from f to c in the 10 foot hud skin, it wont change cos if you go to the website a nd after finding ur city and adjusting the temp when u press the rss feed it wont remmber what u chose....this is the url http://xml.weather.com/weather/local/UKXX0052?cc=&dayf=6 ... i tried to change it to totaly diffrent url from yahoo weathe and it wont work... no idea why ...any advice jsmorley mate

the skin is Created by Stephen R Gibson, based on MoxaWeather.


thanks alot in advance
I'm not sure what you are saying. The url in that code works fine in my browser, so that much is right. Are you saying you just changed the url in the skin but didn't rework the RegExp? That won't work at all.
User avatar
Digi
Posts: 46
Joined: December 24th, 2009, 10:35 pm

Re: Help with setting up weather in 10 Foot Hud

Post by Digi »

jsmorley wrote: I'm not sure what you are saying. The url in that code works fine in my browser, so that much is right. Are you saying you just changed the url in the skin but didn't rework the RegExp? That won't work at all.

i want to change the temp from Fahrenheit to centegrate..how do i do that?

thanks for the quick reply mate
[url=http://www.rainmeter.net/forum/viewforum.php?f=85][center][b]H.E.R.O[/b][/center][/url]
[url=http://www.rainmeter.net/forum/viewtopic.php?f=83&t=1525][center][b]V.I.S.O.R[/b][/center][/url]
[url=http://www.rainmeter.net/forum/index.php][center][b]Rainmeter Help[/b][/center][/url]
User avatar
jsmorley
Developer
Posts: 22633
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Help with setting up weather in 10 Foot Hud

Post by jsmorley »

Digi wrote: i want to change the temp from Fahrenheit to centegrate..how do i do that?

thanks for the quick reply mate

Code: Select all

http://xml.weather.com/weather/local/UKXX0052?cc=&unit=m&dayf=6
User avatar
Digi
Posts: 46
Joined: December 24th, 2009, 10:35 pm

Re: Help with setting up weather in 10 Foot Hud

Post by Digi »

jsmorley wrote:

Code: Select all

http://xml.weather.com/weather/local/UKXX0052?cc=&unit=m&dayf=6

:shootself: silly mistake...i should have realized that...thanks alot mate
[url=http://www.rainmeter.net/forum/viewforum.php?f=85][center][b]H.E.R.O[/b][/center][/url]
[url=http://www.rainmeter.net/forum/viewtopic.php?f=83&t=1525][center][b]V.I.S.O.R[/b][/center][/url]
[url=http://www.rainmeter.net/forum/index.php][center][b]Rainmeter Help[/b][/center][/url]
Abysm
Posts: 1
Joined: July 3rd, 2010, 5:15 pm

Re: Help with setting up weather in 10 Foot Hud

Post by Abysm »

I've been searching through Google, with the same problems as people have posted before me. I've followed jsmorleys instructions, and I've actually gotten it to work! But there's just two small problems. I can't change the color of the font, even though it says Note: to change the color to black, put in blah, blah, blah. I've tried putting in many different numbers instead of 255,255,255,80 and such but it always wants to stay black. My second problem is that whenever I edit that, save it, and refresh it for a second time, Rainmeter freezes and I have to open task-manager to shut it down. :3 This thread is quite old, but I'm really hoping that someone could help me!