How to remove inside temp from generated html (Seasons skin)

236 views
Skip to first unread message

Tom Stewart

unread,
Feb 9, 2023, 12:46:43 PM2/9/23
to weewx-user
From my reading of the doc, I have found the index.html.tmpl file for the Seasons skin, and the skin.conf file as well. The skin.conf file seems to be where I would need to make changes to remove a bunch of references to inTemp. But other reading suggests you really want to make changes to weewx.conf where possible, because it won't get overwritten with a software update. But the only place in the existing weewx.conf that seems to mention inTemp outside of a comment is in the StdQC section, which doesn't seem relevant in this case.

Do I just remove the refs in skin.conf? And if so, will those customizations get overwritten by software updates?

vince

unread,
Feb 9, 2023, 1:51:42 PM2/9/23
to weewx-user
Look at the commentary in the Seasons skin.conf file, which seems to say that you can turn it off in weewx.conf, which should make you upgrade proof.

# The following section contains variables that determine which observations
# and plots will be shown in the template files, and their order.  Like other
# configuration options, these can be overridden in the weewx config file.

[DisplayOptions]

Greg Troxel

unread,
Feb 9, 2023, 3:07:56 PM2/9/23
to vince, weewx-user
vince <vince...@gmail.com> writes:

> Look at the commentary in the Seasons skin.conf file, which seems to say
> that you can turn it off in weewx.conf, which should make you upgrade proof.
>
> # The following section contains variables that determine which observations
> # and plots will be shown in the template files, and their order. Like
> other
> # configuration options, these can be overridden in the weewx config file.
>
> [DisplayOptions]

For Standard, I edited index.tmpl (and also week/month/year) to remove
showing the values and I think referencing the plots. And then
skin.conf to not generate the plots. If you want to avoid anyone seeing
the data, you have to not install the graphs even if they are
referenced.

It's great if it's now possible to turn off inTemp by config. I would
suggest looking over what is in the html/web dir carefully after you
think you have it set up.

gjr80

unread,
Feb 9, 2023, 4:29:58 PM2/9/23
to weewx-user
The Standard skin was rather limited in what could be controlled via config file options; you could control formatting and labelling of data as well as generation of plots via config options, but display (or not) of content (obs and plots) required changes to the .tmpl template file. The Seasons skin was initially fairly similar though there were a few smarts in the template file to avoid Seasons trying to display data that does not exist; however, the user still needed to edit the template file to display/not display obs/plots. A parameterised version of the Seasons skin was included in WeeWX 4.6.0. The parametrised version of the Seasons skin supports the full wview_exteneded schema and (largely) automatically display obs/plots for which data is available. This version also introduced the [DisplayOptions] stanza in the Seasons skin config file (skin.conf) allowing the user to control what is/is not displayed via config options.

The [DisplayOptions] stanza can be set/modified in the Seasons skin config file or in the [StdReport] stanza in weewx.conf. As the OP points out, if you modify the skin config file then your changes are at risk of being overwritten should the skin be upgraded in future. Changes made in weewx.conf (referred to as overrides) are upgrade safe ie they will not be lost during an upgrade. Bear in mind that included skins seldom change and even when they do a WeeWX upgrade will not change the installed included skins; installed included skins need to be upgraded separately by the user. So if you were using WeeWX v4.5.1 or earlier with the Seasons skin and subsequently upgraded to v4.6.0 or later you will still be using a pre-v4.6.0 Seasons skin unless you manually upgraded the Seasons skin, ie you will not have the new parameterised Seasons skin.

Modifying the Seasons skin config file is fairly straightforward, you just edit skins/Seasons/skin.conf and simply make the necessary changes to the various [DisplayOptions] settings that already exist (eg remove inTemp to not display inside temperature obs/plots). Adding overrides to the Seasons skin in weewx.conf is not so obvious, you need to add settings rather than edit existing settings. To override Seasons skin options you need to find the Seasons skin stanza under [StdReport], it will likely look something like:

[StdReport]
   ....
    [[SeasonsReport]]
        # The SeasonsReport uses the 'Seasons' skin, which contains the
        # images, templates and plots for the report.
        skin = Seasons
        enable = true


You then need to add entries to this stanza. The Seasons skin [DisplayOptions] is accessed just as it is in the skin config file, but you need to add some additional square brackets to keep the config hierarchy. So to override the observations_current option you would do something like:

[StdReport]
   ....
    [[SeasonsReport]]
        # The SeasonsReport uses the 'Seasons' skin, which contains the
        # images, templates and plots for the report.
        skin = Seasons
        enable = true
        [[[DisplayOptions]]]
            observations_current = ....

If you want to not display inTemp then just copy and paste the observations_current setting from the skin config file but remove inTemp. Likewise for any other obs, likewise for any other settings.

The change log for each release will highlight any changes to included skins in a release, the relevant section of the Upgrade Guide will highlight any changes/actions that maybe required of the user when upgrading. It is always worthwhile looking at the relevant sections of these two documents before upgrading.

And of course making regular backups of skins and weewx.conf (as well as data) is invaluable if the worst happens.

Gary

vince

unread,
Feb 9, 2023, 5:23:21 PM2/9/23
to weewx-user
Thanks for the example and long explanation Gary.

Short answer is to add [[[DisplayOptions]]] in the [StdReport] [[SeasonsReport]] stanza in weewx.conf in order to be the most safe from upgrades. That's what I was struggling a little with verbalizing.

FWIW, the reason I suggested weewx.conf rather than skin.conf was for the upgrade scenarios.

The coming v5 will have a 'weectl station upgrade-skins' command that would likely overwrite any changes the user previously made in a core skin's files including its skin.conf file, if I understand the v5 futures correctly...

If the user sets the skin's DisplayOptions in weewx.conf they're upgrade safe because the weewx.conf file won't be overwritten on an upgrade-skins, so you can safely upgrade a skin without your tweaks being altered.

gjr80

unread,
Feb 9, 2023, 8:23:53 PM2/9/23
to weewx-user
Agree 100%, all of my changes to the included skins are implemented as overrides in weewx.conf. The proposed v5 weectl station upgrade-skins is essentially just a wrapper around the manual upgrade process the user must follow now, so loss of changes is just as likely now as it is under v5. Of course, that relies upon folks reading the docs/guides/changes and we know how problematic that can be :)

Gary
Reply all
Reply to author
Forward
0 new messages