Tracking Rainfall 9 AM to 9 AM (Australia)

174 views
Skip to first unread message

Robert D

unread,
Feb 28, 2021, 11:27:38 PM2/28/21
to weewx-user
G'Day
I have Weewx running on a Pi4, with data coming in from a WeatherFlow Tempest. My question is - how do I configure Weewx to record rainfall Since 9 AM .
This is the standard used throughout Australia - it was necessary due to most recordings in the past being done manually at Post Offices.

Graham Eddy

unread,
Feb 28, 2021, 11:38:47 PM2/28/21
to weewx...@googlegroups.com
i have been using this for a while

#evilbunny2008 attributed this in 2018 to Gary in australia
since.py

Robert D

unread,
Feb 28, 2021, 11:59:50 PM2/28/21
to weewx-user
Thanks Graham - looking at it with a text editor...it looks like it has been written to do what want.
But being a bit of a newby - I am not sure what to do with it..!!  My guess is something similar to the BigTempPanel..???

"copy wfpiconsole.include.kv to the /home/pi/wfpiconsole directory copy bigtempinclude.py to the /home/pi/wfpiconsole/lib directory

cp wfpiconsole.include.kv /home/pi/wfpiconsole/ cp bigtempinclude.py /home/pi/wfpiconsole/lib/

Change ownership on both files to pi

chown pi:pi /home/pi/wfpiconsole/lib/bigtempinclude.py chown pi:pi /home/pi/wfpiconsole/wfpiconsole.include.kv

Modify /home/pi/wfpiconsole/wfpiconsole.kv

Insert the following line on line 27: #:include wfpiconsole.include.kv

Modify /home/pi/wfpiconsole/main.py

Insert the following lines starting at line 226 from lib.bigtempinclude import BigTempPanel from lib.bigtempinclude import BigTempButton

Modify /home/pi/wfpiconsole/wfpiconsole.ini Beginning around line 50, modify the PrimaryPanel or SecondaryPanel section to enable the BigTemp panel in whichever position you like."


Rob.

Graham Eddy

unread,
Mar 1, 2021, 12:16:21 AM3/1/21
to weewx...@googlegroups.com
put file in /home/weewx/bin/user/since.py (if /home/weewx is where weewx in installed) so python sees it as module user.since

add class user.since.Since to search_list_extensions in your skin.conf e.g.
[CheetahGenerator]

    # Possible encodings are 'html_entities', 'utf8', or 'strict_ascii'
    encoding = html_entities

    # Search list extensions
    search_list_extensions = user.since.Since, user.forecast.ForecastVariables

    [[SummaryByMonth]]
        # Reports that summarize "by month"
        [[[NOAA_month]]]
            encoding = utf8
            template = NOAA/NOAA-%Y-%m.txt.tmpl
update your .html.tmpl to use the $since timespan e.g.
<p>$since($hour=9).rain.sum.format(add_label=False)</p>

--
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/38d1c2f1-3066-4918-860d-6fcd8c1de2een%40googlegroups.com.

Greg from Oz

unread,
Mar 1, 2021, 12:31:46 AM3/1/21
to weewx-user
I use the responsive skin: https://github.com/dcapslock/weewx-responsive-skin

Here is my weather site. https://weather.ubeaut.work/

It gets the rain from 9 a.m to 9 a.m. I think it comes installed like that. It may not as I have modified the website so much.

If it doesn't then you copy the since.py to /usr/share/weewx/user/

Then in the responsive skin.conf you add: user.since.Since like below:
search_list_extensions = user.aussearch.ausutils,user.historygenerator.MyXSearch,user.since.Since,user.xstats.ExtendedStatistics

In the /etc/weewx/skins/Responsive/index.html.tmpl

Add:
                      <tr>
                        <td>Today's Rain since 9am</td>
                        <td>$since($hour=9).rain.sum</td>
                      </tr>

I put it under this section:
<div class="panel-collapse collapse in" id="collapseAccTwoOne">
                <div class="panel-body">
                  <table class="table table-condensed table-responsive" style="">
                    <tbody>
                      <tr>
Then you let it run a report generation and then hopefully it will be there.

I have just noticed another person has answered as well....similar to what I have written.

Good luck....





Greg from Oz

unread,
Mar 1, 2021, 12:46:34 AM3/1/21
to weewx-user
Also there is an android app called weewx weather app and it also has rain from 9.am
I use that app every day.
It uses the data created from you weather site.


On Monday, 1 March 2021 at 15:59:50 UTC+11 Robert D wrote:

Robert D

unread,
Mar 1, 2021, 2:39:59 AM3/1/21
to weewx-user
Thanks - that has given me lots to look at.
Working out how to install a new skin will take some research & reading up...
Everything in my setup is "standard" - I haven't learned enough to start modifying things yet.
I will have a look at the APP.
What I am aiming for is  BOM style monthly Climate Stats report for my location.

But I am finding the curve a bit steep just now. :-)

Graham Eddy

unread,
Mar 1, 2021, 4:11:40 AM3/1/21
to weewx...@googlegroups.com
after adding since.py file to bin/user/, and adding user.since.Since to skin.conf, you could just edit your .html.tmpl files to change ‘$day.rain.sum’ to ‘$since($hour=9).rain.sum’ (i.e. ‘$day’ → ‘$since($hour=9)’), so that all your daily rain is since 9am instead of since midnight. i think that is worth a go. just save copies of the files you are about to change if you want that backstop

Greg Reive

unread,
Mar 1, 2021, 4:22:50 AM3/1/21
to weewx...@googlegroups.com
That's a good idea. See if it works first.
Then he just needs it to rain between 9 a.m and 9 a.m 😊


--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/EEmyF8fpVKk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/9A96571C-7C4C-4BA1-ABB6-5454B9A44B8E%40gmail.com.


--
¯\_(ツ)_/¯

Robert D

unread,
Mar 10, 2021, 7:04:42 AM3/10/21
to weewx-user
With a LOT of help from "Greg from Oz".....and despite some awful typos by me.....
I now have it working - and a bit more of an understanding of the value of cut and paste..!!
Reply all
Reply to author
Forward
0 new messages