Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple weather sources #207

Open
ctubbsii opened this issue Sep 11, 2014 · 8 comments
Open

Support multiple weather sources #207

ctubbsii opened this issue Sep 11, 2014 · 8 comments

Comments

@ctubbsii
Copy link

I love this weather app, but it is currently broken, because it relies on a single weather source from libgweather, for which there's currently bugs due to the primary weather source it uses changing its API. (See links below.)

To mitigate that, it'd be great if this extension could support multiple weather sources, which can be configured in the extension. These can either be different libgweather sources (if it supports multiple already), or it can be non-libgweather sources.

I think the multiple sources within libgweather might be possible, because gnome-weather works fine, even while this extension is broken and I suspect it also uses libgweather.

https://bugzilla.gnome.org/show_bug.cgi?id=736334 (Gnome 3.12)
https://bugzilla.redhat.com/show_bug.cgi?id=1139747 (RHEL 7)
https://bugzilla.redhat.com/show_bug.cgi?id=1140475 (Fedora 19)
https://bugzilla.redhat.com/show_bug.cgi?id=1140476 (Fedora 20)

@ferdnyc
Copy link

ferdnyc commented Sep 13, 2014

New Features

I agree that supporting multiple libgweather sources might be interesting, to mitigate the impact of source outages like this one. If Gnome Weather was working through the yr.no outage, then libgweather must be multi-source. (Also implying that Gnome Weather either doesn't use yr.no, or automatically bypassed it during the breakage.) If there's a way to leverage that capability in the extension, and hopefully without too much hassle, then I think that idea makes a lot of sense.

I don't really know that it should be configurable, though; wouldn't automatic failover to the next available source be better? That way, the user wouldn't have to know or care about data sourcing, and would never have to bother with initial/outage (re-)configurations to receive weather data. Gnome Weather may even have that functionality already, ripe for "borrowing".

Adding support for non-libgweather sources, OTOH... that's a whole different level of undertaking.

Outage Fix

...All that being said, the specific problem at hand — the yr.no API breakage — is a libgweather bug, and has been quickly fixed there. Updated distro packages are already being pushed out (my Fedora 20 machines picked them up yesterday), and after updating libgweather and restarting Gnome Shell the extension was back in working order.

So, really, while I definitely support some of your suggested extension changes, in terms of addressing the immediate problem the fix is:

  1. Install an updated libgweather (which contains yr.no fixes) from your distro.
  2. Type Alt+F2 r Enter to restart Gnome Shell, or log out and back in.

@ctubbsii
Copy link
Author

Automatic failover/bypass is the primary concern.

I was mainly thinking configurable, in case users preferred a specific source, for various reasons (more trustworthy, less bandwidth use, etc.). But, it probably makes more sense to defer to libgweather for any configurable settings anyway. And, supporting non-libgweather sources probably isn't worth it.

Fedora has patched this, so it's not an immediate concern for me, personally. But, if libgweather does support multiple sources, then it'd be nice to make use of those in this extension, in future, for the failover alone.

@Neroth
Copy link
Owner

Neroth commented Oct 3, 2014

libGWeather support multiple sources but ... bug :/ I've try to add it in the extension but it fail ...

If you want to try you will need to change this three lines :
this.info.set_enabled_providers(GWeather.Provider.METAR |
GWeather.Provider.YR_NO |
GWeather.Provider.OWM);

https://developer.gnome.org/libgweather/3.12/GWeatherInfo.html#GWeatherProvider

@Vistaus
Copy link

Vistaus commented Nov 20, 2014

But this extension can't be using libgweather, right? 'Cause my city's not in the list of this extension for many, many months now while the libgweather-powered GNOME Weather app does support my city in the list and forecast.

@Neroth
Copy link
Owner

Neroth commented Nov 20, 2014

This extension use libGWeather, just go see the code ;). We also use the same settings (temp units etc, but not all).

In the last verstion of libGWeather (3.14) you can search all city again ;) !

@Vistaus
Copy link

Vistaus commented Nov 20, 2014

I have the latest version of libgweather 3.14.x (I'm using Antergos based on Arch, so I'm always up-to-date with GNOME stuff). Still, GNOME Weather finds my city no problem while this extension can't find my city. How come?

@Neroth
Copy link
Owner

Neroth commented Nov 20, 2014

What is the name of your city ? I will try when I have time

@Vistaus
Copy link

Vistaus commented Nov 20, 2014

Oh wait, actually it works now with the latest version of this extensions (as opposed to before). Although my city's listed in three provinces while there should only be one listed (there's no other city with this name) like GNOME Weather app. But it finally works so I'm happy, thanks :)

My city name's Almere (country: The Netherlands, province: Flevoland).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants