It is currently April 19th, 2024, 7:38 pm

Weather not working?

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather not working?

Post by jsmorley »

brinkeguthrie wrote:aha i see. off the top of your head, are there any other skins than elegance that do weather, and have the same look?
Since I have no idea what elegance is, I can't say. You might search deviantART to see if anything catches your fancy.

http://www.deviantart.com/browse/all/customization/skins/sysmonitor/rainmeter/?q=weather
talha797
Posts: 1
Joined: March 28th, 2016, 5:51 am

Re: Weather not working?

Post by talha797 »

Hi everyone, i am having trouble in implementing the new xml link for the yahoo rss feed. Following is the code that i need to implement the new xml url.Can anyone please tell me how i can do it,Thanks!


String YQL = String.format("select * from weather.forecast where woeid in (select woeid from geo.places(1) where text=\"%s\") and u='" + unit + "'", location);

String endpoint = String.format("https://query.yahooapis.com/v1/public/yql?q=%s&format=json", Uri.encode(YQL));
URL url = new URL(endpoint);
User avatar
moshi
Posts: 1740
Joined: November 13th, 2012, 9:53 pm

Re: Weather not working?

Post by moshi »

talha797 wrote:Hi everyone, i am having trouble in implementing the new xml link for the yahoo rss feed. Following is the code that i need to implement the new xml url.Can anyone please tell me how i can do it,Thanks!


String YQL = String.format("select * from weather.forecast where woeid in (select woeid from geo.places(1) where text=\"%s\") and u='" + unit + "'", location);

String endpoint = String.format("https://query.yahooapis.com/v1/public/yql?q=%s&format=json", Uri.encode(YQL));
URL url = new URL(endpoint);
are you sure you are using Rainmeter? or did you come here via a Google search? i ask because what you got here doesn't really look like Rainmeter code.

if you are using Rainmeter, please post a link to the skin in question.
if you don't, then i guess there might be a better chance for an answer at a site like StackOverflow.
camineet
Posts: 3
Joined: March 29th, 2016, 1:24 am

Re: Weather not working?

Post by camineet »

would somebody be so kind as to write a step by step fix for me as an end user? i have no idea how to fix the weather problem in rainmeter from the posts thus far written and need to be told something like... "right click this...go to that.. change this to this...


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

Re: Weather not working?

Post by jsmorley »

camineet wrote:would somebody be so kind as to write a step by step fix for me as an end user? i have no idea how to fix the weather problem in rainmeter from the posts thus far written and need to be told something like... "right click this...go to that.. change this to this...


many thanks,
You have a link on deviantART to the skin you are using? It will vary a bit from skin to skin.
camineet
Posts: 3
Joined: March 29th, 2016, 1:24 am

Re: Weather not working?

Post by camineet »

ty for reply. much appreciate it and will be thrilled to continue using rainmeter :)

using enigma. opening weathercodefinder and setting 48331 which corresponds to my town in michigan yields the no info display as seen in attachment.

i'm also using winddir next to enigma for wind direction. i don't recall that skin requiring separate location setting. i think it just used the one set in enigma. but i could be wrong about that :???:

http://kaelri.deviantart.com/art/Enigma-103823591

http://www.deviantart.com/art/WindDir-2-0-599510588
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather not working?

Post by jsmorley »

camineet,

https://forum.rainmeter.net/viewtopic.php?p=121421#p121421
https://forum.rainmeter.net/viewtopic.php?p=121493#p121493

Edit
"C:\Users\YourName\Documents\Rainmeter\Skins\Enigma\@Resources\Measures\YahooWeather.inc"

Find this measure:

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
Change
Url=http://weather.yahooapis.com/forecastrss?w=#CurrentCode#&u=#Unit#

To

Url=http://xml.weather.yahoo.com/forecastrss?w=#CurrentCode#&u=#Unit#

Save and refresh Rainmeter.

As to WindDir, yeah, it does require that you set the WOEID as well, just edit the WindDir.ini file, and put your information in:

Code: Select all

[Variables]
Location=23418210
Unit=f
However, there may be an issue with WindDir on your system. Looks to me like you might be using just a solid blue background for your desktop, instead of some "wallpaper" image. The Chameleon plugin in WindDir might be setting the color of the text and the background of the circle to the same, or close to the same color.
mcpaton
Posts: 27
Joined: March 17th, 2016, 2:18 am

Re: Weather not working?

Post by mcpaton »

@jsmorley I have loaded up your WXDataWeather skin. I have noticed something strange - if I load weather for "Charters Towers Qld" Location ASXX7494 - it displays weather for nearby city Townsville (ASXX0117). If I load the XML file up, you can see the incorrect data: http://wxdata.weather.com/wxdata/weather/local/ASXX7494?cc=*&unit=m&dayf=3

However if I go to Weather.com and view current conditions https://weather.com/weather/today/l/ASXX7494:1:AS the correct data show up fine on that page.

Any ideas why this would be happening?

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

Re: Weather not working?

Post by jsmorley »

mcpaton wrote:@jsmorley I have loaded up your WXDataWeather skin. I have noticed something strange - if I load weather for "Charters Towers Qld" Location ASXX7494 - it displays weather for nearby city Townsville (ASXX0117). If I load the XML file up, you can see the incorrect data: http://wxdata.weather.com/wxdata/weather/local/ASXX7494?cc=*&unit=m&dayf=3

However if I go to Weather.com and view current conditions https://weather.com/weather/today/l/ASXX7494:1:AS the correct data show up fine on that page.

Any ideas why this would be happening?

Thanks
Not really, although I suspect that there are really only so many "reporting stations" in the Weather.com world, and although you can specify a really granular location, and that is what it will display on the website, the actual weather information comes from the closest actual reporting station. So I guess it is possible that getting the feed for location ASXX7494 might return the weather information for location ASXX0117.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Weather not working?

Post by jsmorley »

If I look at what is actually returned, my suspicions are correct:

Code: Select all

        <loc id="ASXX7494">
      <dnam>Charters Towers, QNS, Australia</dnam>
      <tm>11:53 PM</tm>
      <lat>-20.08</lat>
      <lon>146.26</lon>
      <sunr>6:21 AM</sunr>
      <suns>6:17 PM</suns>
      <zone>10</zone>
    </loc>
        
        
        <cc>
        <lsup>3/30/16 11:30 PM AEST</lsup>
        <obst>Townsville, QNS, AS</obst>
        <tmp>79</tmp>
        <flik>82</flik>
        <t>Mostly Cloudy</t>
        <icon>27</icon>
Although it is reporting for Charter Towers, it is using the "observation" from Townsville.

To some extent, the really granular "location" you can specify is a "feel good" thing. In reality, Weather.com can't possibly have weather reporting stations every kilometer, but tends to spread them around in such a way to get good "coverage" of an area.

I'm little surprised the observation site is 137.3 km away from you, that seems like a long way, Still, is the weather in Townsville that much different than it is in Charters Towers? I guess it could be, since Townsville is on the coast and Charters Towers is a bit inland. It's possible that a different "location", either somewhere to the south or west of you, might use an "observation" that is actually closer, or a better fit. You might play with it.