Bug 389766

Summary: Weather widget does not show the temperature beside or over the icon in the Plasma panel when I use wetter.com provider
Product: [Plasma] kdeplasma-addons Reporter: Patrick Silva <bugseforuns>
Component: WeatherAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: ab, abrouwers, isma.af, nate, oleg, plasma-bugs, pqwoerituytrueiwoq, rapiteanu.catalin, zargulthewizard, zawertun
Priority: NOR    
Version: 5.11.95   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 6.2
Sentry Crash Report:
Attachments: screenshot

Description Patrick Silva 2018-02-01 19:43:45 UTC
Created attachment 110294 [details]
screenshot

Arch Linux (plasma 5.12 beta) and neon dev unstable are affected. See screenshot.
Temperature is available when I use bbcukmet provider.
Comment 1 Friedrich W. H. Kossebau 2018-02-01 21:17:32 UTC
wetter.com does not provide observation data, only forecast data (at least in the public free data API).

That is also why in the full display there is no temperature shown or a current weather status string. The icon used in the compact version and in the top-panel of the full display is simply taken from the forecast data for the day.

That's something the old code has done since ages. When I took over maintainership to port the applet to Plasma 5, I left it at that because I had no instant idea how to improve this. And still haven't. I agree this needs improvement, not obvious when as user just looking at the applet UI.
Possibly could be done by adding the concept of capabilities for the different providers, so the UI knows what the data backend can do.

Right now the frontend just gets a set of key-value data, where either there is data for the different defined keys, or not.
Comment 2 Nate Graham 2022-04-07 15:04:08 UTC
*** Bug 452363 has been marked as a duplicate of this bug. ***
Comment 3 pqwoerituytrueiwoq 2022-04-08 04:15:04 UTC
Can't we simply use the current time to reference what part of the forecasts is most accurate for current weather and use that?
Comment 4 Patrick Silva 2022-12-21 10:53:23 UTC
*** Bug 463273 has been marked as a duplicate of this bug. ***
Comment 5 Andrew Brouwers 2022-12-21 11:30:09 UTC
Any thought to providing another backend, then?  I think gnome uses met.no, for example.
Comment 6 Andrew Brouwers 2022-12-21 13:44:28 UTC
Also, if "wetterer" will never allow this to be possible, it might make sense to remove this as an option in the settings?  It doesn't seem right to offer a feature that could never possibly work.
Comment 7 Patrick Silva 2023-02-18 13:34:11 UTC
Currently there are options the show the temperature beside or over the widget icon if the widget is placed on Plasma panel.
None works with wetter.com provider.

Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Graphics Platform: Wayland
Comment 8 Alex 2023-02-20 10:22:11 UTC
(In reply to Patrick Silva from comment #7)
> Currently there are options the show the temperature beside or over the
> widget icon if the widget is placed on Plasma panel.
> None works with wetter.com provider.
> 
> Operating System: KDE neon Unstable Edition
> KDE Plasma Version: 5.27.80
> KDE Frameworks Version: 5.104.0
> Qt Version: 5.15.8
> Graphics Platform: Wayland

Same by me. I do not recall if these options were available before Plasma 5.27 but the temperature showed correctly in the panel.
Comment 9 Andrew Brouwers 2023-02-20 15:12:26 UTC
Is it possible to switch providers, or offer others (for example, met.no or openweathermap seem popular with other OSS projects) for people to choose?  It seems broken to ship wetter if it will never work for such a common case.
Comment 10 Wilbur Jaywright 2023-07-10 02:02:47 UTC
Same problem, NixOS.
Comment 11 Ismael Asensio 2024-05-25 10:27:00 UTC
*** Bug 483739 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2024-06-12 14:03:01 UTC
The fact that wetter.com doesn't provide instantaneous temperature information is really weird IMO. In addition to this bug report, I saw a lot of grumbling about it on Reddit the last time the weather widget came up. It also only supports 3 days of forecasting. Maybe we should just delete it.
Comment 13 pqwoerituytrueiwoq 2024-06-12 14:09:08 UTC
with how bad the source of data is that is a fair option, though i will point out comment #3, doing that would make wetter a minimum viable source, if data lacks point 'C' but you can calculate 'C' with 'A' and 'B' there is no reason not to
Comment 14 Ismael Asensio 2024-06-12 14:27:51 UTC
(In reply to Nate Graham from comment #12)
> The fact that wetter.com doesn't provide instantaneous temperature
> information is really weird IMO. In addition to this bug report, I saw a lot
> of grumbling about it on Reddit the last time the weather widget came up. It
> also only supports 3 days of forecasting. Maybe we should just delete it.

The main problem for that is that wetter.com seems to be the only provider for many locations worldwide.

I would happily agree to delete it but only when we have an alternative for this kind of (even non perfect) coverage.
Comment 15 pqwoerituytrueiwoq 2024-06-12 16:37:49 UTC
Another option is to add a way to provide a supplemental data URI to provide real time data

setting up a Raspberry pi, PICO, ESP32, etc. with a DS18B20, DHT22, and/or BME280 is not that hard or expensive
Comment 16 Andrew Brouwers 2024-06-12 17:02:05 UTC
(In reply to Ismael Asensio from comment #14)
> (In reply to Nate Graham from comment #12)
> > The fact that wetter.com doesn't provide instantaneous temperature
> > information is really weird IMO. In addition to this bug report, I saw a lot
> > of grumbling about it on Reddit the last time the weather widget came up. It
> > also only supports 3 days of forecasting. Maybe we should just delete it.
> 
> The main problem for that is that wetter.com seems to be the only provider
> for many locations worldwide.
> 
> I would happily agree to delete it but only when we have an alternative for
> this kind of (even non perfect) coverage.

Just curious, can it be de-prioritized when superior providers are available in the same location?  For example, wetter was the "default" when I last tried, but I live in an area where far better providers are available.  Perhaps some kind of rankings to make wetter only used, if nothing else is available?
Comment 17 Ismael Asensio 2024-06-12 17:17:10 UTC
(In reply to Andrew Brouwers from comment #16)
> (In reply to Ismael Asensio from comment #14)
> > (In reply to Nate Graham from comment #12)
> > > The fact that wetter.com doesn't provide instantaneous temperature
> > > information is really weird IMO. In addition to this bug report, I saw a lot
> > > of grumbling about it on Reddit the last time the weather widget came up. It
> > > also only supports 3 days of forecasting. Maybe we should just delete it.
> > 
> > The main problem for that is that wetter.com seems to be the only provider
> > for many locations worldwide.
> > 
> > I would happily agree to delete it but only when we have an alternative for
> > this kind of (even non perfect) coverage.
> 
> Just curious, can it be de-prioritized when superior providers are available
> in the same location?  For example, wetter was the "default" when I last
> tried, but I live in an area where far better providers are available. 
> Perhaps some kind of rankings to make wetter only used, if nothing else is
> available?

This is an interesting idea. Might be a good small improvement.

Currently there's no special sorting, but it is first reported first served. The more advanced providers usually are placed last because it takes them more time to initialize and produce their results.
Comment 18 Bug Janitor Service 2024-06-12 22:51:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kdeplasma-addons/-/merge_requests/597
Comment 19 Ismael Asensio 2024-06-19 16:34:58 UTC
Git commit 5ebd55a4c4ccbbd0505cd31a09b0cc598809fa98 by Ismael Asensio.
Committed on 19/06/2024 at 16:27.
Pushed by iasensio into branch 'master'.

applets/weather: Promote search results from services with better quality

To help users choose a better provider when available, let's place
their search results in the top positions

M  +40   -6    applets/weather/plugin/locationlistmodel.cpp
M  +4    -9    applets/weather/plugin/locationlistmodel.h

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/5ebd55a4c4ccbbd0505cd31a09b0cc598809fa98
Comment 20 Ismael Asensio 2024-06-19 16:35:06 UTC
Git commit 6d434caa38f6d85bdc866ddc17e13f89faa7485b by Ismael Asensio.
Committed on 19/06/2024 at 16:27.
Pushed by iasensio into branch 'master'.

applets/weather: Only show wetter.com results as a fallback

The provider "wetter.com" does not provide current weather status,
just a 3-day forecast, resulting in a less useful experience
and bug reports about its "missing data".

On the other hand, it has the largest coverage, so let's offer
those results only when no other provider found a location
that matches the search.
FIXED-IN: 6.2

M  +11   -1    applets/weather/plugin/locationlistmodel.cpp

https://invent.kde.org/plasma/kdeplasma-addons/-/commit/6d434caa38f6d85bdc866ddc17e13f89faa7485b