Installing Skyfield almanac/map on Standard skin

137 views
Skip to first unread message

bgra...@umw.edu

unread,
Mar 13, 2026, 11:15:25 AM (9 days ago) Mar 13
to weewx-user
I have weewx 5.3.1 (pip) running on an RPI5 under Bookworm and would like to add Skyfield to my Standard skin. Most of the discussions deal with the Seasons skin and, not being much of a programmer, I am not sure how to integrate this on my Standard skin. I have installed the two extensions (almanac and map). 
I have set this up on a test machine with trixie (RPI5) using Seasons where it is working but I want to use the Standard skin since all of my customization is there.
Much appreciated for any pointers.
Cheers,
Bob

Karen K

unread,
Mar 13, 2026, 5:17:52 PM (9 days ago) Mar 13
to weewx-user
The standard skin does not have a separate page for almanac data. As you say you are less experienced in web programming, you could add additional tags to the main page. 

To place something on the left side under the current data table insert it before the "</div> <!--End class "stats_group" -->" line. For example you could write there:

$almanac.skymap(width=514)


or

$almanac.sun.year_diagram(width=514)


or some other diagram.

For values on the right side in the almanac section look for "Today's Almanac". After that you find a table with lines <tr> and </tr>. Between them are two lines starting with <td. All this together is a line in the table. The two <td lines are the columns. The first one is the label, the second one the value. You can write new lines like this, for example:

                <tr>

                  <td class="label">$gettext("Perihelion"):</td>

                  <td class="data">$almanac.next_perihelion</td>

                </tr>


If you need the label in another language than English, put the translation into the [Texts] section of the appropriate language file in the lang sub-directory.

Karen K

unread,
Mar 13, 2026, 6:25:02 PM (9 days ago) Mar 13
to weewx-user
Additionally I wrote a little example. Save the file almanac.html.tmpl to the directory of the standard skin. The add in skin.conf before the [[[RSS]]] line:

        [[[almanac]]]

            template = almanac.html.tmpl


And add to each .tmpl file at the end after the other buttons the line:

<input type="button" value=$pgettext("Buttons","Almanac") onclick="openURL('almanac.html')" />


Wait 5 minutes and press "Reload". The you will see a new button, called "Almanac" at the bottom of the page. 

The result is not really beautiful, but it shows the principle.

almanac.html.tmpl

bgra...@umw.edu

unread,
Mar 13, 2026, 6:47:06 PM (9 days ago) Mar 13
to weewx-user
Thanks so much, Karen, let me play around with this and I’ll get back to you. Bob

Karen K

unread,
Mar 14, 2026, 2:38:16 AM (8 days ago) Mar 14
to weewx-user
bgra...@umw.edu schrieb am Freitag, 13. März 2026 um 23:47:06 UTC+1:
Thanks so much, Karen, let me play around with this and I’ll get back to you. Bob

 I added some values and fixed the layout. Later I will add that to the examples at Github. 
almanac.html.tmpl

bgra...@umw.edu

unread,
Mar 14, 2026, 4:28:16 PM (8 days ago) Mar 14
to weewx-user
Hi Karen,
It seems I'm still having trouble with this. I have attached a file showing my modifications which you indicated as needed for the skyfield data to appear of my standard weewx skin. However, it's very possible I did something wrong. 
I was working with my regular station (probably a dumb idea) which is weewx 5.3.1 on bookworm. I have listed my pip and python versions as they may be a problem.
The "almanac" button appears as it should but doesn't find almanac.html anywhere on the server so it's not being created.
I realized that the skymap extension was missing so I installed it. At this point, weewx crashed looking for 'moonMonthSpan'. I have included the error in my file.
I removed the skymap extension and reinstalled my backup versions of (Standard) skin.conf and index.html.tmpl. All seems to be working (grattans.org/wx) again.

If the attached file helps, please let me know. I can do a debug run of weewx if you want. Having a low skill set in this area indicates that I've probably done something stupid.
Don't waste a lot of time on this if you are busy. Many thanks again for your help.
Bob
forKaren.txt

Karen K

unread,
Mar 14, 2026, 4:53:24 PM (8 days ago) Mar 14
to weewx-user
I guess I can provide some answers.

Generally both extensions (weewx-skyfield-almanac and weewx-skymap-almanac) need to be of the same version. You tried version 0.4 of weewx-skyfield-almanac together with a more recent version of weewx-skymap-almanac. Unfortunately that does not work. Please install the actual version of weewx-skyfield-almanac.

In case of trouble you can easily switch off those extensions by setting enable = false in section [Almanac] in weewx.conf. 

Did you save the file almanac.html.tmpl I provided yesterday to the directory of the "Standard" skin, which is in your case ~/weewx-data/skins/Standard?

bgra...@umw.edu

unread,
Mar 14, 2026, 5:41:46 PM (8 days ago) Mar 14
to weewx-user
Yes, almanac.html.tmpl is installed as you instructed.  I’ll try to coordinate the  Skyfield versions tomorrow and let you know.
Is my python 3.11 the good version ? Many continued thanks! Bob

Karen K

unread,
Mar 15, 2026, 7:31:46 AM (7 days ago) Mar 15
to weewx-user
bgra...@umw.edu schrieb am Samstag, 14. März 2026 um 22:41:46 UTC+1:
Yes, almanac.html.tmpl is installed as you instructed.  I’ll try to coordinate the  Skyfield versions tomorrow and let you know.

Then I would look carefully for typos. If almanac.html.tmpl is in the same directory as skin.conf, it should find it.
 
Is my python 3.11 the good version ? 

I think so.

This is how it should look like in the end:

Wöllsdorf Test Today's Almanac.png

bgra...@umw.edu

unread,
Mar 15, 2026, 10:51:27 AM (7 days ago) Mar 15
to weewx-user
Hi Karen,
Success! I checked for typos with no luck but when I reinstalled the weewx skyfield almanac it gave me 0.6 versions for both the almanac and skymap, and that seems to have been the problem. Thanks so much for your help and your many contributions to the weewx software and the weewx user group.
Vielen Dank!
Bob
Reply all
Reply to author
Forward
0 new messages