Min/Max

240 views
Skip to first unread message

Monica Mulholland

unread,
Sep 8, 2024, 11:25:11 PM9/8/24
to weewx-user
In my previous version of the html output, I had a min/max at the bottom along with month, year, day etc. - see attached. Can somebody please remind me how  how to find how/where to turn this on.
minmax.png

Tom Keffer

unread,
Sep 8, 2024, 11:58:27 PM9/8/24
to weewx...@googlegroups.com
Monica, you are being very vague. Which previous version of the html output? You're making us look through your emails trying to figure out what you're referring to. Attach it!

Don't know what you mean by min/max at the bottom. None of the WeeWX skins include a min/max of anything along the bottom. Maybe along the side? And, min/max of what?

On Sun, Sep 8, 2024 at 4:25 PM Monica Mulholland <dunb...@gmail.com> wrote:
In my previous version of the html output, I had a min/max at the bottom along with month, year, day etc. - see attached. Can somebody please remind me how  how to find how/where to turn this on.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/95efbe46-d035-4514-9d2e-c2cec3056bffn%40googlegroups.com.

Monica Mulholland

unread,
Sep 9, 2024, 1:29:06 AM9/9/24
to weewx-user
Apologies for that confusion. I should have been more clear. In a previous version of my HTML sheet, (an example of which I do not have any more)...at the bottom of the sheet, along with the week, month, year was a button which would allow one to look at the global min or max for all of the history. Does that make any more sense. I had to redo the HTML when I had a crash and decided to change from a Pi3 to a Pi4....and somewhere along the way (while setting up the new HTML sheet) I seem to have missed out putting in the min/max buttons. Thank you for your help!

Tom Keffer

unread,
Sep 9, 2024, 1:34:34 AM9/9/24
to weewx...@googlegroups.com
That does not sound familiar. You must have been using a 3rd party skin.

Maybe it triggers somebody else's memory...?

Monica Mulholland

unread,
Sep 9, 2024, 1:40:53 AM9/9/24
to weewx-user
Hmm! Is there  a way of interrogating the data to find min/max temp, rainfall etc.....of the history?

Tom Keffer

unread,
Sep 9, 2024, 1:46:32 AM9/9/24
to weewx...@googlegroups.com
Of course. For example, the tag

$alltime.outTemp.max

will give the maximum temperature ever seen.

It's all in the Customization Guide, in this case, section Aggregation periods. Be sure to read it.

-tk



Monica Mulholland

unread,
Sep 9, 2024, 1:50:20 AM9/9/24
to weewx-user
Yes, I just found the alltime template....being over 60, my memory is not as good as it was! See attached.....how do I call that sheet from the main HTML sheet?
alltime.png

Tom Keffer

unread,
Sep 9, 2024, 1:36:10 PM9/9/24
to weewx...@googlegroups.com

Graham Eddy

unread,
Sep 9, 2024, 2:08:39 PM9/9/24
to WeeWX User
vintage wine - improves with age
⊣GE⊢

On 9 Sep 2024, at 11:35 PM, Tom Keffer <tke...@gmail.com> wrote:

I'm 72.

Monica Mulholland

unread,
Sep 9, 2024, 9:20:39 PM9/9/24
to weewx-user
Ahm! Over 60 covers a lot of ground! :)...but you win the burrito!.......anyway...back to the matter at hand....remind me, please, how to call the  alltime template from the standard template?

Tom Keffer

unread,
Sep 9, 2024, 9:54:20 PM9/9/24
to weewx...@googlegroups.com
There is no alltime template that comes with the Standard skin, so if you have one in hand, you must have obtained it from someplace else. If it follows the same pattern as the "day", "week", "month", and "year" templates, and assuming it is named "alltime.html.tmpl", and assuming it is located in the same place as its cousins, and assuming it is mentioned in skin.conf, then I suppose you would add a button for it on the bottom of index.html.tmpl template. In that case, the bottom of index.html.tmpl would contain something like this

        <input type="button" value=$pgettext("Buttons","Current") onclick="openURL('index.html')" />
        <input type="button" value=$pgettext("Buttons","Week") onclick="openURL('week.html')" />
        <input type="button" value=$pgettext("Buttons","Month") onclick="openURL('month.html')" />
        <input type="button" value=$pgettext("Buttons","Year") onclick="openURL('year.html')" />
        <input type="button" value=$pgettext("Buttons","All time") onclick="openURL('alltime.html')" />

where the highlighted line is added.

But, there are a lot of assumptions there. You'll have to give us a lot more details to be sure.

-tk



p q

unread,
Sep 9, 2024, 10:03:32 PM9/9/24
to weewx...@googlegroups.com
I don't know if this is helpful or not.

I use the standard skin and I have a section where it pulls out the min/max temperature for the current day of the year. And rain, if there was any.

               <td class="stats_label">
                  On This Day<br/>
                  $day.dateTime.format("%b %d")
                </td>
                <td class="stats_data" style="font-size: 10pt;">
                #for $day in $this_span.periods
                   #if $day.dateTime.format("%Y")!=$year.dateTime.format("%Y")
                      $day.dateTime.format("%Y")<br/>
                      &nbsp; H: $day.outTemp.max &nbsp;&nbspL: $day.outTemp.min<br/>
                      #if $day.rain.sum.raw is not None and $day.rain.sum.raw >0.0
                         &nbsp Rain: $day.rain.sum<br/>
                      #end if
                   #end if
                #end for  
                </td>
 



--
Peter Quinn
(415)794-2264

gjr80

unread,
Sep 10, 2024, 1:10:57 AM9/10/24
to weewx-user
I seem to remember helping you with this a few years ago, if you are still using the Standard skin this thread may help. You would have to work through manually to reconstruct your page, but I guess that is the price you have to pay. If you are using/intending to use the Seasons skin then that link will be of limited use as the Seasons skin works quite differently.

Gary

Monica Mulholland

unread,
Sep 10, 2024, 4:32:20 AM9/10/24
to weewx-user
Thank you for that Gary, much appreciated....I had forgotten all about that.....see what I mean about being (well) over 60! I will work through it. I have found in my backup files alltime.html and alltime.html.tmpl....but have not had time to look into them yet!

gjr80

unread,
Sep 10, 2024, 5:40:35 AM9/10/24
to weewx-user
On Tuesday 10 September 2024 at 14:32:20 UTC+10 dunb...@gmail.com wrote:
see what I mean about being (well) over 60! 

Tell me about it, almost but not quite there yet!

alltime.html.tmpl is what you want, hopefully it's a recent copy. While you're looking see if you have an old copy of index.html.tmpl, it will likely have the code that added an 'alltime' button to the bottom of your main page, but if not that one is an easy fix.

Gary
 

Monica Mulholland

unread,
Sep 10, 2024, 7:21:26 AM9/10/24
to weewx-user
Thanks for that! I have found these two files from 2019...hopefully they are the correct ones....as they are from 2019 (according to the time stamp!)
index.html.tmpl
alltime.html.tmpl

gjr80

unread,
Sep 10, 2024, 10:19:41 PM9/10/24
to weewx-user
Had a quick look at those files and they should be fine, or if not pretty close to the mark. index.html.tmpl has the code for a 'Max/Min' button and alltime.html.tmpl appears to have all the correct $alltime tags. See how you go. Then once its working make a backup copy of you skins directory and weewx.conf to keep with your regular database backups. :)

Gary

Monica Mulholland

unread,
Sep 11, 2024, 7:25:25 AM9/11/24
to weewx-user
Thanks Gary, 

sorry to bother you yet again with the same problem......having read back through our correspondence in 2019...(i can't believe I was clever enough to do this back then....I certainly didn't  lean not much from it...coz I don't feel so clever now!) I think that the steps I need to follow to get back to there are to 
1. install xstats.py in the correct place and 
2. put the two files above (index.html.tmpl and alltime.html.tmpl) into the skins folder and all should work fine.....have I missed anything?

If (a big if) that is correct, then from your instruction

"Hi,

There are a few steps involved in achieving what you want to do. First the historical max/min - by this I presume you mean all time statistics - those that cover all of your weeWX data and not just the last day, month or year.

If I have this right you need to extend weeWX so that you can access stats from all of your data, this is most easily achieved by installing the xstats example extension. You will find the xstats files are in the /usr/share/doc/weewx/examples directory. I would install manually and just follow step 1 in the readme.txt remembering later that you will need to enable the alltime stats for your templates/reports by following step 2. You can install xstats using wee_extension but that will also install the example web page which you probably do not want.

Now that you have xstats installed you can use tags like $alltime.outTemp.max in report templates to display the maximum outside temperature. The time it occurred will be $alltime.outTemp.maxtime. Just like $day, $month and $year tags but you use $alltime. If you are not familiar with weeWX tags it is worth reading the Tags section of the Customization Guide."

I should be able to find xstats.py in /user/share/doc/weewx/examples.....but as you will see from the attached screenshot.....that folder does not exist.....what am I missing?

WeewxExamples.png

gjr80

unread,
Sep 11, 2024, 8:54:41 AM9/11/24
to weewx-user
Some comments below.

Gary

On Wednesday 11 September 2024 at 17:25:25 UTC+10 dunb...@gmail.com wrote:
Thanks Gary, 

sorry to bother you yet again with the same problem......having read back through our correspondence in 2019...(i can't believe I was clever enough to do this back then....I certainly didn't  lean not much from it...coz I don't feel so clever now!) I think that the steps I need to follow to get back to there are to 
1. install xstats.py in the correct place and 
2. put the two files above (index.html.tmpl and alltime.html.tmpl) into the skins folder and all should work fine.....have I missed anything?

That's about it, but you will also need to tell WeeWX to generate alltime.html, I alluded to this further down my 2019 post but did not give any specifics. All you need do is edit the skin config file for your Standard skin and add a couple of lines to the [CheetahGenerator] [[ToDate]] stanza. Where that file is will depend on how you installed WeeWX. You've found weewx.conf, have a look in the directory containing weewx.conf and you should find a skins/Standard directory, that is where skin.conf should be. Edit skin.conf and insert the highlighted lines as follows:

[CheetahGenerator]
    ....
    [[ToDate]]
        ....        
        [[[year]]]
            template = year.html.tmpl

        [[[alltime]]]
            template = alltime.html.tmpl
            
Once you have installed xstats, created alltime.tmpl.html and modified skin.conf WeeWX will automatically start generating alltime.tmpl - no need for a restart. 
 

I should be able to find xstats.py in /user/share/doc/weewx/examples.....but as you will see from the attached screenshot.....that folder does not exist.....what am I missing?

Another v5 change I'm afraid. Again the location of the examples (and xstats) depends on how you installed WeeWX. Have a look in the directory containing weewx.conf, you should see a directory named examples; that is where you should find the xstats directory. Read the readme.txt, it has been updated for v5, and (again) I expect you will want to follow the manual install instructions.
 

Monica Mulholland

unread,
Sep 11, 2024, 9:21:49 AM9/11/24
to weewx-user
Thank you Gary, do you have a favorite charity? I would like to make a donation to it for your constant helpfulness and kindness. You folks at weewx are indeed one of a kind!

Monica Mulholland

unread,
Sep 11, 2024, 11:10:35 AM9/11/24
to weewx-user
Hmm! found it ...but....

weatherpi@weatherpi:~ $ sudo weectl extension install /usr/share/doc/weewx/examples/xstats

Using configuration file /etc/weewx/weewx.conf

Install extension '/usr/share/doc/weewx/examples/xstats' (y/n)? y

Traceback (most recent call last):

File "/usr/share/weewx/weectl.py", line 75, in <module>

main()

File "/usr/share/weewx/weectl.py", line 67, in main

namespace.func(namespace)

File "/usr/share/weewx/weectllib/__init__.py", line 90, in dispatch

namespace.action_func(config_dict, namespace)

File "/usr/share/weewx/weectllib/extension_cmd.py", line 116, in install_extension

ext.install_extension(namespace.source, no_confirm=namespace.yes)

File "/usr/share/weewx/weecfg/extension.py", line 132, in install_extension

raise InstallError(f"Path {extension_path} does not exist.")

weecfg.extension.InstallError: Path /usr/share/doc/weewx/examples/xstats does not exist.

weatherpi@weatherpi:~ $

Monica Mulholland

unread,
Sep 11, 2024, 11:15:00 AM9/11/24
to weewx-user
I even created the directory and it still could not find it?!?!?
examplesxstats.png

gjr80

unread,
Sep 12, 2024, 1:52:19 AM9/12/24
to weewx-user
The problem is the extension installer is not finding the xstats extension files in /usr/share/doc/weewx/examples/xstats. Creating the directory just creates an empty directory but none of the xstats files will be present. I know the readme says /usr/share/doc/weewx/examples/xstats, but have a look in /etc/weewx, is there a directory named examples? If so does it contain a directory named xstats and if so does it contain the xstats extension files? If it does try this command instead:

$ sudo weectl extension install /etc/weewx/examples/xstats

Note that if you install the xstats extension using weectl extension the example xtstats web page will be generated each report cycle. You don't need this file so you might as well disable its generation in weewx.conf. To do this locate the [StdReport] [[xstats]] stanza and add a line enable = false as follows:

[StdReport]
    ....
    [[xstats]]
        skin = xstats
        HTML_ROOT = xstats
        enable = false

or you can just delete the entire [[xstats]] stanza. Either or.

On Wednesday 11 September 2024 at 19:21:49 UTC+10 dunb...@gmail.com wrote:
Thank you Gary, do you have a favorite charity? I would like to make a donation to it for your
 
Not really. I am more than happy with just a 'thank you'

Gary

Monica Mulholland

unread,
Sep 12, 2024, 7:34:26 AM9/12/24
to weewx-user
Well ThankYou*10^100

gjr80

unread,
Sep 12, 2024, 9:21:15 PM9/12/24
to weewx-user
Appreciated.

One thing I don't think is mentioned in the linked thread (but you must have worked it out since you previously got alltime tags working) is you will need to tell the Standard skin to load the xstats search list. You do this by adding a line to the Standard skin.conf:

[CheetahGenerator]
    search_list_extensions = user.xstats.ExtendedStatistics
    [[ToDate]]

If there happens to already be a search_list_extensions setting in skin.conf (there shouldn't be) then instead append a comma followed by the user.xstats.ExtendedStatistics:

    search_list_extensions = some.other.extension, user.xstats.ExtendedStatistics

Gary
Reply all
Reply to author
Forward
0 new messages