Cumulative aggregation has holes

157 views
Skip to first unread message

hen...@ostergaard.net

unread,
Dec 4, 2022, 7:09:56 AM12/4/22
to weewx-user
Hi,

A few years ago, I came up with the cumulative aggregation type specifically for total rain graphs. Since then, Weewx has been updated a few times, and now the cumulative aggregation seems broken.

It correctly sums up the totals, but the graphs will show zero (or None?) for intervals without rain, in stead of shoving the total so far.

I have been looking a little into this, but I could not readily see where the problem is. If somebody could point me in the right direction, I would be happy to give it a try to fix it.

If it is just a setting, I have missed, please let me know.

I have enclosed an example of a daily total rain, and a yearly to show how I would have expected it (almost).

Regards
Henrik Ostergaard
dayraintot.png
yearraintot.png

Tom Keffer

unread,
Dec 4, 2022, 8:06:09 AM12/4/22
to weewx...@googlegroups.com
Just tried it, and it works for me.

image.png

It's hard to go any further without seeing your configuration files. Post the [StdReport] section of weewx.conf, and the entire skin.conf of whatever skin you are using (looks like Standard).

-tk

--
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/5c24114c-965d-4095-9b29-a29c89f1ce22n%40googlegroups.com.

hen...@ostergaard.net

unread,
Dec 4, 2022, 10:55:42 AM12/4/22
to weewx-user
Thanks for the answer!
Very interesting that it is working for you!
I have attached the requested files.
One note: I get sensor data from multiple sources through the same driver, meaning that the packets send to Weewx mostly does not have any rain entry. I wonder if it would help to just always add a rain zero.. I can try that.
Btw, the server can be seen on vejr.ostergaard.net.
Weewx version 4.9.1.

Regards
Henrik Ostergaard
weewx.conf
skin.conf

hen...@ostergaard.net

unread,
Dec 4, 2022, 1:13:26 PM12/4/22
to weewx-user
I have now tried to change the driver, so all reports send to weewx contains a 'rain'. This seems to work around the problem (see attached graph).
This workaround will require me to alter the database (which is not a big issue) for older observations, but it is in my eyes not a good solution. On the other hand, it seems to point at 'rain' records being 'None' is causing the problem..

I have tried to play around with the get_scalar function in wxxtypes.py, as it contains references to cumulative, and it could have something to do with it, but with no effect.

Regards
Henrik Ostergaard
dayraintot2.png

Tom Keffer

unread,
Dec 4, 2022, 2:29:21 PM12/4/22
to weewx...@googlegroups.com
If this is the case, then the most likely problem is too low a number for "line_gap_fraction". Try upping it to 0.5, or even higher.

hen...@ostergaard.net

unread,
Dec 4, 2022, 2:47:04 PM12/4/22
to weewx-user
Upping it to 10 or even 100 did unfortunately not change anything..
The original global value was 0.01.

Tom Keffer

unread,
Dec 4, 2022, 2:53:57 PM12/4/22
to weewx...@googlegroups.com
The image generator will only accept values between 0 and 1. Try 0.5.

hen...@ostergaard.net

unread,
Dec 4, 2022, 3:44:50 PM12/4/22
to weewx-user
Sorry - it does not mention that in the documentation.
But neither 0.5 not 0.99 changes anything :-(

Tom Keffer

unread,
Dec 4, 2022, 4:17:40 PM12/4/22
to weewx...@googlegroups.com
Sorry - it does not mention that in the documentation.

But it does in the log.

Send me the last 27 hours from your database and I'll try and replicate it. The following assumes a 5 minute archive interval.

sqlite3 /var/lib/weewx/archive.sdb
sqlite> .output /var/tmp/data.sql
sqlite> .mode insert
sqlite> .schema archive
sqlite> SELECT * FROM archive ORDER BY dateTime DESC LIMIT 324;

The results will be in /var/tmp/data.sql





hen...@ostergaard.net

unread,
Dec 4, 2022, 4:36:19 PM12/4/22
to weewx-user
OK, thanks.
I also include the schema I use, but it is the 'rain' field which give the issue.
data.sql
wview.py

Tom Keffer

unread,
Dec 4, 2022, 5:07:40 PM12/4/22
to weewx...@googlegroups.com
Turns out, the option line_gap_fraction is not used for bar plots. I don't see why it can't be, so I've created issue #818.

In the meantime, you could use a plot_type of 'line'. Not as pretty, but it would work.

hen...@ostergaard.net

unread,
Dec 5, 2022, 1:15:45 AM12/5/22
to weewx-user
OK, thanks. I will monitor the progress of it. RIght now, having 'rain' in all reports works around it.
Reply all
Reply to author
Forward
0 new messages