It is currently April 19th, 2024, 6:58 pm

Correct location code but displaying wrong temperature

Get help with creating, editing & fixing problems with skins
jumi
Posts: 11
Joined: January 12th, 2018, 5:39 am

Correct location code but displaying wrong temperature

Post by jumi »

Hi.

I've modified this example skin to just show the current temperature and condition and even though I got the right location code for my city it's displaying a wrong temperature. As you can see in the screenshot, my code is 3386 and that's what the variable is set to, but it's displaying the wrong temperature somehow.

The location code, and you can see that it's actually 28°C
Image

The actual output of the skin
Image

And here's the entire .ini

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Metadata]
Name=WXDataTutorial
Author=JSMorley
Version=Apr 19, 2016
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Information=Example skin demonstrating how to create a|weather skin using the feed from weather.com

[Variables]
@IncludeVars=#@#WXDataWeatherVars.inc
@IncludeRegExp=#@#WXDataWeatherRegExp.inc

; Get the entire feed as a "super parent"

[WeatherParent]
Measure=Plugin
Plugin=WebParser
URL=http://wxdata.weather.com/wxdata/weather/local/#LocationCode#?cc=*&unit=#UnitOfMeasure#&dayf=#DaysFeed#&locale=#Locale#
RegExp=(?siU)^(.*)$
FinishAction=[!EnableMeasureGroup Weather]

; Using the "super parent", get the various parent and child measures for our desired data
; See WXDataCheatSheet.txt in @Resources\WXDataHelp

[LocationParent]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[WeatherParent]
RegExp=#Location#
Disabled=1

[CityNameChild]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[LocationParent]
StringIndex=2
Disabled=1

[UnitsParent]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[WeatherParent]
RegExp=#UnitsOfMeasure#
Disabled=1

[UnitsTempChild]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[UnitsParent]
StringIndex=3
Disabled=1

[UnitsSpeedChild]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[UnitsParent]
StringIndex=5
Disabled=1

[CurrentConditionsParent]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[WeatherParent]
RegExp=#CurrentConditions#
Disabled=1

[CurrentTempChild]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[CurrentConditionsParent]
StringIndex=3
Disabled=1

[CurrentConditionsChild]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[CurrentConditionsParent]
StringIndex=5
Disabled=1

[CurrentIconChild]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[CurrentConditionsParent]
StringIndex=6
Disabled=1

[TodayGeneralParent]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[WeatherParent]
RegExp=#TodayGeneral#
Disabled=1

[TodayLowChild]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[TodayGeneralParent]
StringIndex=5
Disabled=1

[TodayHighChild]
Measure=Plugin
Group=Weather
Plugin=WebParser
URL=[TodayGeneralParent]
StringIndex=4
Disabled=1

; Meters

;[MeterCurrentIcon]
;Meter=Image
;Y=0
;W=78
;H=78
;ImagePath=#@#WeatherIcons
;MeasureName=CurrentIconChild

[MeterBar]
Meter=Image
ImageName=cloud.png

[MeterCurrentTemp]
Meter=String
MeasureName=CurrentTempChild
MeasureName2=UnitsTempChild
MeasureName3=CurrentConditionsChild
X=20
Y=4
FontFace=Lemon
FontSize=6
FontColor=255,255,255,255
SolidColor=0,0,0,1
StringAlign=Left
AntiAlias=0
Text=%1 degrees and %3

;[MeterLine]
;Meter=Image
;X=65
;Y=0R
;W=123
;H=1
;SolidColor=255,255,255,255

;[MeterCurrentConditions]
;Meter=String
;MeasureName=CurrentConditionsChild
;X=188
;Y=7R
;FontSize=15
;FontColor=255,255,255,255
;SolidColor=0,0,0,1
;StringAlign=Right
;AntiAlias=1

;[MeterTodayLowHigh]
;Meter=String
;MeasureName=TodayLowChild
;MeasureName2=TodayHighChild
;X=188
;Y=5R
;FontSize=11
;FontColor=255,255,255,255
;SolidColor=0,0,0,1
;StringAlign=Right
;AntiAlias=1
;Text=Low %1° High %2°

Last edited by jumi on January 24th, 2018, 4:52 am, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Correct location code but displaying wrong temperature

Post by jsmorley »

Open up About / Skins and find the value for the measure [WeatherParent].

Right-click that and select "String: Copy to clipboard"

Then use the code tags here to paste in the entire thing.

Will look like something like this:

Code: Select all

<weather ver="2.0">
        <head>
      <locale>en_US</locale>
      <form>MEDIUM</form>
      <ut>F</ut>
      <ud>mi</ud>
      <us>mph</us>
      <up>in</up>
      <ur>in</ur>
    </head>
        <loc id="USVA0944">
      <dnam>Fort Hunt, VA</dnam>
      <tm>10:25 PM</tm>
      <lat>38.73</lat>
      <lon>-77.06</lon>
      <sunr>7:21 AM</sunr>
      <suns>5:20 PM</suns>
      <zone>-5</zone>
    </loc>
        
        
        <cc>
        <lsup>1/23/18 9:56 PM EST</lsup>
        <obst>Fort Belvoir, VA, US</obst>
        <tmp>49</tmp>
        <flik>44</flik>
        <t>Fair</t>
        <icon>33</icon>
        
        <bar>
          <r>29.77</r>
          <d>steady</d>
        </bar>
        <wind>
      <s>12</s>
      <gust>22</gust>
      <d>300</d>
      <t>WNW</t>
    </wind>
        <hmid>41</hmid>
        <vis>10.0</vis>
        <uv>
          <i>0</i>
          <t>Low</t>
        </uv>
        <dewp>26</dewp>
        <moon>
          <icon>5</icon>
          <t>Waxing Crescent</t>
        </moon>
      </cc>
        <dayf>
        <lsup>1/23/18 7:00 AM EST</lsup>
        <day d="0" t="Tuesday" dt="Jan 24">
        <hi>49</hi>
        <low>36</low>
        <sunr>7:21 AM</sunr>
        <suns>5:20 PM</suns>
        
        <part p="d">
          <icon></icon>
          <t></t>
          <wind>
      <s>calm</s>
      <gust>N/A</gust>
      <d>0</d>
      <t>CALM</t>
    </wind>
          <bt></bt>
          <ppcp>0</ppcp>
          <hmid>0</hmid>
        </part>
        <part p="n">
          <icon>31</icon>
          <t>Clear</t>
          <wind>
      <s>calm</s>
      <gust>N/A</gust>
      <d>0</d>
      <t>CALM</t>
    </wind>
          <bt>Clear</bt>
          <ppcp>0</ppcp>
          <hmid>60</hmid>
        </part>
      </day><day d="1" t="Wednesday" dt="Jan 25">
        <hi>47</hi>
        <low>28</low>
        <sunr>7:21 AM</sunr>
        <suns>5:20 PM</suns>
        
        <part p="d">
          <icon>34</icon>
          <t>Mostly Sunny</t>
          <wind>
      <s>13</s>
      <gust>N/A</gust>
      <d>302</d>
      <t>WNW</t>
    </wind>
          <bt>M Sunny</bt>
          <ppcp>0</ppcp>
          <hmid>46</hmid>
        </part>
        <part p="n">
          <icon>29</icon>
          <t>Partly Cloudy</t>
          <wind>
      <s>13</s>
      <gust>N/A</gust>
      <d>302</d>
      <t>WNW</t>
    </wind>
          <bt>P Cloudy</bt>
          <ppcp>0</ppcp>
          <hmid>62</hmid>
        </part>
      </day>
      </dayf>
        
        
        
        
        
        
        
      </weather>
 
The kinds of things you want to verify are that these are correct for your location:

<loc id="USVA0944">
<dnam>Fort Hunt, VA</dnam>

<lsup>1/23/18 9:56 PM EST</lsup>
<obst>Fort Belvoir, VA, US</obst>

Don't forget that the website is updated by Weather.com a bit more often than the RSS feed is.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5396
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Correct location code but displaying wrong temperature

Post by eclectic-tech »

Aside: The Locator does not find that weathercode (BRXX3386) for Sorocaba. It returns 4 different possible codes:
:? Correction: I was looking at the map and not the web page text... It is Santos, SP, Brazil for the location...
Last edited by eclectic-tech on January 24th, 2018, 5:35 am, edited 1 time in total.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Correct location code but displaying wrong temperature

Post by jsmorley »

eclectic-tech wrote:Aside: The Locator does not find that weathercode (BRXX3386) for Sorocaba. It returns 4 different possible codes:sorocaba.png
Yes, but isn't he looking for Santos, Brazil?
1.png
You do not have the required permissions to view the files attached to this post.
jumi
Posts: 11
Joined: January 12th, 2018, 5:39 am

Re: Correct location code but displaying wrong temperature

Post by jumi »

jsmorley wrote:Open up About / Skins and find the value for the measure [WeatherParent].

Right-click that and select "String: Copy to clipboard"

Then use the code tags here to paste in the entire thing.

Will look like something like this:

Code: Select all

<weather ver="2.0">
        <head>
      <locale>en_US</locale>
      <form>MEDIUM</form>
      <ut>F</ut>
      <ud>mi</ud>
      <us>mph</us>
      <up>in</up>
      <ur>in</ur>
    </head>
        <loc id="USVA0944">
      <dnam>Fort Hunt, VA</dnam>
      <tm>10:25 PM</tm>
      <lat>38.73</lat>
      <lon>-77.06</lon>
      <sunr>7:21 AM</sunr>
      <suns>5:20 PM</suns>
      <zone>-5</zone>
    </loc>
        
        
        <cc>
        <lsup>1/23/18 9:56 PM EST</lsup>
        <obst>Fort Belvoir, VA, US</obst>
        <tmp>49</tmp>
        <flik>44</flik>
        <t>Fair</t>
        <icon>33</icon>
        
        <bar>
          <r>29.77</r>
          <d>steady</d>
        </bar>
        <wind>
      <s>12</s>
      <gust>22</gust>
      <d>300</d>
      <t>WNW</t>
    </wind>
        <hmid>41</hmid>
        <vis>10.0</vis>
        <uv>
          <i>0</i>
          <t>Low</t>
        </uv>
        <dewp>26</dewp>
        <moon>
          <icon>5</icon>
          <t>Waxing Crescent</t>
        </moon>
      </cc>
        <dayf>
        <lsup>1/23/18 7:00 AM EST</lsup>
        <day d="0" t="Tuesday" dt="Jan 24">
        <hi>49</hi>
        <low>36</low>
        <sunr>7:21 AM</sunr>
        <suns>5:20 PM</suns>
        
        <part p="d">
          <icon></icon>
          <t></t>
          <wind>
      <s>calm</s>
      <gust>N/A</gust>
      <d>0</d>
      <t>CALM</t>
    </wind>
          <bt></bt>
          <ppcp>0</ppcp>
          <hmid>0</hmid>
        </part>
        <part p="n">
          <icon>31</icon>
          <t>Clear</t>
          <wind>
      <s>calm</s>
      <gust>N/A</gust>
      <d>0</d>
      <t>CALM</t>
    </wind>
          <bt>Clear</bt>
          <ppcp>0</ppcp>
          <hmid>60</hmid>
        </part>
      </day><day d="1" t="Wednesday" dt="Jan 25">
        <hi>47</hi>
        <low>28</low>
        <sunr>7:21 AM</sunr>
        <suns>5:20 PM</suns>
        
        <part p="d">
          <icon>34</icon>
          <t>Mostly Sunny</t>
          <wind>
      <s>13</s>
      <gust>N/A</gust>
      <d>302</d>
      <t>WNW</t>
    </wind>
          <bt>M Sunny</bt>
          <ppcp>0</ppcp>
          <hmid>46</hmid>
        </part>
        <part p="n">
          <icon>29</icon>
          <t>Partly Cloudy</t>
          <wind>
      <s>13</s>
      <gust>N/A</gust>
      <d>302</d>
      <t>WNW</t>
    </wind>
          <bt>P Cloudy</bt>
          <ppcp>0</ppcp>
          <hmid>62</hmid>
        </part>
      </day>
      </dayf>
        
        
        
        
        
        
        
      </weather>
 
The kinds of things you want to verify are that these are correct for your location:

<loc id="USVA0944">
<dnam>Fort Hunt, VA</dnam>

<lsup>1/23/18 9:56 PM EST</lsup>
<obst>Fort Belvoir, VA, US</obst>

Don't forget that the website is updated by Weather.com a bit more often than the RSS feed is.

Code: Select all

<weather ver="2.0">
        <head>
      <locale>en_US</locale>
      <form>MEDIUM</form>
      <ut>C</ut>
      <ud>km</ud>
      <us>km/h</us>
      <up>mb</up>
      <ur>mm</ur>
    </head>
        <loc id="BRXX3386">
      <dnam>Santos, SP, Brazil</dnam>
      <tm>2:52 AM</tm>
      <lat>-23.95</lat>
      <lon>-46.33</lon>
      <sunr>6:38 AM</sunr>
      <suns>7:57 PM</suns>
      <zone>-2</zone>
    </loc>
        
        
        <cc>
        <lsup>1/24/18 2:00 AM BRST</lsup>
        <obst>Sao Paulo Aprt, SP, BR</obst>
        <tmp>22</tmp>
        <flik>22</flik>
        <t>Fair</t>
        <icon>33</icon>
        
        <bar>
          <r>924.82</r>
          <d></d>
        </bar>
        <wind>
      <s>11</s>
      <gust>N/A</gust>
      <d>250</d>
      <t>WSW</t>
    </wind>
        <hmid>78</hmid>
        <vis>9.7</vis>
        <uv>
          <i>0</i>
          <t>Low</t>
        </uv>
        <dewp>17</dewp>
        <moon>
          <icon>6</icon>
          <t>Waxing Crescent</t>
        </moon>
      </cc>
        <dayf>
        <lsup>1/23/18 7:00 AM BRST</lsup>
        <day d="0" t="Wednesday" dt="Jan 24">
        <hi>22</hi>
        <low>26</low>
        <sunr>6:38 AM</sunr>
        <suns>7:57 PM</suns>
        
        <part p="d">
          <icon></icon>
          <t></t>
          <wind>
      <s>calm</s>
      <gust>N/A</gust>
      <d>0</d>
      <t>CALM</t>
    </wind>
          <bt></bt>
          <ppcp>0</ppcp>
          <hmid>0</hmid>
        </part>
        <part p="n">
          <icon>29</icon>
          <t>Partly Cloudy</t>
          <wind>
      <s>calm</s>
      <gust>N/A</gust>
      <d>0</d>
      <t>CALM</t>
    </wind>
          <bt>P Cloudy</bt>
          <ppcp>0</ppcp>
          <hmid>70</hmid>
        </part>
      </day>
      </dayf>
        
        
        
        
        
        
        
      </weather>
Both <loc id> and <dnam> keys check, as you can see.
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Correct location code but displaying wrong temperature

Post by jsmorley »

Seem to me in looking at it that lately Weather.com is not updating the RSS feed as often as I seem to remember. I was under the impression that it was about every 10 minutes or so before, but lately it seems like it doesn't update for up to 45 minutes. This can make the retrieved temperatures a bit behind what you see on the website. I'm hoping this is temporary...
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Correct location code but displaying wrong temperature

Post by fonpaolo »

For me, RSS from Weather.com have always been updated every 30 minutes.
As it's indicated in RSS itself it's always 10 minutes before hour and half hour.

But that, maybe, that's because I'm in Europe...
User avatar
jsmorley
Developer
Posts: 22629
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Correct location code but displaying wrong temperature

Post by jsmorley »

fonpaolo wrote:For me, RSS from Weather.com have always been updated every 30 minutes.
As it's indicated in RSS itself it's always 10 minutes before hour and half hour.

But that, maybe, that's because I'm in Europe...
I'll have to keep an eye on it.

Last updated (observation time) at 8:56, it will be 1/2 hour in about 3 minutes... We will see. It's also possible that it varies a bit depending on the "station" that the observation is done at.

Edit: So the next observation was a 9:56, one hour later, but it didn't actually show up in the feed until 10:02. I think there is something amiss with the wxdata feed, hopefully temporary. Getting an update once an hour isn't the end of the world, but sorta annoying...

Edit: Yeah, the next observation was a 10:56. So at least it's consistent.
User avatar
fonpaolo
Moderator
Posts: 1387
Joined: April 11th, 2013, 8:08 pm
Location: Italy

Re: Correct location code but displaying wrong temperature

Post by fonpaolo »

For me it's every 30 minutes, so, probably this update frequency depends on location... :confused:

Since you mentioned some data amiss in the feed, I have to point and ask for a confirmation, if you've noticed, other than some infos disappearing from time to time, as icons, weather description, temperatures and pressure, I tested the "local" version of the feed, as suggested by balala, and I noticed a lot of differences between what is indicated as icon and what is displayed as description, changing icons but not descriptions and vice versa.

...as always, sorry for hijacking the thread! :17oops
User avatar
SilverAzide
Rainmeter Sage
Posts: 2604
Joined: March 23rd, 2015, 5:26 pm

Re: Correct location code but displaying wrong temperature

Post by SilverAzide »

jsmorley wrote:Edit: So the next observation was a 9:56, one hour later, but it didn't actually show up in the feed until 10:02. I think there is something amiss with the wxdata feed, hopefully temporary. Getting an update once an hour isn't the end of the world, but sorta annoying...

Edit: Yeah, the next observation was a 10:56. So at least it's consistent.
It's been doing this for the last month or two. I started noticing it for US locations first, then European locations started the once/hour update thing too... :(
Gadgets Wiki GitHub More Gadgets...