Bug 404061 - Weather Report widget displays incorrect temperature
Summary: Weather Report widget displays incorrect temperature
Status: CONFIRMED
Alias: None
Product: kdeplasma-addons
Classification: Plasma
Component: Weather (show other bugs)
Version: 5.14.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-07 15:44 UTC by jbf
Modified: 2019-10-21 22:57 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
BBC provider shows wrong current temperature (277.68 KB, image/png)
2019-02-09 17:38 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jbf 2019-02-07 15:44:17 UTC
SUMMARY
Weather Report always displays temperature as "38.9 F." Widget configured for local international airport. NOAA web page displays correct airport data; Weather Report gets it wrong. :-(

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: Fedora 29
(available in About System)
KDE Plasma Version: 5.14.4-1.fc29
KDE Frameworks Version: kf5-frameworkintegration-devel.x86_64                                              5.54.0-1.fc29
Qt Version: qt-x11-4.8.7-44.fc29.x86_64

ADDITIONAL INFORMATION
Provides plausible forecast &  wind speed
Comment 1 Nate Graham 2019-02-07 18:08:20 UTC
Does this still happen after a reboot?
Comment 2 Friedrich W. H. Kossebau 2019-02-07 18:18:11 UTC
The NOAA backend does not extract data from the webpage, but from a special service. To see what data is pulled, please try to get the latitude & longitude for your station and replace this in this URL for LAT & LON:

https://graphical.weather.gov/xml/sample_products/browser_interface/ndfdBrowserClientByDay.php?lat=LAT&lon=LON&format=24+hourly&numDays=7

Can you see whether the data there is correct for the temperature?
Comment 3 jbf 2019-02-07 19:02:17 UTC
I rebooted the laptop and the temperature now reads correctly. Perhaps it's related to the laptop being suspended --


---- Nate Graham <bugzilla_noreply@kde.org> wrote: 
> https://bugs.kde.org/show_bug.cgi?id=404061
> 
> Nate Graham <nate@kde.org> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>             Version|unspecified                 |5.14.4
>            Assignee|kdelibs-bugs@kde.org        |kossebau@kde.org
>                  CC|                            |nate@kde.org,
>                    |                            |plasma-bugs@kde.org
>           Component|general                     |weather
>             Product|frameworks-kjobwidgets      |kdeplasma-addons
> 
> --- Comment #1 from Nate Graham <nate@kde.org> ---
> Does this still happen after a reboot?
> 
> -- 
> You are receiving this mail because:
> You reported the bug.
Comment 4 jbf 2019-02-07 19:13:02 UTC
Submitted this URL with LAT/LON for Rochester International Airport (NY):
https://graphical.weather.gov/xml/sample_products/browser_interface/ndfdBrowserClientByDay.php?lat=43.128002&lon=-77.665474&format=24+hourly&numDays=7 

Service returns this:
ERRORNo data were found using the following input:
24 hourly
2019-02-07
7

-pnt 43.128002,-77.665474 -cwa BUF 

43.128002,-77.665474 



---- "Friedrich W. H. Kossebau" <bugzilla_noreply@kde.org> wrote: 
> https://bugs.kde.org/show_bug.cgi?id=404061
> 
> --- Comment #2 from Friedrich W. H. Kossebau <kossebau@kde.org> ---
> The NOAA backend does not extract data from the webpage, but from a special
> service. To see what data is pulled, please try to get the latitude & longitude
> for your station and replace this in this URL for LAT & LON:
> 
> https://graphical.weather.gov/xml/sample_products/browser_interface/ndfdBrowserClientByDay.php?lat=LAT&lon=LON&format=24+hourly&numDays=7
> 
> Can you see whether the data there is correct for the temperature?
> 
> -- 
> You are receiving this mail because:
> You reported the bug.
Comment 5 Friedrich W. H. Kossebau 2019-02-07 19:48:16 UTC
Hi & sorry for the quick shot, was busy with other things first.

Now, for the start have to correct myself, actually the observation (so not the forecast) data is fetched by some url which is taken from a global list with stations. That list is from https://w1.weather.gov/xml/current_obs/index.xml

So in that data it is the entry <xml_url>, thus in the case of "Rochester, Greater Rochester International Airport" this is http://weather.gov/xml/current_obs/KROC.xml. That data is nicely prepared for automated parsing. You can look at it in the web browser too, where the display will be enriched thanks to the <?xml-stylesheet href="latest_ob.xsl" type="text/xsl"?>

The url I gave before is actually the one to fetch the forecast. Not sure why there currently is no forecast data available for that location, perhaps some outage of the service? Ah, now there is forecast data again, try your url :)


The laptop being suspended might be the actual issue which triggered the behaviour you saw, I need to check whether this results in instant repull of latest weather data if the update period has passed. Otherwise one might indeed see the data from before, and only have it updated once the normal update period has been reached.
Also depends on network connectivity, so far I have not come around to check and brush over the related logic here.
Comment 6 Nate Graham 2019-02-07 19:54:29 UTC
(In reply to Friedrich W. H. Kossebau from comment #5)
> The laptop being suspended might be the actual issue which triggered the
> behaviour you saw, I need to check whether this results in instant repull of
> latest weather data if the update period has passed. Otherwise one might
> indeed see the data from before, and only have it updated once the normal
> update period has been reached.
> Also depends on network connectivity, so far I have not come around to check
> and brush over the related logic here.
Sounds a bit like Bug 403871.
Comment 7 jbf 2019-02-07 20:41:29 UTC
"http://weather.gov/xml/current_obs/KROC.xml" returns temperature as 35 degrees. "Weather Report" widget says 32.9. Laptop uptime is 1 hr, 40 min. Seems as though it should have refreshed by now. 


---- "Friedrich W. H. Kossebau" <bugzilla_noreply@kde.org> wrote: 
> https://bugs.kde.org/show_bug.cgi?id=404061
> 
> --- Comment #5 from Friedrich W. H. Kossebau <kossebau@kde.org> ---
> Hi & sorry for the quick shot, was busy with other things first.
> 
> Now, for the start have to correct myself, actually the observation (so not the
> forecast) data is fetched by some url which is taken from a global list with
> stations. That list is from https://w1.weather.gov/xml/current_obs/index.xml
> 
> So in that data it is the entry <xml_url>, thus in the case of "Rochester,
> Greater Rochester International Airport" this is
> http://weather.gov/xml/current_obs/KROC.xml. That data is nicely prepared for
> automated parsing. You can look at it in the web browser too, where the display
> will be enriched thanks to the <?xml-stylesheet href="latest_ob.xsl"
> type="text/xsl"?>
> 
> The url I gave before is actually the one to fetch the forecast. Not sure why
> there currently is no forecast data available for that location, perhaps some
> outage of the service? Ah, now there is forecast data again, try your url :)
> 
> 
> The laptop being suspended might be the actual issue which triggered the
> behaviour you saw, I need to check whether this results in instant repull of
> latest weather data if the update period has passed. Otherwise one might indeed
> see the data from before, and only have it updated once the normal update
> period has been reached.
> Also depends on network connectivity, so far I have not come around to check
> and brush over the related logic here.
> 
> -- 
> You are receiving this mail because:
> You reported the bug.
Comment 8 Friedrich W. H. Kossebau 2019-02-08 19:24:24 UTC
Seems there is something really wrong with the NOAA backend, not updating/pushiing new data to the widget. My two test instances have not updated for days now.
While those driven from BBC & wetter.com are working fine.

Time to move this up in my todo list some more, hopefully will tackle the next days.
Comment 9 jbf 2019-02-09 13:41:24 UTC
Interesting! Thank you for the update.


---- "Friedrich W. H. Kossebau" <bugzilla_noreply@kde.org> wrote: 
> https://bugs.kde.org/show_bug.cgi?id=404061
> 
> --- Comment #8 from Friedrich W. H. Kossebau <kossebau@kde.org> ---
> Seems there is something really wrong with the NOAA backend, not
> updating/pushiing new data to the widget. My two test instances have not
> updated for days now.
> While those driven from BBC & wetter.com are working fine.
> 
> Time to move this up in my todo list some more, hopefully will tackle the next
> days.
> 
> -- 
> You are receiving this mail because:
> You reported the bug.
Comment 10 Patrick Silva 2019-02-09 17:38:48 UTC
Created attachment 117951 [details]
BBC provider shows wrong current temperature

I have the same problem but I use BBC provider.
As we can see in my screenshot, when I right click the widget and select "Run the associated application" the webpage and the widget show different current temperatures.
Comment 11 Friedrich W. H. Kossebau 2019-02-09 17:47:36 UTC
(In reply to Patrick Silva from comment #10)
> Created attachment 117951 [details]
> BBC provider shows wrong current temperature
> 
> I have the same problem but I use BBC provider.
> As we can see in my screenshot, when I right click the widget and select
> "Run the associated application" the webpage and the widget show different
> current temperatures.

In this case though this is not really a bug, just an issue that there will be by design small mismatches now and then due to the fact that the weather dataengine pulls the data from the internet service, and does not get instantly push updates once the website has new data. 

Please take another look at the website, the actual last observation data is at the end of the webpage.
The forecast data (at least the max/min temperature) for the day is quite the same both on website and in the applet, no?
Comment 12 Patrick Silva 2019-02-09 18:13:24 UTC
You are right, website shows the same current temperature (28°C) under "Observations" when I scroll down.
When I seacrh for my city using BBC provider weather widget shows two entries, but unfortunately both of them show wrong current temperature: 28°C and 29°C, but the correct temperature is 35°C right now.
Wetter provider finds my city, but current temperature is not available. :(
Unfortunately noaa and envcan providers do not find my city.
As you can see in my screenshot, aside battery applet in the system tray there is another weather widget showing current temperature correctly.
It shows info from yr.no and owm providers.
https://github.com/kotelnik/plasma-applet-weather-widget

Thanks for your attention Friedrich.
Comment 13 Friedrich W. H. Kossebau 2019-02-09 18:20:57 UTC
Yes, having support for yr.no in the plasma weather dataengine as another "ion" plugin would be very nice. E.g. to have access to their satellite picture service.

I once looked into it, but sadly yr.no does (did?) not provide support for searching a location/station, which is something needed by the existing design of the Plasma Weather Dataengine and the kdeplasma addons weather applet.
So that would need some redesign of the weather data engine first, which I had no time left myself so far to look at.
But OT for this seemingly NOAA-backend-specific bug :)