It is currently March 28th, 2024, 6:54 pm

Change to Yahoo! weather feed

Release announcements and important news from the developers.
ckay
Posts: 4
Joined: August 11th, 2015, 3:58 am

Re: Change to Yahoo! weather feed

Post by ckay »

User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Change to Yahoo! weather feed

Post by jsmorley »

Code: Select all

[MeasureWeatherRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=10
URL=http://xml.weather.yahoo.com/forecastrss?w=23418210&u=f
RegExp=(?siU)<link.*>(.*)</link>.*city=\"(.*)\".*chill=\"(.*)\".*direction=\"(.*)\".*speed=\"(.*)\".*humidity=\"(.*)\".*visibility=\"(.*)\".*pressure=\"(.*)\".*sunrise=\"(.*)\".*sunset=\"(.*)\".*<image>.*<url>(.*)</url>.*<title>.*:.*m .*(.*)</title>.*lat>(.*)<.*long>(.*)<.*yweather:condition.*text=\"(.*)\".*code=\"(.*)\".*temp=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*low=\"(.*)\".*high=\"(.*)\".*code=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*high=\"(.*)\".*code=\"(.*)\".*
The change is entirely in

Url=http://weather.yahooapis.com/forecastrss?p=CAXX0184&u=c

There are two changes:


First, the URL should start with

http://xml.weather.yahoo.com/

instead of
http://weather.yahooapis.com/


Second, and this is optional really, Yahoo is moving away from the old style ?p=LocationCode to ?w=WOEID format for specifying your location.

You can get your WOEID from: http://woeid.rosselliot.co.nz/

Just change the ?p in the URL to ?w instead, and use the WOEID you got.

When I make those changes to that skin, using my WOEID and "f" for "Fahrenheit", it works fine for me.
1.png
P.S. ABSOLUTELY you MUST change UpdateRate=10. That is hitting the weather site every 10 seconds, and that is just stupid. Not only is that using a ton of your internet and CPU resources, but you may well be seen as an attack by the site and blocked entirely. Change that to UpdateRate=600, which is every 10 minutes. Yahoo weather only updates the feed on their end every 10 minutes anyway, and hitting any more often than that is just idiotic.
You do not have the required permissions to view the files attached to this post.
jckinncik
Posts: 120
Joined: March 26th, 2013, 2:47 am

Re: Change to Yahoo! weather feed

Post by jckinncik »

There is no URL on my skin.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Change to Yahoo! weather feed

Post by jsmorley »

jckinncik wrote:There is no URL on my skin.
Yes there is. It is probably buried in some .inc file that the skin(s) use. I have no interest in messing with Enigma, it is just far too pointlessly complicated to be bothered with, and is virtually unsupportable. You are just going to have to dig around in the .inc files included with it and find the URL option.

Edit:

Ok, it's in "C:\Users\YourName\Documents\Rainmeter\Skins\Enigma\@Resources\Measures\YahooWeather.inc"

and looks like this:

Code: Select all

[MeasureYahooWeather]
Measure=Plugin
Plugin=WebParser
UpdateRate=1800
Url=http://weather.yahooapis.com/forecastrss?w=#CurrentCode#&u=#Unit#
RegExp=(?siU)<link.*>(.*)</link>.*city=\"(.*)\".*region=\"(.*)\".*country=\"(.*)\".*temperature=\"(.*)\".*distance=\"(.*)\".*pressure=\"(.*)\".*speed=\"(.*)\".*chill=\"(.*)\".*direction=\"(.*)\".*speed=\"(.*)\".*humidity=\"(.*)\".*visibility=\"(.*)\".*pressure=\"(.*)\".*rising=\"(.*)\".*sunrise=\"(.*)\".*sunset=\"(.*)\".*<title>.*:.*m .*(.*)</title>.*lat>(.*)<.*long>(.*)<.*yweather:condition.*text=\"(.*)\".*code=\"(.*)\".*temp=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*low=\"(.*)\".*high=\"(.*)\".*text=\"(.*)\".*code=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*low=\"(.*)\".*high=\"(.*)\".*text=\"(.*)\".*code=\"(.*)\".*
StringIndex=1
Fix it the same way I have already explained in this thread.
ckay
Posts: 4
Joined: August 11th, 2015, 3:58 am

Re: Change to Yahoo! weather feed

Post by ckay »

jsmorley wrote:

Code: Select all

[MeasureWeatherRSS]
Measure=Plugin
Plugin=Plugins\WebParser.dll
UpdateRate=10
URL=http://xml.weather.yahoo.com/forecastrss?w=23418210&u=f
RegExp=(?siU)<link.*>(.*)</link>.*city=\"(.*)\".*chill=\"(.*)\".*direction=\"(.*)\".*speed=\"(.*)\".*humidity=\"(.*)\".*visibility=\"(.*)\".*pressure=\"(.*)\".*sunrise=\"(.*)\".*sunset=\"(.*)\".*<image>.*<url>(.*)</url>.*<title>.*:.*m .*(.*)</title>.*lat>(.*)<.*long>(.*)<.*yweather:condition.*text=\"(.*)\".*code=\"(.*)\".*temp=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*low=\"(.*)\".*high=\"(.*)\".*code=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*high=\"(.*)\".*code=\"(.*)\".*
The change is entirely in

Url=http://weather.yahooapis.com/forecastrss?p=CAXX0184&u=c

There are two changes:


First, the URL should start with

http://xml.weather.yahoo.com/

instead of
http://weather.yahooapis.com/


Second, and this is optional really, Yahoo is moving away from the old style ?p=LocationCode to ?w=WOEID format for specifying your location.

You can get your WOEID from: http://woeid.rosselliot.co.nz/

Just change the ?p in the URL to ?w instead, and use the WOEID you got.

When I make those changes to that skin, using my WOEID and "f" for "Fahrenheit", it works fine for me.
1.png
P.S. ABSOLUTELY you MUST change UpdateRate=10. That is hitting the weather site every 10 seconds, and that is just stupid. Not only is that using a ton of your internet and CPU resources, but you may well be seen as an attack by the site and blocked entirely. Change that to UpdateRate=600, which is every 10 minutes. Yahoo weather only updates the feed on their end every 10 minutes anyway, and hitting any more often than that is just idiotic.
Thank you! it works.
Gregory2001
Posts: 81
Joined: May 28th, 2010, 2:29 pm

Re: Change to Yahoo! weather feed

Post by Gregory2001 »

Excellent. Now if only one could change Google Calendar.
jckinncik
Posts: 120
Joined: March 26th, 2013, 2:47 am

Re: Change to Yahoo! weather feed

Post by jckinncik »

I changed the file to look like this, but it didn't fix anything.

[MeasureYahooWeather]
Measure=Plugin
Plugin=WebParser
UpdateRate=1800
Url=http://xml.weather.yahoo.com/forecastrss?w=#CurrentCode#&u=#Unit#
RegExp=(?siU)<link.*>(.*)</link>.*city=\"(.*)\".*region=\"(.*)\".*country=\"(.*)\".*temperature=\"(.*)\".*distance=\"(.*)\".*pressure=\"(.*)\".*speed=\"(.*)\".*chill=\"(.*)\".*direction=\"(.*)\".*speed=\"(.*)\".*humidity=\"(.*)\".*visibility=\"(.*)\".*pressure=\"(.*)\".*rising=\"(.*)\".*sunrise=\"(.*)\".*sunset=\"(.*)\".*<title>.*:.*m .*(.*)</title>.*lat>(.*)<.*long>(.*)<.*yweather:condition.*text=\"(.*)\".*code=\"(.*)\".*temp=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*low=\"(.*)\".*high=\"(.*)\".*text=\"(.*)\".*code=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*low=\"(.*)\".*high=\"(.*)\".*text=\"(.*)\".*code=\"(.*)\".*
StringIndex=1
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Change to Yahoo! weather feed

Post by jsmorley »

jckinncik wrote:I changed the file to look like this, but it didn't fix anything.

[MeasureYahooWeather]
Measure=Plugin
Plugin=WebParser
UpdateRate=1800
Url=http://xml.weather.yahoo.com/forecastrss?w=#CurrentCode#&u=#Unit#
RegExp=(?siU)<link.*>(.*)</link>.*city=\"(.*)\".*region=\"(.*)\".*country=\"(.*)\".*temperature=\"(.*)\".*distance=\"(.*)\".*pressure=\"(.*)\".*speed=\"(.*)\".*chill=\"(.*)\".*direction=\"(.*)\".*speed=\"(.*)\".*humidity=\"(.*)\".*visibility=\"(.*)\".*pressure=\"(.*)\".*rising=\"(.*)\".*sunrise=\"(.*)\".*sunset=\"(.*)\".*<title>.*:.*m .*(.*)</title>.*lat>(.*)<.*long>(.*)<.*yweather:condition.*text=\"(.*)\".*code=\"(.*)\".*temp=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*low=\"(.*)\".*high=\"(.*)\".*text=\"(.*)\".*code=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*low=\"(.*)\".*high=\"(.*)\".*text=\"(.*)\".*code=\"(.*)\".*
StringIndex=1
Sorry. Works for me. You sure you saved and refreshed Rainmeter? Try restarting Rainmeter.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5382
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Change to Yahoo! weather feed

Post by eclectic-tech »

Code: Select all

[MeasureYahooWeather]
Measure=Plugin
Plugin=WebParser
UpdateRate=1800
Url=http://xml.weather.yahoo.com/forecastrss?w=#CurrentCode#&u=#Unit#
RegExp=(?siU)<link.*>(.*)</link>.*city=\"(.*)\".*region=\"(.*)\".*country=\"(.*)\".*temperature=\"(.*)\".*distance=\"(.*)\".*pressure=\"(.*)\".*speed=\"(.*)\".*chill=\"(.*)\".*direction=\"(.*)\".*speed=\"(.*)\".*humidity=\"(.*)\".*visibility=\"(.*)\".*pressure=\"(.*)\".*rising=\"(.*)\".*sunrise=\"(.*)\".*sunset=\"(.*)\".*<title>.*:.*m .*(.*)</title>.*lat>(.*)<.*long>(.*)<.*yweather:condition.*text=\"(.*)\".*code=\"(.*)\".*temp=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*low=\"(.*)\".*high=\"(.*)\".*text=\"(.*)\".*code=\"(.*)\".*yweather:forecast.*day=\"(.*)\".*low=\"(.*)\".*high=\"(.*)\".*text=\"(.*)\".*code=\"(.*)\".*
StringIndex=1
This code works... if you haven't changed anything else.

All I changed is the 'URL=' value, but you should be able to copy the entire measure and replace it in your 'Documents\Rainmeter\Skins\Enigma\@Resources\Measures\YahooWeather.inc' skin.

What values are you using for #CurrentCode# and #Unit#?
jckinncik
Posts: 120
Joined: March 26th, 2013, 2:47 am

Re: Change to Yahoo! weather feed

Post by jckinncik »

I did edit the skin from the manage section of Rainmeter when I was trying to get it to work early on. I changed the shaded part below to weather.yahoo.com, but I'm not sure what it originally was to begin with. Is there any way to revert just the weather.ini back to default without having to revert the whole Enigma skin?

ENIGMA MOXAWEATHER

[Rainmeter]
Author=Kaelri

[Variables]
@include=#@#User\Options.inc

;---------------------------------------------------------------------
; STYLES

@include2=#@#Styles\#Stylesheet#\Options.inc
@include3=#@#Styles\#Stylesheet#\SidebarCommon.inc
@include4=#@#Styles\#Stylesheet#\SidebarWeather.inc

;---------------------------------------------------------------------
; METERS & MEASURES

@include5=#@#Measures\weather.yahoo.com/united-states/tennessee/johnson-city-12774034/
CurrentCode=#WeatherCode#

@include6=#ROOTCONFIGPATH#Sidebar\Weather\Weather.inc
Variant=Normal

;---------------------------------------------------------------------
; METADATA

[Metadata]
Name=Enigma MoxaWeather
Information=Shows your current and forecast weather conditions. | · This skin has been adapted from the original MoxaWeather by moxamax.
Version=4 Patch 1
License=Creative Commons BY-NC-SA 3.0