It is currently September 29th, 2024, 7:32 am

Help Needed! Can't get weather on elegance skin

General topics related to Rainmeter.
crackajackkoutras
Posts: 2
Joined: July 23rd, 2016, 3:14 am

Help Needed! Can't get weather on elegance skin

Post by crackajackkoutras »

Hi I am extremely new to rainmeter and I must say that i enjoy it very much. However, I cannot seem to get my weather working for the elegance skin. I think I have the correct weather code for San Antonio and i made a tweek to the RegEXP because apparently it was out of order. I will provide my code below so that someone can see what needs to be changed. Thank You!

[Rainmeter]
Author=lilshizzy@gmail.com
Update=1000
@include=#SKINSPATH#Elegance\Variables\Fonts.inc

[Metadata]
Name=Elegance - Weather (sm1)
Config=
Description=
Instructions=The default weather code is set to Los Angeles, to get your Weather Code visit (weather.yahoo.com) type in your Zip, click the RSS button, your code will be in the address bar. Click on "Edit Skin" below to enter your code.
Version=1000
Tags=
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Variant=
Preview=

[Variables]
@include=#SKINSPATH#Elegance\Variables\Default.inc

[Styles]
@include=#SKINSPATH#Elegance\Variables\Styles.inc

;--------------------------------

[MeasureWeatherRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=http://weather.yahooapis.com/forecastrss?w=USTX1200&u=f
RegExp=(?siU)<title>.*city="(.*)".*"(.*)".*"(.*)".*temperature="(.*)".*"(.*)".*"(.*)".*"(.*)".*chill="(.*)".*"(.*)".*"(.*)".*humidity="(.*)".*"(.*)".*"(.*)".*"(.*)".*sunrise="(.*):(.*)\s(.*)".*"(.*):(.*)\s(.*)".*<geo:lat>(.*)</geo:lat>.*<geo:long>(.*)</geo:long>.*<yweather:condition text="(.*)".*"(.*)".*"(.*)".*"(.*),\s(.*)\s(.*)\s(.*)\s(.*):(.*)\s(.*)\s(.*)".*<yweather:forecast day="(.*)".*"(.*)\s(.*)\s(.*)".*"(.*)".*"(.*)".*"(.*)".*"(.*)".*<yweather:forecast day="(.*)".*"(.*)\s(.*)\s(.*)".*"(.*)".*"(.*)".*"(.*)".*"(.*)".*<yweather:forecast day="(.*)".*"(.*)\s(.*)\s(.*)".*"(.*)".*"(.*)".*"(.*)".*"(.*)".*<yweather:forecast day="(.*)".*"(.*)\s(.*)\s(.*)".*"(.*)".*"(.*)".*"(.*)".*"(.*)".*<yweather:forecast day="(.*)".*"(.*)\s(.*)\s(.*)".*"(.*)".*"(.*)".*"(.*)".*"(.*)".*
StringIndex=1
; The default weather is set to Los Angeles (code=USCA1192), to get your Weather Code visit (weather.yahoo.com)
; type in your Zip Code, click the RSS button, your code will be in the address bar.
; At the end of the weather URL above you'll see "f" for Fahrenheit, change it to "c" for Celsius.

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

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

;--------------------------------

[Background]
Meter=IMAGE
ImageName=#SKINSPATH#Elegance\Images\weather_sm01.png
;SolidColor=255,0,0,100
X=0
Y=0
W=116
H=143

[Temp]
MeasureName=MeasureWeatherTemp
Meter=STRING
MeterStyle=normalwc
FontSize=73
X=60
Y=6

;[Temp2]
;Meter=STRING
;MeterStyle=normalwc
;FontSize=14
;X=-2r
;Y=93r
;Text="degrees"
User avatar
ikarus1969
Posts: 590
Joined: February 28th, 2011, 3:20 pm
Location: Vienna, Austria

Re: Help Needed! Can't get weather on elegance skin

Post by ikarus1969 »

The first thing i would try is to change the weather-url according to jsmorleys post(s) here: https://forum.rainmeter.net/viewtopic.php?f=13&t=23010

short: instead of URL=http://weather.yahooapis.com/... code URL=http://xml.weather.yahoo.com/...

but i really recommend to read through the posts in the topic i posted above.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5534
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Help Needed! Can't get weather on elegance skin

Post by eclectic-tech »

You can find the WOEID code needed for this at: http://woeid.rosselliot.co.nz/

Open the skin in your editor and add the 2 new variables to the current [Variables] section of the skin.

Code: Select all

WeatherCode=2450855
WeatherUnit=F
Replace the WeatherCode variable with the lookup WOEID you got from the site above.

Finally, replace the 3 measures (identical section names) below, save the file , and Refresh the skin.

Code: Select all

[MeasureWeatherRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=https://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where woeid=#WeatherCode# AND u="#WeatherUnit#"
RegExp="(?siU).*<yweather:units.*distance="(.*)" pressure="(.*)" speed="(.*)" temperature="(.*)".*<ttl>(.*)</ttl>.*<yweather:location.*city="(.*)" country="(.*)" region="(.*)".*<yweather:wind.*chill="(.*)" direction="(.*)" speed="(.*)".*<yweather:atmosphere.*humidity="(.*)" pressure="(.*)" rising="(.*)" visibility="(.*)".*<yweather:astronomy.*sunrise="(.*)" sunset="(.*)".*<geo:lat.*>(.*)</geo:lat><geo:long.*>(.*)</geo:long>.*<yweather:condition.*code="(.*)" date="(.*)" temp="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*<yweather:forecast.*code="(.*)" date="(.*)" day="(.*)" high="(.*)" low="(.*)" text="(.*)".*"

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

[MeasureWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=22
Reference posts:
WOEID Lookup: https://forum.rainmeter.net/viewtopic.php?p=122836#p122836
Code: https://forum.rainmeter.net/viewtopic.php?p=122844#p122844
crackajackkoutras
Posts: 2
Joined: July 23rd, 2016, 3:14 am

Re: Help Needed! Can't get weather on elegance skin

Post by crackajackkoutras »

Thank you so much eclectic-tech! That worked perfectly!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5534
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Help Needed! Can't get weather on elegance skin

Post by eclectic-tech »

.......... :thumbup:
crackajackkoutras wrote:Thank you so much eclectic-tech! That worked perfectly!
You would have found those posts eventually... :D