It is currently April 23rd, 2024, 11:03 am

Change to Yahoo! weather feed

Release announcements and important news from the developers.
Runtimerror
Posts: 1
Joined: May 3rd, 2016, 5:42 am

Re: Change to Yahoo! weather feed

Post by Runtimerror »

artyom wrote:Here's the fixed YahooWeather.inc for Enigma users... seems to be working for now, but let me know if there are any problems.

Code: Select all

[MeasureYahooWeather]
Measure=Plugin
Plugin=WebParser
UpdateRate=1800
Url=https://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where woeid=#CurrentCode# AND u="#Unit#"
RegExp=(?siU).*distance="(.*)".*pressure="(.*)".*speed="(.*)".*temperature="(.*)".*city="(.*)".*country="(.*)".*region="(.*)".*chill="(.*)".*direction="(.*)".*speed="(.*)".*humidity="(.*)".*pressure="(.*)".*rising="(.*)".*visibility="(.*)".*sunrise="(.*)".*sunset="(.*)".*<title>.*:.*m .*(.*)</title>.*lat>(.*)<.*long>(.*)<.*condition.*code="(.*)".*temp="(.*)".*text="(.*)".*forecast.*day="(.*)".*code="(.*)".*high="(.*)".*low="(.*)".*text="(.*)".*forecast.*day="(.*)".*code="(.*)".*high="(.*)".*low="(.*)".*text="(.*)".*

;-----------------------
; UNITS

[MeasureWeatherUnitDistance]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=1

[MeasureWeatherUnitPressure]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=2

[MeasureWeatherUnitSpeed]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=3

[MeasureWeatherUnitTemp]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=4

;-----------------------
; LOCATION

[MeasureWeatherCity]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=5

[MeasureWeatherCountry]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=6

[MeasureWeatherRegion]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=7

;-----------------------
; WIND

[MeasureWeatherWindChill]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=8

[MeasureWeatherWindDirection]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=9

[MeasureWeatherWindDirectionCardinal]
Measure=Calc
Formula=FLOOR(((MeasureWeatherWindDirection/11.25)+1.5) < 33 ? ((MeasureWeatherWindDirection/11.25)+1.5) : ((MeasureWeatherWindDirection/11.25)+1.5)-32)
Substitute="10":"EbS","11":"ESE","12":"SEbE","13":"SE","14":"SEbS","15":"SSE","16":"SbE","17":"S","18":"SbW","19":"SSW","20":"SWbS","21":"SW","22":"SWbW","23":"WSW","24":"WbSW","25":"W","26":"WbN","27":"WNW","28":"NWbW","29":"NW","30":"NWbN","31":"NNW","32":"NbW","1":"N","2":"NbE","3":"NNE","4":"NEbN","5":"NE","6":"NEbE","7":"ENE","8":"EbN","9":"E"

[MeasureWeatherWindSpeed]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=10

;-----------------------
; ATMOSPHERE

[MeasureWeatherAtmoHumidity]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=11

[MeasureWeatherAtmoPressure]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=12

[MeasureWeatherAtmoRising]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=13

[MeasureWeatherAtmoVisibility]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=14

;--------------------------------
; SUN

[MeasureWeatherSunrise]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=15

[MeasureWeatherSunset]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=16

;--------------------------------
; REGION

[MeasureWeatherTimeZone]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=17

[MeasureWeatherLatitude]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=18

[MeasureWeatherLongitude]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=19

;--------------------------------
; CURRENT

[MeasureWeatherIcon]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=20

[MeasureWeatherTemp]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=21

[MeasureWeatherDesc]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=22

;-------------------------
; DAY 2

[MeasureWeatherDay2Date]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=23
Substitute="Sun":"Sunday","Mon":"Monday","Tue":"Tuesday","Wed":"Wednesday","Thu":"Thursday","Fri":"Friday","Sat":"Saturday"

[MeasureWeatherDay2Icon]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=24

[MeasureWeatherDay2High]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=25

[MeasureWeatherDay2Low]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=26

[MeasureWeatherDay2Average]
Measure=Calc
Formula=ROUND((MeasureWeatherDay2Low+MeasureWeatherDay2High)/2)

[MeasureWeatherDay2Desc]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=27

;-------------------------
; DAY 3

[MeasureWeatherDay3Date]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=28
Substitute="Sun":"Sunday","Mon":"Monday","Tue":"Tuesday","Wed":"Wednesday","Thu":"Thursday","Fri":"Friday","Sat":"Saturday"

[MeasureWeatherDay3Icon]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=29

[MeasureWeatherDay3High]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=30

[MeasureWeatherDay3Low]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=31

[MeasureWeatherDay3Average]
Measure=Calc
Formula=ROUND((MeasureWeatherDay3Low+MeasureWeatherDay3High)/2)

[MeasureWeatherDay3Desc]
Measure=Plugin
Plugin=WebParser
Url=[MeasureYahooWeather]
StringIndex=32

;-----------------------
; LOGO
; Yahoo! Weather requires that any application which uses their API include the Y!W logo and a link to their website. This section will automatically insert those elements into any skin which uses this measure module. Please do not remove these elements if you are redistributing this file with your own skin.

[YahooWeatherLogo]
Meter=IMAGE
MeterStyle=Style#Variant#Icon
Group=EnigmaMouseover
ImageName=#@#Images\MoxaWeather\Logo.png
H=25
W=25
Hidden=1
LeftMouseUpAction=["http://weather.yahoo.com/"][!Redraw]
ToolTipText=Powered by Yahoo! Weather.
Thank you very much - worked like a charm. :D
User avatar
brinkeguthrie
Posts: 24
Joined: March 12th, 2016, 3:35 am

Re: Change to Yahoo! weather feed

Post by brinkeguthrie »

I use the Elegance skin---can someone fix that one?
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Change to Yahoo! weather feed

Post by eclectic-tech »

brinkeguthrie wrote:I use the Elegance skin---can someone fix that one?
Elegance only uses the Temp and Conditions which are indexes 22 and 23.

This measure actually will returns almost 90 indexes, for the current day and a 10 day forecast of high/low temps and conditions...

I added a [Variables] section with my codes, so you should be able to see it work.
You will need to modify those for your location. And modify the other 2 weather skins in Elegance...

Code: Select all

; Elegance - Weather_white_small3.ini

[Variables]
WeatherCode=2450855
WeatherUnit=F

[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

User avatar
brinkeguthrie
Posts: 24
Joined: March 12th, 2016, 3:35 am

Re: Change to Yahoo! weather feed

Post by brinkeguthrie »

could you put this:

USCA0247


Wherever it is supposed to go?
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Change to Yahoo! weather feed

Post by eclectic-tech »

brinkeguthrie wrote:could you put this:

USCA0247


Wherever it is supposed to go?
That is the code used by weather.com... it will not work for yahoo.

You need to find your WOEID for your location to use for Yahoo weather. Go here, and type in your city to find the code you need: http://woeid.rosselliot.co.nz/

Enter that number as the WeatherCode= variable in the skin code and refresh the skin.
User avatar
brinkeguthrie
Posts: 24
Joined: March 12th, 2016, 3:35 am

Re: Change to Yahoo! weather feed

Post by brinkeguthrie »

I think I missed something.

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

[Metadata]
Name=Elegance - Weather (sm3)
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

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

[Variables]
WeatherCode=2450855
WeatherUnit=F

[MeasureWeatherRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=1800
Url=https://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where woeid=#12797313# 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="(.*)"
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_sm03.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
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Change to Yahoo! weather feed

Post by eclectic-tech »

Add the 2 new variables WeatherCode=2450855 & WeatherUnit=F to the existing [Variables] section...

Code: Select all

[Variables]
@include=#SKINSPATH#Elegance\Variables\Default.inc
WeatherCode=2450855
WeatherUnit=F
You need to change the StringIndex numbers on the 2 measures below the webparser measure:

Code: Select all

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

[MeasureWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=22
User avatar
brinkeguthrie
Posts: 24
Joined: March 12th, 2016, 3:35 am

Re: Change to Yahoo! weather feed

Post by brinkeguthrie »

I did that, and then refreshed...nothing. here is what it says:

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

[Metadata]
Name=Elegance - Weather (sm3)
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

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

[Variables]
@include=#SKINSPATH#Elegance\Variables\Default.inc
WeatherCode=2450855
WeatherUnit=F

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

[MeasureWeatherTemp]
Measure=Plugin
Plugin=Plugins\WebParser.dll
Url=[MeasureWeatherRSS]
StringIndex=22
; 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_sm03.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
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Change to Yahoo! weather feed

Post by eclectic-tech »

... You removed the main webparse measure, so nothing will work.

And still have 2 [Variables] sections, so the second is ignored... I meant to say combine them into 1 section.

Here is a corrected code

Code: Select all

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

[Metadata]
Name=Elegance - Weather (sm3)
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
WeatherCode=12797313
WeatherUnit=F
; My weather code for Milan OH
; WeatherCode=2450855

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

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

[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

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

[Background]
Meter=IMAGE
ImageName=#SKINSPATH#Elegance\Images\weather_sm03.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
brinkeguthrie
Posts: 24
Joined: March 12th, 2016, 3:35 am

Re: Change to Yahoo! weather feed

Post by brinkeguthrie »

works!
thank u so much. :)