weewx-skyfield

weewx-skyfield

The drop-in upgrade for WeeWX’s almanac — Skyfield-powered $almanac tags, stars, eclipses, and a planetarium-style Sky page.

Installation · Almanac tags · The Sky page · Sky panels in your skin · Translating (i18n) · Known Skyfield issues · GitHub project


weewx-skyfield replaces WeeWX’s built-in almanac (PyEphem or weeutil) for report generation. Report tags such as $almanac.sunrise, $almanac.moon.transit, $almanac(horizon=-6).sun(use_center=1).rise and $almanac.next_full_moon (as used, for example, in the Seasons skin’s Celestial page) are computed with Skyfield and JPL’s DE421 ephemeris, which is installed with the extension — no downloads at runtime, and much more accurate values than PyEphem, which is deprecated by its own author in favor of Skyfield.

No skin changes are needed: the extension answers the same $almanac tags as the built-in almanac. Install it, restart WeeWX, and every report generated from then on uses Skyfield values.

The Sky page

Highlights

Requirements

Skyfield 1.47 is the minimum supported version; development and the test suite track the current Skyfield release, so upgrading is recommended — see Upgrading Skyfield.

Quick start

weectl extension install weewx-skyfield.zip

then restart WeeWX — the installation page has the full steps, including installing the Skyfield prerequisite.

weewx-skyfield in action

The celestial pages of www.paloaltoweather.com — Today, Sun, Moon, Planets and Stars — demonstrate what can be accomplished with this extension, live.

Live-updating pages

weewx-skyfield computes at report time: its tags — and the Sky page — refresh once per report cycle. For pages that update continuously in the browser, add weewx-loopdata (same author, 5.0 or later): its almanac fields — report almanac tags with the $ removed — are evaluated against the registered almanac (this extension’s, once installed) on every loop packet and published in loop-data.txt for the page’s JavaScript to pick up. One computation engine serves the report tags and the live values, so they always agree. weewx-celestial is a complete worked example — a live Geocentric panel built entirely from loopdata almanac fields — and the paloaltoweather.com pages above update the same way.

Relationship to other extensions

Credits

weewx-skyfield stands on the work of others: Brandon Rhodes, author of the Skyfield astronomy library that performs every computation in this extension; NASA’s Jet Propulsion Laboratory (JPL), whose DE421 planetary ephemeris provides the positions of the sun, moon, and planets; the European Space Agency (ESA), whose Hipparcos mission produced the star catalog, and the CDS (Strasbourg astronomical Data Centre), which distributes it via VizieR; the International Astronomical Union (IAU) Working Group on Star Names, whose Catalog of Star Names supplies the named-star tags; the U.S. Naval Observatory (USNO) and Jean Meeus, whose published definitions and algorithms are the reference for rise/set, twilight, and other almanac conventions; and Tom Keffer, Matthew Wall, and the WeeWX project, whose almanac framework this extension plugs into.

Licensing

weewx-skyfield is Copyright (C)2022-2026 by John A Kline and licensed under the GNU Public License v3. The bundled star catalog excerpt contains data from the Hipparcos and Tycho Catalogues, which ESA distributes under the CC BY-NC 3.0 IGO licence. Credit: ESA.