Weewx-rain24h addon

225 views
Skip to first unread message

kufuu

unread,
Sep 17, 2023, 12:06:12 PM9/17/23
to weewx-user
I installed the weewx-rain24h add on and was wondering how to get he 24hr rain totals to display on the season skin desktop ?

gjr80

unread,
Sep 18, 2023, 7:02:06 AM9/18/23
to weewx-user
You might have to help us out here, what or where is the 'weewx-rain24h add on'. My quick google failed to find such an extension.

Gary

geoff...@gmail.com

unread,
Sep 18, 2023, 7:58:29 AM9/18/23
to weewx-user

No need for an addon.  Just use

$span($day_delta=1).rain.sum

to return the last 24h rainfall total.

You can see it on my weather site at weather.cusick.org.uk

Hth

Geoff 
On Monday, 18 September 2023 at 12:02:06 UTC+1 gjr80 wrote:
You might have to help us out here, what or where is the 'weewx-rain24h add on'. My quick google failed to find such an extension.

Gary

kufuu

unread,
Sep 18, 2023, 11:17:55 AM9/18/23
to weewx-user

Geoff Cusick

unread,
Sep 18, 2023, 11:26:25 AM9/18/23
to weewx...@googlegroups.com
Seems a bit of a roundabout way to provide data that’s already easily available - presumably retrieving the 24h rain sum from the database, then injecting it back into the loop packets.  I’m obviously missing something.

--
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/RHdDkdSTN68/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/9dca3a07-38df-4606-b412-a3c040159944n%40googlegroups.com.

kufuu

unread,
Sep 18, 2023, 11:40:14 AM9/18/23
to weewx-user
Thanks geoff, I like that, just where do I put the  "$span($day_delta=1).rain.sum" , sorry but Ive only been messing with weewx for only about 6months.

John Kline

unread,
Sep 18, 2023, 11:53:09 AM9/18/23
to weewx...@googlegroups.com
I wrote this extension; although, I no longer use it because I have generalized the functionality to work on any observation and for any time length in my weewx-loopdata extension.

What you are missing is that the plug-in operates at the loop packet level.  Other than loading from the database at start up, with archive interval precision, it does not read the database.  Rather, it keeps track of any rain recorded in loop packets such that they can be decremented from rain 24 hours later.  For example, if .01 rain occurs 87s into an archive interval; and another .01 rain occurs 20s later; the 24 hour rain will decrement (i.e., the rain24 value injected into the loop packets) when each .01 occurrence falls out of the 24 hour window; not when the archive record in the database is older than 24 hours.

Of course, this is all meaningless if you are just going to use it in reports that are only generated on the archive interval; but the for insane (I resemble that remark) who want to see 24 hour rain decrement at loop interval precision on their weather sites that update on every loop packet, it is useful.

John

On Sep 18, 2023, at 8:26 AM, Geoff Cusick <geoff...@gmail.com> wrote:

Seems a bit of a roundabout way to provide data that’s already easily available - presumably retrieving the 24h rain sum from the database, then injecting it back into the loop packets.  I’m obviously missing something.
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/93806518-A6D9-40B9-AA6B-6DC7C268951E%40gmail.com.

Geoff Cusick

unread,
Sep 18, 2023, 11:57:43 AM9/18/23
to weewx...@googlegroups.com
In the skins folder (something like /etc/weewx/skins), you’ll find a number of files called <xxxx>.html.tmpl. These are template files for the html pages that weewx generates.   Edit the file for the page where you want to place the 24h rain figure.  You’ll need to understand its structure to decide where you need to add some lines.  My site uses the Bootstrap skin, which uses a file gauges.html.tmpl to create a page containing some gauges and some text, including a table of values where I’ve put the 24h rain figure.  The relevant section of the file looks like this:


<!-- Station info -->
          <div class="row">
            <table class="table table-hover">
              <tbody>
                      <tr>
                        <td>$Labels.Generic.rainRate</td>
                        <td>$current.rainRate</td>
                      </tr>
                      <tr>
                        <td>24h Max Rate </td>
                        <td>$span($day_delta=1).rainRate.max</td>
                      </tr>
                      <tr>
                        <td>$Labels.Generic.dayrain</td>
                        <td>$span($day_delta=1).rain.sum</td>
                      </tr>
                      <tr>
                        <td>$Labels.Generic.windchill</td>
                        <td>$current.windchill</td>
                      </tr>
            </tbody>
            </table>  
          </div>

Take a look at weather.cusick.org.uk to see how it looks in practice.

Hth
Geoff


On 18 Sep 2023, at 16:40, kufuu <toef...@gmail.com> wrote:

Thanks geoff, I like that, just where do I put the  "$span($day_delta=1).rain.sum" , sorry but Ive only been messing with weewx for only about 6months.
--
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/RHdDkdSTN68/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

Geoff Cusick

unread,
Sep 18, 2023, 12:00:48 PM9/18/23
to weewx...@googlegroups.com
So you’re maintaining a circular buffer of (24h/loop packet interval) rainfall samples.  Is that right?
G


On 18 Sep 2023, at 16:53, 'John Kline' via weewx-user <weewx...@googlegroups.com> wrote:



kufuu

unread,
Sep 18, 2023, 12:29:11 PM9/18/23
to weewx-user
I installed this extension not knowing when I should have just came here and asked, oh well !!  Thanks u guys for all your help

John Kline

unread,
Sep 18, 2023, 12:43:42 PM9/18/23
to weewx...@googlegroups.com
There is no need to use all that space when most loop packets will have zero rain.

I just record the rainfall (non-zero rain in a loop packet) as a list of debits.  On each loop packet, I look at the top of the list to see if any have matured (24 hours later).  If so, I decrement rainfall by the amount in the entry and delete that entry.

On Sep 18, 2023, at 9:00 AM, Geoff Cusick <geoff...@gmail.com> wrote:

So you’re maintaining a circular buffer of (24h/loop packet interval) rainfall samples.  Is that right?

kufuu

unread,
Sep 18, 2023, 1:09:40 PM9/18/23
to weewx-user
Im using the default " Season Skin", not finding a html.tmpl file with that structure.

Geoff Cusick

unread,
Sep 18, 2023, 1:21:41 PM9/18/23
to weewx...@googlegroups.com
Sorry, I’m not familiar with the Seasons skin, but a quick look shows a set of .html.tmpl files under /etc/weewx/skins/Seasons.  The ‘home’ page is index.html.tmpl, and there’s a ‘footnote’ section that contains text.  As a quick try-on, you could insert the 24h rain total there.

Have fun
G


On 18 Sep 2023, at 18:09, kufuu <toef...@gmail.com> wrote:

Im using the default " Season Skin", not finding a html.tmpl file with that structure.

kufuu

unread,
Sep 28, 2023, 4:06:35 AM9/28/23
to weewx-user
Well I finally got it to work, not exactly were I wanted It to be but it will work there. Thanks

New River @ Allisonia
09/28/2023 03:45:00 AM

--- 24Hr Rain 0.00 in

Current Conditions ♦
Outside Temperature 54.4°F
Heat Index 53.9°F
Wind Chill 54.4°F
Dew Point 52.5°F
Outside Humidity 93%
Barometer 30.238 inHg (-0.029)
Wind 0 mph N/A ( N/A)
Rain Today 0.00 in
Rain Rate 0.00 in/h
Message has been deleted

kufuu

unread,
Sep 28, 2023, 7:28:19 PM9/28/23
to weewx-user
Now I have the rain 24hr totals where I want it, had to put it in the Current.inc folder at the end.

New River @ Allisonia

09/28/2023 07:05:00 PM

Current Conditions ♦

Outside Temperature 66.6°F
Heat Index 66.6°F
Wind Chill 66.6°F
Dew Point 59.6°F
Outside Humidity 78%
Barometer 30.111 inHg (0.034)


Wind 0 mph N/A ( N/A)
Rain Today 0.00 in
Rain Rate 0.00 in/h

 -- 24Hr Rain 0.00 in


Celestial
Reply all
Reply to author
Forward
0 new messages