Winstep

Software Technologies


 Winstep Forums


Print view
Board index : Winstep Forums : General Discussion  [ 20 posts ] Go to page 1, 2  Next
Author Message
 Post subject: Weather Module Bug - Day "name" does not match weather data
PostPosted: Tue Feb 04, 2020 10:19 pm 
Offline

Joined: Tue Jan 28, 2020 9:16 pm
Posts: 9
Firstly, WinStep Nexus rocks!!!

I am using Nexus 19.2 and have noticed a bug in the 5 day weather forcast pop up.

The 5 day weather forcast pop up "day" label is out by one day and does not match
the forcast data strings returned from the log

i.e.,

MSN Website displays SAT 8 with High is 25, Low is 24
Nexus 5 day popup "day" label for this info is SUN 9, not SAT 8

Interestingly today is Wednesday, and the results from your query return Tuesday to Saturday, not Wednesday to Sunday

I am thinking something is missing or maybe wrong in your query string

OS -> Windows 10 v1909
TimeZone -> (UTC +10:00) Brisbane

Nexus Weather Module Settings
- Country -> Australia
- State -> QLD
- City -> Mount Cotton
- METAR Code -> (blank)
- Weather.com Code -> (Blank)

Advanced settings -> Defaults

Get Weather log is as follows

<snip>
* METAR Connection Failed...
No Valid Codes
No Valid Codes

/data.aspx?src=vista&weadegreetype=c&culture=en-US&weasearchstr=Mount%20Cotton%2C%20QLD%2CAustralia
weather.service.msn.com
***
HTTP/1.0 200 OK
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/10.0
X-ActivityId: 0cea9c5e-6c86-4ce0-bde0-8cd84112e956
Access-Control-Allow-Origin: *
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Cache-Control: public, max-age=555
Date: Tue, 04 Feb 2020 21:24:37 GMT
Content-Length: 1530
Connection: close

<weatherdata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><weather weatherlocationcode="wc:ASXX0011" weatherlocationname="Mount Cotton, Australia" url="http://a.msn.com/54/en-US/ct-27.638,153.247?ctsrc=vista" imagerelativeurl="http://blob.weather.microsoft.com/static/weather4/en-us/" degreetype="C" provider="Foreca" attribution="http://www.foreca.com/" attribution2="Foreca" lat="-27.638" long="153.247" timezone="10" alert="" entityid="8441789" encodedlocationname="Mount+Cotton%2C+Australia"><current temperature="22" skycode="9" skytext="Light Rain" date="2020-02-05" observationtime="07:00:00" observationpoint="Mount Cotton, Australia" feelslike="22" humidity="86" winddisplay="22 km/h Southeast" day="Wednesday" shortday="Wed" windspeed="22 km/h" />
<forecast low="23" high="27" skycodeday="9" skytextday="Light Rain" date="2020-02-04" day="Tuesday" shortday="Tue" precip="" />
<forecast low="21" high="25" skycodeday="9" skytextday="Light Rain" date="2020-02-05" day="Wednesday" shortday="Wed" precip="100" />
<forecast low="23" high="25" skycodeday="4" skytextday="T-Storms" date="2020-02-06" day="Thursday" shortday="Thu" precip="100" />
<forecast low="24" high="26" skycodeday="4" skytextday="T-Storms" date="2020-02-07" day="Friday" shortday="Fri" precip="100" />
<forecast low="24" high="25" skycodeday="4" skytextday="T-Storms" date="2020-02-08" day="Saturday" shortday="Sat" precip="100" />
<toolbar timewindow="60" minversion="1.0.1965.0" /></weather></weatherdata>
***
Got MSN Data!
<end snip>

Screen Shots of Nexus 5 day for foracst and MSN Web page is attached in PDF
https://1drv.ms/b/s!AgSfMo7RGUsahrMcN7T3E91BiKKfKQ?e=uyax1J


Other than this annoying bug, your app is flawless

Cheers


Back to top
 Profile  
 
 Post subject: Re: Weather Module Bug - Day "name" does not match weather d
PostPosted: Wed Feb 05, 2020 3:52 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11930
Thanks for bringing this to my attention.

As you may or may not know, the primary weather forecast feed used by Winstep applications was, until recently, Weather.com, with other weather feed providers being used only as backups (i.e.; for redundancy) if the primary failed for some reason (initially the other feeds came from Google, MSN and Yahoo).

Google terminated their feed years ago, Yahoo put theirs behind AUTH authentication a few months ago and now Weather.com has also terminated their feed.

Thankfully Winstep applications still had the MSN feed to fall back on.

The problem is that because it was so seldom used - if ever - the code to parse the MSN feed was never tested under all conditions.

The issue is actually not in the code by itself, but rather in the MSN feed. The code assumes, as it did with the Weather.com feed, that the first forecast line is for the current day (as having a forecast line for the previous day doesn't even make sense) but apparently it is the latter that is actually happening.

For instance, here is currently 3:43 AM of the 5th of February. Polling the MSN feed returns current conditions as having been observed at 3:00AM 2020-02-05 (which is fine) but then the date of the first forecast line reports the forecast for 2020-02-04, which was yesterday. This doesn't even make sense, but is what it is.

I am now waiting to see when the first forecast line starts correctly refering to the 5th of February (i.e.; giving us a forecast for the rest of the current day) to see how best to handle this 'quirk' in the MSN feed.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Weather Module Bug - Day "name" does not match weather d
PostPosted: Wed Feb 05, 2020 4:53 am 
Offline
Global Moderator
Global Moderator

Joined: Sat Apr 07, 2018 7:19 pm
Posts: 2330
Location: Here, there, and everywhere
What about using some of the freebie feeds out there as used by Linux 'docklets/desklets' etc.? Or are they only free for free s/w? That MSN feed seems pretty rubbish anyway - even further out than Weather.com for accuracy here, and lacking things like pressure and visibility.

Anyway, just a thought.

_________________
nexter - so, what's next?

Just a volunteer Moderator, not connected to or affiliated with Winstep Software Technologies, and not an official part of customer service though I do try to help when and where I can if my scarce time permits


Back to top
 Profile  
 
 Post subject: Re: Weather Module Bug - Day "name" does not match weather d
PostPosted: Wed Feb 05, 2020 5:52 am 
Offline

Joined: Tue Jan 28, 2020 9:16 pm
Posts: 9
Thxs Jorge for the feedback and response

Lol, yes wt? about MSN feed returning yesterday???

Agree best approach would be to process the "forcast" elements as such to ignore stale data

Process Forcast Elements {
if Forcast.date lt now ("2020-02-04" < "2020-02-05")
next element
fi

...

Appreciate your support

Cheers


Back to top
 Profile  
 
 Post subject: Re: Weather Module Bug - Day "name" does not match weather d
PostPosted: Wed Feb 05, 2020 8:17 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11930
Yep, changed the code so that in that situation the last forecast day ends up showing N/A (since we really have no data for that day).

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Weather Module Bug - Day "name" does not match weather d
PostPosted: Wed Feb 05, 2020 1:01 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11930
Well, it's now 1 PM of 05 Feb and the first forecast entry of the MSN feed is STILL showing the forecast for the 4th of Feb. Beginning to wonder if their 5 day forecast is actually a 4 day forecast in practice.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Weather Module Bug - Day "name" does not match weather d
PostPosted: Thu Feb 06, 2020 8:16 am 
Offline

Joined: Tue Jan 28, 2020 9:16 pm
Posts: 9
Hi Jorge

Did some research over past 24hrs and found multiple references to MSN Weather Service as the "4" day forecast. I am thinking others have come to the same frustations.

Looking back at the bug from another perspective, the real issue is that the shortday name doesn't match the hi/lo data... and would therefore assume that the shortday name is not pulled from the XML data. If the shortday name was pulled from the same element as the hi/lo data, then the popup forecast would be correct. Ok it would start with yesterday, then today, followed by the next 3 days BUT it would be correct. I recommend
that this approach be taken

Cheers

Tim


Back to top
 Profile  
 
 Post subject: Re: Weather Module Bug - Day "name" does not match weather d
PostPosted: Thu Feb 06, 2020 8:29 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11930
Problem is that a forecast referring to a day in the past is neither useful NOR a forecast - it would just be confusing. So, unfortunately what is going to happen is that either the last day is always going to show up as N/A whenever using the MSN feed OR only 4 days/icons are shown, instead of the usual 5.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Weather Module Bug - Day "name" does not match weather d
PostPosted: Thu Feb 06, 2020 9:23 am 
Offline

Joined: Tue Jan 28, 2020 9:16 pm
Posts: 9
And that works as well


Back to top
 Profile  
 
 Post subject: Re: Weather Module Bug - Day "name" does not match weather d
PostPosted: Wed Apr 15, 2020 5:42 pm 
Offline

Joined: Wed Apr 15, 2020 5:20 pm
Posts: 1
I have the same problem as timbo63 on feb. 6 2020.
One day difference between you and Microsoft. Microsoft say today and you say tomorror. Sorry can not paste image to show you. is there something that can be done to fix it or not.


Back to top
 Profile  
 
 Post subject: Re: Weather Module Bug - Day "name" does not match weather d
PostPosted: Wed Apr 15, 2020 6:08 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11930
Open Preferences, go to the Advanced tab, enable 'Notify me of beta (test) versions', click the 'Check for Updates' button and let it install the v20.3 beta.

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Weather Module Bug - Day "name" does not match weather d
PostPosted: Wed Apr 22, 2020 3:58 am 
Offline

Joined: Tue Jan 28, 2020 9:16 pm
Posts: 9
Ok, nearly there

I downloaded Beta version and checked. Didn't work in the morning but did in the afternoon???, so just to make sure I tested this on another PC.

At 0819hrs I get 5 days, but at 1351hrs I correctly get 4 days as expected.

My current TimeZone is +10hrs (Brisbane)

See attached examples


Attachments:
File comment: 4 Day Forcast
nexus 1351hrs.png
nexus 1351hrs.png [ 578.43 KiB | Viewed 20088 times ]
File comment: 5 Day Forcast
nexus 0819hrs.png
nexus 0819hrs.png [ 572.26 KiB | Viewed 20088 times ]
Back to top
 Profile  
 
 Post subject: Re: Weather Module Bug - Day "name" does not match weather d
PostPosted: Wed Apr 22, 2020 4:23 am 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Feb 26, 2004 8:30 pm
Posts: 11930
Hmmm... looks like a timezone problem. Being on GMT here doesn't help.

Do me a favor: tomorrow at 8AM, when it shows the 5 day forecast, open the Weather module settings and click the Check Weather button. This will create a Weather.log log file in

C:\Users\Public\Documents\WinStep

Rename that file to Weather8AM.log

Now, at 1PM, when it's showing the 4 day forecast again, do the same thing, open the Weather Module settings, click the Check Weather button, rename the log file to Weather1PM.log

Then please send both log files to the Winstep support email address. :)

_________________
Jorge Coelho
Winstep Xtreme - Xtreme Power!
http://www.winstep.net - Winstep Software Technologies


Back to top
 Profile WWW 
 
 Post subject: Re: Weather Module Bug - Day "name" does not match weather d
PostPosted: Wed Apr 22, 2020 4:30 am 
Offline

Joined: Tue Jan 28, 2020 9:16 pm
Posts: 9
Will Do


Back to top
 Profile  
 
 Post subject: Re: Weather Module Bug - Day "name" does not match weather d
PostPosted: Thu Apr 23, 2020 12:12 am 
Offline

Joined: Tue Jan 28, 2020 9:16 pm
Posts: 9
Please find attached requested files

At 9:06am, 5 days displayed with incorrect information
<Log>
* METAR Connection Failed...
No Valid Codes
No Valid Codes


***
HTTP/1.0 200 OK
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/10.0
X-ActivityId: 93142644-f87c-4af6-98fd-353fe1138c55
Access-Control-Allow-Origin: *
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Akamai-Age-Ms: 1587596403216
Cache-Control: public, max-age=217
Date: Wed, 22 Apr 2020 23:06:26 GMT
Content-Length: 1534
Connection: close

<weatherdata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><weather weatherlocationcode="wc:ASXX0011" weatherlocationname="Mount Cotton, Australia" url="http://a.msn.com/54/en-US/ct-27.638,153.247?ctsrc=vista" imagerelativeurl="http://blob.weather.microsoft.com/static/weather4/en-us/" degreetype="C" provider="Foreca" attribution="http://www.foreca.com/" attribution2="Foreca" lat="-27.638" long="153.247" timezone="10" alert="" entityid="8441789" encodedlocationname="Mount+Cotton%2C+Australia"><current temperature="23" skycode="9" skytext="Light Rain" date="2020-04-23" observationtime="08:40:00" observationpoint="Mount Cotton, Australia" feelslike="23" humidity="66" winddisplay="11 km/h South" day="Thursday" shortday="Thu" windspeed="11 km/h" /><forecast low="18" high="28" skycodeday="31" skytextday="Clear" date="2020-04-22" day="Wednesday" shortday="Wed" precip="" /><forecast low="17" high="25" skycodeday="30" skytextday="Partly Sunny" date="2020-04-23" day="Thursday" shortday="Thu" precip="20" /><forecast low="18" high="26" skycodeday="34" skytextday="Mostly Sunny" date="2020-04-24" day="Friday" shortday="Fri" precip="20" /><forecast low="19" high="25" skycodeday="30" skytextday="Partly Sunny" date="2020-04-25" day="Saturday" shortday="Sat" precip="30" /><forecast low="17" high="26" skycodeday="34" skytextday="Mostly Sunny" date="2020-04-26" day="Sunday" shortday="Sun" precip="60" /><toolbar timewindow="60" minversion="1.0.1965.0" /></weather></weatherdata>
***
Got MSN Data!
<End Log>

At 10:06am, 4 days displayed with correct information, 5 day is N/A
<Log>
* METAR Connection Failed...
No Valid Codes
No Valid Codes


***
HTTP/1.0 200 OK
Content-Type: text/xml; charset=utf-8
Server: Microsoft-IIS/10.0
X-ActivityId: d0c90a51-5b79-49f0-af4d-c8b76e1714ef
Access-Control-Allow-Origin: *
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Cache-Control: public, max-age=289
Date: Thu, 23 Apr 2020 00:05:24 GMT
Content-Length: 1538
Connection: close

<weatherdata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><weather weatherlocationcode="wc:ASXX0011" weatherlocationname="Mount Cotton, Australia" url="http://a.msn.com/54/en-US/ct-27.638,153.247?ctsrc=vista" imagerelativeurl="http://blob.weather.microsoft.com/static/weather4/en-us/" degreetype="C" provider="Foreca" attribution="http://www.foreca.com/" attribution2="Foreca" lat="-27.638" long="153.247" timezone="10" alert="" entityid="8441789" encodedlocationname="Mount+Cotton%2C+Australia"><current temperature="25" skycode="9" skytext="Light Rain" date="2020-04-23" observationtime="09:30:00" observationpoint="Mount Cotton, Australia" feelslike="25" humidity="60" winddisplay="13 km/h Southeast" day="Thursday" shortday="Thu" windspeed="13 km/h" /><forecast low="18" high="28" skycodeday="31" skytextday="Clear" date="2020-04-22" day="Wednesday" shortday="Wed" precip="" /><forecast low="17" high="25" skycodeday="30" skytextday="Partly Sunny" date="2020-04-23" day="Thursday" shortday="Thu" precip="20" /><forecast low="18" high="26" skycodeday="34" skytextday="Mostly Sunny" date="2020-04-24" day="Friday" shortday="Fri" precip="20" /><forecast low="19" high="25" skycodeday="30" skytextday="Partly Sunny" date="2020-04-25" day="Saturday" shortday="Sat" precip="30" /><forecast low="17" high="26" skycodeday="34" skytextday="Mostly Sunny" date="2020-04-26" day="Sunday" shortday="Sun" precip="60" /><toolbar timewindow="60" minversion="1.0.1965.0" /></weather></weatherdata>
***
Got MSN Data!
<End Log>


Back to top
 Profile  
 
Post new topic Reply to topic Board index : Winstep Forums : General Discussion  [ 20 posts ] Go to page 1, 2  Next
Display posts from previous:  Sort by  

Who is online

Users browsing this forum: No registered users and 68 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron