ANNOUNCE: AstroWeather – a GNOME Shell extension for astronomical weather forecasts

In the time off over Christmas and the New Year I decided to investigate & learn about the creation of GNOME Shell extensions. As an amateur astronomer, I have an interest in knowing what the “seeing conditions” will be like in the forthcoming nights. There are a number of different websites which provide forecasts, as well as apps for Android and iPhone. I use the Android AstroPanel application quite frequently, but most of the day I’m sitting in front of my laptop and would rather have the data presented there, alongside the regular weather forecast, rather than on my phone. So after finding that extensions are quite simple to create, I decided to create an extension for displaying an astronomical weather forecast for GNOME Shell.

The design of my extension is a cross between the well known Weather extension and the 7Timer/AstroPanel forecast display. Rather than describe it, just look at this screenshot:

AstroWeather GNOME Shell Extension

AstroWeather GNOME Shell Extension

The actual weather forecast is obtained from the 7Timer REST service using the Soup HTTP client APIs, which conveniently returns JSON data perfect for accessing from JavaScript. The times for sunrise/sunset are calculated locally, using code that I derived from the BSD licensed suncalc project. Finally the locations are pulled from the GNOME GWeather database.

The first release of AstroWeather is available for installation with GNOME 3.10 from the GNOME Shell Extensions website. I didn’t realize that you had to list every single darn GNOME shell version explicitly in the metadata.json file, so while it works fine with GNOME 3.12, the extensions website will seemingly refuse to let you install it :-( I’ll upload a new version which explicitly says it supports 3.12 soon. There’s also a slight bug with sunrise/sunset calculations which cause it to display “Invalid Date” if there is no sunset/sunset time available – in the UK we’re far enough north that you never get any astronomical sunset in June, and I forgot to handle that possibility since I wrote the code when it was nice and dark :-)

The, GPLv2+ licensed, source code is available as a GIT repository on

As well as fixing bugs, in the future I’d like to make it possible to specify arbitrary locations with long+lat since the GWeather location database is very limited in its choices. Using some kind of GeoIP service would make it possible to just “do the right thing” for your current location. I’d also like to have it display the phase of the moon, inform you which planets will be visible overnight and list any ISS overhead passes. Finally I want to integrate with astronomical forecast data sources beyond 7Timer, since their REST API has sadly been having extended periods of downtime. Contributions from any other interested people are of course welcome, either patches via email or merge requests via gitorious.