Questions about weewx-loopdata 2.x

100 views
Skip to first unread message

geni08...@gmail.com

unread,
Aug 11, 2020, 8:57:03 AM8/11/20
to weewx-user
@John: I installed version 2.6.
how do i get the values:
    <td id='$(archive[1]).outTemp.max.formatted' style='white-space:pre;'></td>
    <td id='$(archive[1]).outTemp.min.formatted' style='white-space:pre;'></td>
    <td id='$(archive[1]).wind.rms.formatted' style='white-space:pre;'></td>
    <td id='$(archive[1]).windGust.max.formatted' style='white-space:pre;'></td>
    <td id='$(archive[1]).rain.sum.formatted' style='white-space:pre;'></td>

geni08...@gmail.com

unread,
Aug 11, 2020, 10:20:29 AM8/11/20
to weewx-user
I found a syntax.
Question: for example "Hi Out Temp, week", shouldn't it be the highest temp since Monday? But this is not true for me! Why?

John Kline

unread,
Aug 11, 2020, 2:08:18 PM8/11/20
to weewx...@googlegroups.com
When does your week start?

You should see something like this is weewx.conf:
    # Start of week (0=Monday, 6=Sunday)
    week_start = 6

What value do you have for week_start?

On Aug 11, 2020, at 3:20 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:

I found a syntax.
--
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/282de9d8-ff84-4c29-b302-2893aded408fn%40googlegroups.com.

geni08...@gmail.com

unread,
Aug 11, 2020, 3:49:30 PM8/11/20
to weewx-user
week_start = 0

John Kline

unread,
Aug 11, 2020, 4:12:01 PM8/11/20
to weewx...@googlegroups.com
OK, before we look at the daily summaries in your database, please install loopdata at head.  I’ve added logging for week_start and rainyear_start at startup.  Let’s make sure that the extension thinks week_start is 0.  Install the the extension. Restart weewx and then paste in the lines from the log.  They should look something like this:
Aug 11 09:09:14 ella weewx[5404] INFO user.loopdata: week_start         : 0
Aug 11 09:09:14 ella weewx[5404] INFO user.loopdata: rainyear_start     : 1

On Aug 11, 2020, at 8:49 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:

 week_start = 0

John Kline

unread,
Aug 11, 2020, 4:35:59 PM8/11/20
to weewx...@googlegroups.com
Also, please add $week.outTemp.max.formatted to a report.  You can simply add it anywhere in a template.

After the report is generated, send the value printed in the report and the value in the loop-data.txt file.

I have tests for all of this; but, of course, I could have a mistake in the test or elsewhere.

On Aug 11, 2020, at 9:11 AM, John Kline <jo...@johnkline.com> wrote:



Geni 0815

unread,
Aug 11, 2020, 4:37:49 PM8/11/20
to weewx-user
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: tmpname            : /tmp/LoopDataz7h4ntn0
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: enable             : 0
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: remote_server      : www.foobar.com
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: remote_port        : None
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: remote_user        : root
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: remote_dir         : /home/weewx/loop-data
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: compress           : 0
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: log_success        : 0
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: ssh_options        : -o ConnectTimeout=1
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: timeout            : 1
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: skip_if_older_than : 3
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: time_delta         : 10800
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: trend_obstypes     : ['barometer', 'outTemp']
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: rainyear_obstypes  : ['outTemp', 'wind', 'windSpeed', 'windDir', 'windGust', 'windGustDir', 'rain']
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: year_obstypes      : ['outTemp', 'wind', 'windSpeed', 'windDir', 'windGust', 'windGustDir', 'rain']
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: month_obstypes     : ['wind', 'windSpeed', 'windDir', 'windGust', 'windGustDir', 'rain', 'outTemp']
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: week_obstypes      : ['wind', 'windSpeed', 'windDir', 'windGust', 'windGustDir', 'rain', 'outTemp']
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: day_obstypes       : ['windGust', 'wind', 'windSpeed', 'windDir', 'windGustDir', 'rain', 'outTemp']
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: ten_min_obstypes   : ['windGust', 'wind', 'windSpeed', 'windDir', 'windGustDir', 'rain', 'outTemp']
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: baro_trend_descs   : {<BarometerTrend.RISING_VERY_RAPIDLY: 1>: 'Rising Very Rapidly', <BarometerTrend.RISING_QUICKLY: 2>: 'Rising
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

John Kline

unread,
Aug 11, 2020, 4:41:58 PM8/11/20
to weewx...@googlegroups.com
It does not look like you have installed from head on github.

Go to this page:


Click “Code” and then click download zip.  Install that zip file.

When you do that, after time_delta in the log, you should see week_start and rainyear_start.

On Aug 11, 2020, at 9:37 AM, Geni 0815 <geni08...@gmail.com> wrote:


Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: tmpname            : /tmp/LoopDataz7h4ntn0
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: enable             : 0
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: remote_server      : www.foobar.com
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: remote_port        : None
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: remote_user        : root
Aug 11 18:05:41 Wetter-Raspi weewx[1211] INFO user.loopdata: remote_dir         Af: /home/weewx/loop-data

John Kline

unread,
Aug 12, 2020, 1:20:18 AM8/12/20
to weewx...@googlegroups.com
OK, I found the issue.  My tests simulate running weewx and processing packets.  The issue was at startup where I use daily summaries to create accumulators for day, week, year and rainyear.  That code was missing the first daily summary of each of these periods.

I’ve fixed this issue in v2.7.  Please give it a try.

On Aug 11, 2020, at 9:41 AM, John Kline <jo...@johnkline.com> wrote:



Geni 0815

unread,
Aug 12, 2020, 6:00:57 AM8/12/20
to weewx-user
Hi John, Thanks for the new version.
I still have the following questions:
Where can I find a description of what a "Rain Year" is?
Where and how can I set that $wind.rms.formatted and $windGust.max.formatted also have a decimal place at km / h?
loop-data.txt

John Kline

unread,
Aug 12, 2020, 12:56:16 PM8/12/20
to weewx...@googlegroups.com
> Where can I find a description of what a “Rain Year” is?

By default, rainyear is the same as year.  It’s the 12-month period for which the cumulative rain amount is measured.

> Where and how can I set that $wind.rms.formatted and $windGust.max.formatted have a decimal place at km / h?

I’m assuming you mean <period>.rms.formatted and <period>.windGust.max.formatted (where <period> is 10m, day, week, month, year or rainyear).

Also assuming you want to see one decimal position in these values.

In the LoopDataReport section of weewx.conf, there is already 1 decimal place specified for km_per_hour (“%.1f”), unless you have changed it:
       [[[Units]]]
            [[[[StringFormats]]]]
                mile_per_hour = %.1f
                degree_C = %.1f
                km_per_hour = %.1f
                degree_F = %.1f 

I suspect you have a different target report specified:
Let’s imagine your [LoopData] section looks like this where the target_report is WeatherBoardReport:

[LoopData]
    [[FileSpec]]
        loop_data_dir = /home/weewx/gauge-data
        filename = loop-data.txt
    [[Formatting]]
        target_report = WeatherBoardReport

In this case, you would to specify the decimal for km_per_hour under WeatherBoardReport, since that is the report you have specified for conversion and formattting.  You would want that report to specify the decimal place for km_per_hour.

[[WeatherBoardReport]]
       [[[Units]]]
            [[[[StringFormats]]]]
                km_per_hour = %.1f


On Aug 11, 2020, at 11:01 PM, Geni 0815 <geni08...@gmail.com> wrote:



Geni 0815

unread,
Aug 12, 2020, 2:07:35 PM8/12/20
to weewx-user
Thanks for the explanation.

I had target_report = SeasonsReport, and there are 2 unit definitions for some.
                 km_per_hour =% .0f
                 km_per_hour2 =% .1f
                 knot =% .0f
                 knot2 =% .1f
                meter_per_second = %.1f
                meter_per_second2 = %.1f
                mile_per_hour = %.0f
                mile_per_hour2 = %.1f

  I have now redefined target_report = LoopDataReport, now it works as desired

John Kline

unread,
Aug 12, 2020, 4:04:47 PM8/12/20
to weewx...@googlegroups.com
I’m happy to hear that it is working.  Thank you for trying it out!

> ...and there are 2 unit definitions for some.
I think you are asking about km_per_hour2 (as opposed to km_per_hour).  Here’s what http://weewx.com/docs/customizing.htm has to say about that:

group_speed2

This group is similar to group_speed, but is used for calculated wind speeds which typically have a slightly higher resolution. Possible options are one mile_per_hour2km_per_hour2knot2, or meter_per_second2.


On Aug 12, 2020, at 7:07 AM, Geni 0815 <geni08...@gmail.com> wrote:


Reply all
Reply to author
Forward
0 new messages