Questions about weewx-loopdata 1.3.x

632 views
Skip to first unread message

Geni 0815

unread,
Jul 5, 2020, 7:58:50 AM7/5/20
to weewx-user
@John: I have new installed the weewx-loopdata here my settings in weewx.conf. In my SeasonsReport the field km_per_hour is correctly displayed with km/h.
appended a loop_data.txt and kph is still in it.

How does your built-in tests for conversions and formatting work?

[LoopData]
    [[FileSpec]]
        loop_data_dir = /home/pi/wetter/loop-data
        filename = loop-data.txt
    [[Formatting]]
        target_report = SeasonsReport
    [[RsyncSpec]]
        enable = false
        remote_server = www.foobar.com
        remote_user = root
        remote_dir = /home/weewx/loop-data
        compress = false
        log_success = false
        ssh_options = -o ConnectTimeout=1
        timeout = 1
        skip_if_older_than = 3
    [[Include]]
        fields = dateTime, windSpeed, COMPASS_windDir, DESC_barometerRate, FMT_barometer, FMT_SUM_rain, FMT_dewpoint, FMT_heatindex, FMT_outHumidity, FMT_outTemp, FMT_rain, FMT_rainRate, FMT_windchill, FMT_windSpeed, FMT_HI_windGust, FMT_10mMaxGust, FMT_appTemp
    [[Rename]]

loop-data.txt

John Kline

unread,
Jul 5, 2020, 8:18:00 AM7/5/20
to weewx...@googlegroups.com
That’s great that you are up and running.  I had a look at your WeatherBoard report and indeed I see kph.

I just tried this myself.  I targeted SeasonsReport (since that is what you did) and added the km/h and it’s working for me.  Let’s compare our SeasonsReport entries.

I have the following.  Note the Labels entry with km/h in quotes with a leading space.
Please send what you have for this section.

    [[SeasonsReport]]
        # The SeasonsReport uses the 'Seasons' skin, which contains the
        # images, templates and plots for the report.
        skin = Seasons
        enable = true
        [[[Units]]]
            [[[[StringFormats]]]]
                mile_per_hour = %.1f
                degree_C = %.1f
                km_per_hour = %.1f
                degree_F = %.1f
            [[[[Labels]]]]
                km_per_hour = " km/h"

On Jul 5, 2020, at 4:58 AM, Geni 0815 <geni08...@gmail.com> wrote:


--
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/34cc8d8a-4be6-48d6-9503-505d399d10ceo%40googlegroups.com.
<loop-data.txt>

Geni 0815

unread,
Jul 5, 2020, 9:11:45 AM7/5/20
to weewx-user
Now it gets interesting, where do you see kph on my season page?
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.
weewx.conf

John Kline

unread,
Jul 5, 2020, 9:31:59 AM7/5/20
to weewx...@googlegroups.com
Not too interesting.  I see it on the WeatherBoard report here:

You no longer are producing it, but the JavaScript is happily fetching the latest values.

As for why you don’t see km/h, I obviously am not managing the dictionaries correctly.  I will have to fix that, but in the meantime, please verify that it works if you add the following under SeasonsReport.

        [[[Units]]]
            [[[[Labels]]]]
                km_per_hour = " km/h"

On Jul 5, 2020, at 6:11 AM, Geni 0815 <geni08...@gmail.com> wrote:


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/9d702cab-41cf-4e8b-9e8f-f3f6464f9f50o%40googlegroups.com.
<weewx.conf>

John Kline

unread,
Jul 5, 2020, 10:08:50 AM7/5/20
to weewx...@googlegroups.com
OK, I see what I need to do.  1.3.9 will fix this.  Life calls at present, but I’ll fix and push within a few hours.  In the meantime, the change below will get you get you km/h will tide you over.

BTW, thank you for trying this extension.  You have identified quite a few problems and I appreciate that.

On Jul 5, 2020, at 6:31 AM, John Kline <jo...@johnkline.com> wrote:



John Kline

unread,
Jul 5, 2020, 1:12:47 PM7/5/20
to weewx...@googlegroups.com
1.3.9 has been pushed.

I would appreciate it if you would remove the lines I asked you to add so that you can test that this is no longer needed.

        [[[Units]]]
            [[[[Labels]]]]
                km_per_hour = " km/h"

On Jul 5, 2020, at 7:08 AM, John Kline <jo...@johnkline.com> wrote:



geni08...@gmail.com

unread,
Jul 6, 2020, 1:35:26 AM7/6/20
to weewx-user
I have weewx-loopdata 1.1.13, only the default km_per_hour definition -> the loop-data.txt is OK.
Why is my WeatherBoard not working? Only time is running.

index.html.tmpl.txt

John Kline

unread,
Jul 6, 2020, 6:44:10 AM7/6/20
to weewx...@googlegroups.com
Send realtime_updater.inc and weewx.conf.
The JavaScript is broken. I’ll have a look.

On Jul 5, 2020, at 10:35 PM, geni08...@gmail.com <geni08...@gmail.com> wrote:

I have weewx-loopdata 1.1.13, only the default km_per_hour definition -> the loop-data.txt is OK.

Why is my WeatherBoard not working? Only time is running.

--
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.

John Kline

unread,
Jul 6, 2020, 9:50:11 AM7/6/20
to weewx...@googlegroups.com
Now that I’m up for the morning, I went to look at your WeatherBoard page to see what the JavaScript error was, but I see that it is up and runnning!

On Jul 6, 2020, at 3:44 AM, John Kline <jo...@johnkline.com> wrote:



geni08...@gmail.com

unread,
Jul 6, 2020, 11:20:25 AM7/6/20
to weewx-user
I have replaced the index.html.tmpl with an old version! However, the appTemp is not yet running. Loopdate also crashed at midnight, so watch that today.

John Kline

unread,
Jul 6, 2020, 1:19:38 PM7/6/20
to weewx...@googlegroups.com
Yep, you’ll need to make your changes to switch to appTemp.  That’s both a change in index.html.tmpl and in the realtime_updater.inc file.

A new day accumulator gets created at midnight, so I am very interested in that loopdata crash.  Do you have a stacktrace in the log?  Please send what you have.  If it’s not descriptive enough, I’ll update loopdata to provide more info on that crash.

On Jul 6, 2020, at 8:20 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:



John Kline

unread,
Jul 6, 2020, 1:26:31 PM7/6/20
to weewx...@googlegroups.com
BTW, I should probably make dewpoint position on the weatherboard configurable between dewpoint and appTemp.  That would save you from having to hack on the javaascript.

Also, I could make the legend configurable for translation.

I’ll try to do that today or tomorrow.

On Jul 6, 2020, at 10:19 AM, John Kline <jo...@johnkline.com> wrote:



John Kline

unread,
Jul 7, 2020, 1:09:28 AM7/7/20
to weewx...@googlegroups.com
It looks like loopdata stopped again at midnight (I looked at your sight).

I think it likely that something in the packet at midnight is causing this.  Loopdata does print a stack trace on an unexpected exception before exiting.  Would you have a look in the log and send it?

If the stack trace doesn’t give me the info I need, I will send you an instrumented version of loopdata.py that will, among other things, log loop packets around midnight.

On Jul 6, 2020, at 10:26 AM, John Kline <jo...@johnkline.com> wrote:



geni08...@gmail.com

unread,
Jul 7, 2020, 1:39:52 AM7/7/20
to weewx-user
Jul  7 00:00:00 Wetter-Raspi weewx[18476] CRITICAL user.loopdata:     ****  Traceback (most recent call last):
Jul  7 00:00:00 Wetter-Raspi weewx[18476] CRITICAL user.loopdata:     ****    File "/usr/share/weewx/user/loopdata.py", line 365, in process_queue
Jul  7 00:00:00 Wetter-Raspi weewx[18476] CRITICAL user.loopdata:     ****      self.day_accum.addRecord(pkt)
Jul  7 00:00:00 Wetter-Raspi weewx[18476] CRITICAL user.loopdata:     ****    File "/usr/share/weewx/weewx/accum.py", line 423, in addRecord
Jul  7 00:00:00 Wetter-Raspi weewx[18476] CRITICAL user.loopdata:     ****      % (record['dateTime'], self.timespan))
Jul  7 00:00:00 Wetter-Raspi weewx[18476] CRITICAL user.loopdata:     ****  weewx.accum.OutOfSpan: Attempt to add out-of-interval record (1594072801) to timespan ([2020-07-06 00:00:00 CEST (1593986400) -> 2020-07-07 00:00:00 CEST (1594072800)])
Jul  7 00:00:00 Wetter-Raspi weewx[18476] CRITICAL user.loopdata:     **** 
Jul  7 00:00:00 Wetter-Raspi weewx[18476] CRITICAL user.loopdata:     ****  During handling of the above exception, another exception occurred:
Jul  7 00:00:00 Wetter-Raspi weewx[18476] CRITICAL user.loopdata:     **** 
Jul  7 00:00:00 Wetter-Raspi weewx[18476] CRITICAL user.loopdata:     ****  Traceback (most recent call last):
Jul  7 00:00:00 Wetter-Raspi weewx[18476] CRITICAL user.loopdata:     ****    File "/usr/share/weewx/user/loopdata.py", line 370, in process_queue
Jul  7 00:00:00 Wetter-Raspi weewx[18476] CRITICAL user.loopdata:     ****      self.day_accum.addRecord(pkt)
Jul  7 00:00:00 Wetter-Raspi weewx[18476] CRITICAL user.loopdata:     ****    File "/usr/share/weewx/weewx/accum.py", line 423, in addRecord
Jul  7 00:00:00 Wetter-Raspi weewx[18476] CRITICAL user.loopdata:     ****      % (record['dateTime'], self.timespan))
Jul  7 00:00:00 Wetter-Raspi weewx[18476] CRITICAL user.loopdata:     ****  weewx.accum.OutOfSpan: Attempt to add out-of-interval record (1594072801) to timespan ([2020-07-06 00:00:00 CEST (1593986400) -> 2020-07-07 00:00:00 CEST (1594072800)])
Jul  7 00:00:00 Wetter-Raspi systemd[1]: Starting Rotate log files...
Jul  7 00:00:00 Wetter-Raspi systemd[1]: Starting Daily man-db regeneration...

geni08...@gmail.com

unread,
Jul 7, 2020, 1:44:23 AM7/7/20
to weewx-user
Jul  7 00:00:01 Wetter-Raspi rsyslogd:  [origin software="rsyslogd" swVersion="8.1901.0" x-pid="295" x-info="https://www.rsyslog.com"] rsyslogd was HUPed
Jul  7 00:00:01 Wetter-Raspi systemd[1]: logrotate.service: Succeeded.
Jul  7 00:00:01 Wetter-Raspi systemd[1]: Started Rotate log files.
Jul  7 00:00:02 Wetter-Raspi systemd[1]: man-db.service: Succeeded.
Jul  7 00:00:02 Wetter-Raspi systemd[1]: Started Daily man-db regeneration.
Jul  7 00:00:15 Wetter-Raspi weewx[18476] INFO weewx.manager: Added record 2020-07-07 00:00:00 CEST (1594072800) to database 'weewx'
Jul  7 00:00:15 Wetter-Raspi weewx[18476] INFO weewx.manager: Added record 2020-07-07 00:00:00 CEST (1594072800) to daily summary in 'weewx'

John Kline

unread,
Jul 7, 2020, 3:09:59 AM7/7/20
to weewx...@googlegroups.com
There was a subtle difference in how I was creating the next day accumulator vs. how WeeWX proper is doing it.  I’ve changed that.  Please install 1.3.15 and let me know how it goes at midnight.

On Jul 6, 2020, at 10:44 PM, geni08...@gmail.com <geni08...@gmail.com> wrote:

Jul  7 00:00:01 Wetter-Raspi rsyslogd:  [origin software="rsyslogd" swVersion="8.1901.0" x-pid="295" x-info="https://www.rsyslog.com"] rsyslogd was HUPed

John Kline

unread,
Jul 7, 2020, 9:47:36 AM7/7/20
to weewx...@googlegroups.com
I’ve created a branch of WeatherBoard that substitutes appTemp for dewpoint.

It is here:

On Jul 7, 2020, at 12:09 AM, John Kline <jo...@johnkline.com> wrote:



John Kline

unread,
Jul 7, 2020, 2:10:24 PM7/7/20
to weewx...@googlegroups.com
Most of the WeatherBoard will now use the strings in Defaults, so you should see it in German after you install.  For the custom strings, just update the strings in the WeatherBoard>Labels>Generic section of weewx.conf.

On Jul 7, 2020, at 6:47 AM, John Kline <jo...@johnkline.com> wrote:



geni08...@gmail.com

unread,
Jul 8, 2020, 1:28:09 AM7/8/20
to weewx-user
no error in the log file, and weewx-loopdate has mastered midnight.

I will look at weewx-weatherboard in a moment

geni08...@gmail.com

unread,
Jul 8, 2020, 4:36:49 AM7/8/20
to weewx-user
weewx-weatherboard 1.3a the label entries are implemented.
What is the easiest way now
Indoor temperature
barometer
Indoor and outdoor humidity
to show signs on the display?

John Kline

unread,
Jul 8, 2020, 2:35:22 PM7/8/20
to weewx...@googlegroups.com


On Jul 8, 2020, at 1:36 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:

 weewx-weatherboard 1.3a the label entries are implemented.

What is the easiest way now
Indoor temperature
barometer
Indoor and outdoor humidity
to show signs on the display?


To get these readings in loop-data.txt, add the following to the end of the fields line in the LoopData section of weewx.conf:
    , FMT_inTemp, FMT_barometer, FMT_inHumidity, FMT_outHumidity

As for adding them to a skin, it would be helpful to know your end goal and your familiarity with the technologies.

WeatherBoard is designed for display on a tablet sitting on a bookshelf or hanging on a wall.  It’s meant to be viewed from across the room.  That’s why there’s a small amount of data in large fonts and why I chose the color scheme.

Are you trying to have something that looks like WeatherBoard but just these four extra items on it?  Will you want more after you add these four?  Extra items will mean smaller fonts.  How will this skin be viewed?  I’m assuming you are not looking for the across the room viewing that I targeted with this skin.

Are you looking to write an entirely new skin?

Are you looking to add “update on every loop” capabilities to another skin that you like?

How comfortable are you working with html, css and JavaScript?

Cheers,
John

geni08...@gmail.com

unread,
Jul 9, 2020, 4:52:36 AM7/9/20
to weewx-user
Question for my understanding:
If or why is the id = string supplemented with $current, $day or not at all?
loop1.jpg

John Kline

unread,
Jul 9, 2020, 9:40:48 AM7/9/20
to weewx...@googlegroups.com


On Jul 9, 2020, at 1:52 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:

Question for my understanding:

If or why is the id = string supplemented with $current, $day or not at all?
<loop1.jpg>

In the examples, no IDs is supplemented with current, day or none at all.  Some values say $current, which means the current observation.  Some say day, which would be for the day and have an aggregator ($day.rain.sum).  In any event, all of these values are overwritten every couple of seconds by the javascript.  As such, they could be removed.

As for the ids.  They could be anything you wish.  They just are used by the JavaScript to look up the element.  As a naming scheme for ids, I chose to to name them for the corresponding key in loop-data.txt.

For example, FMT_HI_windGust.  The JavaScript will get lookup the element with the id FMT_HI_windGust.  It will then lookup the value in loop-data.txt for the key FMT_HI_windGust and set the contents of the HTML tag (innerHTML property) to that value.

If the id was foo on this element, the JavaScript would have to find the foo element in the DOM.  Of course, it will still need to use the key FMT_HI_windGust for looking up the loop-data value.

As for the naming scheme in loop-data.txt:
FMT_HI_windGust
The FMT_ means include the label.
The HI_ means give me today’s high.

FMT_windGust would be for the current observation and would include the label.

windGust would be for the current observation. It would NOT include a label, but it would still be formatted.  That is, if wind should have 1 decimal place, it be formatted as such (e.g., 4.0).

The README has this info, but to summarize:

If the key is missing an aggregator (HI, LO, AVG, WAVG, SUM, RMS, VEC_AVG, VEC_DIR), it is the current observation.  If it has an aggregator prefix, it is for the day.  Exceptions are the items I made up 10mMaxGust (which is 10 minutes) and barometerRate (which is a delta from 3 hours ago) and windRose.

FMT_ includes the label.

UNITS_ is the unit for the observation.

LABEL_ is the label for the observation.

COMPASS_ for windDIr and windGustDir gives compass (text) direction.

DESC_ for barometer rate gives a text description of the rate (and probably needs to be internationalized).

T_ is the time of the observation.  For example, T_HI_<obs> would be the time today that the high was reached for the observation.

Just to mention the other things you pointed to:
FMT_SUM_rain is today’s rain with a label.  The FMT_ gives the label.  Since SUM_ is an aggregator, it is for today.

FMT_rainRate is the current rate of rain (since it is missing an aggregator) and it includes a label (FMT_).  FMT_HI_rainRate would be today’s high rainRate.  FMT_T_HI_rainRate would be the formatted time when today’s high rain rate happened.

Note that the packet time presented in WeatherBoard is not formatted.  It uses rainRate.  That time is then localized with toLocaleTimeString in JavaScript.  In that way, the time presented is local time for the viewer of the web page.

geni08...@gmail.com

unread,
Jul 10, 2020, 4:54:25 AM7/10/20
to weewx-user
what do I have to change so that the two values (in the yellow circle) are always displayed? Now they only flash briefly during a manual refresh.
loop2.jpg
in index.html.templ:
 <td id="windSpeedAndBearing" style="font-family:monospace;font-size:85px;text-align:center;">$current.windSpeed $current.windDir.ordinal_compass ($current.windDir)</td>
<span id="FMT_barometer">$current.barometer ($trend.barometer.formatted)</span><span>&nbsp;-&nbsp;</span><span id="FMT_outHumidity">$current.outHumidity</span>

John Kline

unread,
Jul 10, 2020, 10:05:18 AM7/10/20
to weewx...@googlegroups.com
You need to add the fields:
barometerRate
FMT_windDir
to the fields line in the LoopData section of weewx.conf.

After you do that and restart WeeWX, verify that you see these readings in loop-data.txt.

Finally, you need to set these values in the JavaScript.

If you have already done all of the above, perhaps you have a JavaScript error.  Have a look in the JavaScript console in your browser (note: it may be called something else, search for how to see JavaScript errors).

BTW, this weekend, I should have a version of LoopData out that uses the same naming scheme as cheetah.  As such, you will then specify $current.windSpeed, $current.windDir.ordinal_compass and $current.windDir (for example) in the fields line in weewx.conf and those keys will show up in loop-data.txt.  There was no good reason to invent a new language for this. 

On Jul 10, 2020, at 1:54 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:


what do I have to change so that the two values (in the yellow circle) are always displayed? Now they only flash briefly during a manual refresh.

geni08...@gmail.com

unread,
Jul 10, 2020, 12:03:37 PM7/10/20
to weewx-user
Hi John, I'm on the mountain, there was more. Can you please keep an eye on the two files?
index.html.tmpl.txt
realtime_updater.inc.txt

John Kline

unread,
Jul 10, 2020, 2:09:30 PM7/10/20
to weewx...@googlegroups.com
I had a look.  You never actually write FMT_windDir in the JavaScript.  Just add:
+ ‘ (‘ + result[‘FMT_windDir’] + ‘)’
on the appropriate line in realtime_updater.inc.

As for barometerRate.  I do see it.  I just spills over to the next line.  It looks like I am not properly formatting barometerRate.  I will fix that as part of the 2.0 release which I am working on and hope to have out this weekend.

On Jul 10, 2020, at 9:03 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:


To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/20fdce76-5c9c-49ae-9688-5fd810ea3d25n%40googlegroups.com.
<index.html.tmpl.txt>
<realtime_updater.inc.txt>

geni08...@gmail.com

unread,
Jul 11, 2020, 5:03:26 AM7/11/20
to weewx-user
The loop-data.txt file is not created with all fields!

The entry: $current.barometer ($trend.barometer.formatted)
in the index.html.tmpl results in the correct formatting.

John Kline

unread,
Jul 11, 2020, 9:08:04 AM7/11/20
to weewx...@googlegroups.com
Of course, loop-data.txt is not created with all fields.  It would be huge.  Rather, it is created with the fields you specify in the LoopData fields line in weewx.conf.

The equivalent of $current.barometer in LoopData is barometer.  You don’t specify that field.  Instead, you specify FMT_barometer.  As such, you loop-data.txt file has the following (change FMT_barometer to barometer to get what you want):

"FMT_barometer": "1020.3 hPa"

The equivalent of $trend.barometer.formatted in LoopData is barometerRate.  I see it in your loop-data.txt file:

barometerRate": "0.00879"

It is barometerRate that might have too many decimal digits.  I will double check that for the next revision.

BTW, as I mentioned, I’m changing the language to specify LoopData.  In the next revision, you would specify $current.barometer and $trend.barometer.formatted in the fields entry in weewx.conf.

On Jul 11, 2020, at 2:03 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:

The loop-data.txt file is not created with all fields!

Geni 0815

unread,
Jul 14, 2020, 9:01:24 AM7/14/20
to weewx-user
@John: I installed version 2.0.b6, almost everything worked right away, congratulations.
What is not yet running is the label: Live and the clock at the bottom right.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

John Kline

unread,
Jul 14, 2020, 9:52:13 AM7/14/20
to weewx...@googlegroups.com
It looks like you are missing the following in the fields line:

current.dateTime.raw

That is, to upgrade, dateTime needs to be changed to current.dateTime.raw

I’ll update the How to Upgrade section to reflect that.

On Jul 14, 2020, at 6:01 AM, Geni 0815 <geni08...@gmail.com> wrote:



Geni 0815

unread,
Jul 14, 2020, 11:29:26 AM7/14/20
to weewx-user
@John: WeaterBoard 2.0b3 causes problems. everything worked until the time with the old version.
With version 2 I get the error: Uncaught ReferenceError: inHumidity is not defined, and refreshing doesn't seem to work properly.
The syntax also seems different?

I'll test that with current.dateTime.raw in a moment

John Kline

unread,
Jul 14, 2020, 12:35:21 PM7/14/20
to weewx...@googlegroups.com
Of course inHumidity is not defined. You need to read the doc and specifically the part about upgrading.

inHumidity is now current.inHumidity.formatted
It’s in the doc.

Also, why are you using 2.0.b3?  Please use the latest on master as I’ve merged it in.  It is 2.0.b6 (which happens to be what you were claiming to use in the last email).

Again, please read the upgrade section of LoopData.  The names changed.  There is ample warning about that at the top:

LoopData 2.x is a breaking change from 1.x. See "How to Upgrade from LoopData 1.x." below.

inHumidity would fall under this conversion rule:
  • <obs> -> current.<obs>.formatted

On Jul 14, 2020, at 8:29 AM, Geni 0815 <geni08...@gmail.com> wrote:



Christian Peters

unread,
Jul 15, 2020, 8:16:04 AM7/15/20
to weewx-user
John,

I just installed the loop-data extension and the weatherboard skin to give it a try. :-)
A really nice extension.

It was a bit tricky to install it but I hope loop-data is running. I get this
/var/www/html/weewx/loop-data.txt file with this text:

{"current.dateTime.raw": 1594814866, "current.windDir.ordinal_compass": "N", "day.rain.sum": "2,6 mm", "current.dewpoint": "11,3\u00b0C", "current.outTemp": "20,3\u00b0C", "current.rainRate": "0,0 mm/h", "current.windSpeed": "6,4 km/h", "day.windGust.max": "19,3 km/h", "10m.windGust.max": "11,3 km/h"}

It updates every 2 sec, winddir for example changes....so it seems to work I think.

What not works it the wartherboard skin.


It doesn't update (only if I do a manual refresh on the borwser and not every time it really refreshes to the most recent values).
and there is something not working as the time field is missing, even 10m.windGust.max and day.windGust.max ... see screenshot.

Am I doing something wrong? I got the most recent .zip files from your site (today). But I'm not sure where to tweak the weatherboard skin ( in weewx.conf or in weatherboard/skin/skin.conf ) ?

Thanks in advance for any idea or hint!

Regards,

Christian





weatherboard.png

geni08...@gmail.com

unread,
Jul 15, 2020, 8:53:59 AM7/15/20
to weewx-user
   Also, why are you using 2.0.b3?  Please use the latest on master as I’ve merged it in.  It is 2.0.b6 (which happens to be what you were claiming to use in the last email).
this was watherboard version
loop01.jpg

my loop-data.txt:
{"current.dateTime.raw": 1594817282, "current.windchill": "17.6\u00b0C", "current.windSpeed": "0.0 km/h", "current.windSpeed.raw": 0.0, "day.windGust.max": "12.9 km/h", "10m.windGust.max": "8.0 km/h", "10m.windGust.max.formatted": "8.0", "current.barometer": "1013.5 hPa", "trend.barometer.formatted": "0.3", "current.rain": "0.0 mm", "current.rainRate": "0 mm/h", "day.rain.sum": "0.8 mm", "current.appTemp": "18.9\u00b0C", "current.outTemp": "17.6\u00b0C", "current.inTemp": "24.2\u00b0C", "current.inHumidity": "50%", "current.outHumidity": "81%"}

loop02.jpg

I still have problems with version 2, the update no longer works as in version 1.xx.

John Kline

unread,
Jul 15, 2020, 10:11:06 AM7/15/20
to weewx...@googlegroups.com
Hi Christian,

Please let me know what was tricky about installing loop-data.

Since you are getting loop-data, I suspect that the LoopData extension and the WeatherBoard extension don’t agree about where to find the loop-data.txt file.

Would you send both the LoopData section and the WeatherBoard section of weewx.conf?

Cheers,
John

On Jul 15, 2020, at 5:16 AM, 'Christian Peters' via weewx-user <weewx...@googlegroups.com> wrote:


--
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.

John Kline

unread,
Jul 15, 2020, 10:21:06 AM7/15/20
to weewx...@googlegroups.com


You need to be care as to how you state things.  I can clearly see that you have added current.inHumidity to LoopData and you show that it is appearing correctly in the loop-data.txt.

inHumidity is not part of the WeatherBoard skin.  You have added it.  You have a JavaScript error that says inHumidity not defined.  Perhaps you should restate your question.  Are you having problems with the JavaScript changes you have made to WeatherBoard?

On Jul 15, 2020, at 5:54 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:


   Also, why are you using 2.0.b3?  Please use the latest on master as I’ve merged it in.  It is 2.0.b6 (which happens to be what you were claiming to use in the last email).
this was watherboard version
<loop01.jpg>


my loop-data.txt:
{"current.dateTime.raw": 1594817282, "current.windchill": "17.6\u00b0C", "current.windSpeed": "0.0 km/h", "current.windSpeed.raw": 0.0, "day.windGust.max": "12.9 km/h", "10m.windGust.max": "8.0 km/h", "10m.windGust.max.formatted": "8.0", "current.barometer": "1013.5 hPa", "trend.barometer.formatted": "0.3", "current.rain": "0.0 mm", "current.rainRate": "0 mm/h", "day.rain.sum": "0.8 mm", "current.appTemp": "18.9\u00b0C", "current.outTemp": "17.6\u00b0C", "current.inTemp": "24.2\u00b0C", "current.inHumidity": "50%", "current.outHumidity": "81%"}


--
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.

--
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.

--
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.

--
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.

--
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.

--
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.

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/20fdce76-5c9c-49ae-9688-5fd810ea3d25n%40googlegroups.com.
<index.html.tmpl.txt>
<realtime_updater.inc.txt>

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/acc5218a-0dea-4eb9-b114-a630b1ecba8bo%40googlegroups.com.

--
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.

--
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/42761d21-da47-4657-b34c-5fd16815c438n%40googlegroups.com.
<loop01.jpg>
<loop02.jpg>

geni08...@gmail.com

unread,
Jul 15, 2020, 11:17:37 AM7/15/20
to weewx-user
That's correct, I have a problem understanding the JavaScript entries and the WeatherBord template.
I started again with the original files.
As soon as I make the smallest change, the wind update no longer works. I work with Notepad++ and then copy the file into the skin folder via the console. Could this have an impact? Are there rules about the encoding of the file? UTF-8 or UTF-8-BOM or something else?

John Kline

unread,
Jul 15, 2020, 11:54:31 AM7/15/20
to weewx...@googlegroups.com
> As soon as I make the smallest change, the wind update no longer works.
Please tell me what that change is.

On Jul 15, 2020, at 8:17 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:

That's correct, I have a problem understanding the JavaScript entries and the WeatherBord template.
Message has been deleted

geni08...@gmail.com

unread,
Jul 15, 2020, 12:14:28 PM7/15/20
to weewx-user
          if (result.hasOwnProperty("current.appTemp")) {
            // app Temp
            var app = result["current.appTemp"];
            if (app.length == 5) {
              app = "&nbsp;&nbsp;" + app;
            } else if (app.length == 6) {
              app = "&nbsp;" + app;
            }
            document.getElementById("current.appTemp").innerHTML = app;
          } else {
            document.getElementById("current.appTemp").innerHTML = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';

John Kline

unread,
Jul 15, 2020, 12:15:09 PM7/15/20
to weewx...@googlegroups.com
document.getElementById("current.appTemp").innerHTML = dew;
This should end in “= app;”
You changed dew to app everywhere except the last line in your snippet.

On Jul 15, 2020, at 9:12 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:

          if (result.hasOwnProperty("current.appTemp")) {

            // app Temp
            var app = result["current.appTemp"];
            if (app.length == 5) {
              app = "&nbsp;&nbsp;" + app;
            } else if (app.length == 6) {
              app = "&nbsp;" + app;
            }
            document.getElementById("current.appTemp").innerHTML = dew;

geni08...@gmail.com

unread,
Jul 15, 2020, 1:04:48 PM7/15/20
to weewx-user
I changed dew in app, makes mistakes. Is currently online

John Kline

unread,
Jul 15, 2020, 1:19:07 PM7/15/20
to weewx...@googlegroups.com
I had a look at your page source.

Your didn’t make the corresponding change in index.html.tmpl.

I see:

<span id=“current.dewPoint”>

Of course, that needs to change to current.appTemp

It seems that you are not up on JavaScript.  That’s fine, I’m not very good at it either; but please stop blaming a particular loopdata or weatherboard release when something you change doesn’t work.  If you do that, I’m happy to help you make the changes you want to make.

On Jul 15, 2020, at 10:04 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:



geni08...@gmail.com

unread,
Jul 15, 2020, 1:39:51 PM7/15/20
to weewx-user
The topic is called questions! I don't blame anything, on the contrary I appreciate your work. I try step by step to approach the problem. So I first wanted to make the appTemp available in realupdater and then when it runs in the template to use it and there I hang. Is it not allowed to define anything in stock in realupdater?
The status is as soon as I make the entry in the realupdater, nothing is updated in the weaterboard and the 10m.windGust are no longer displayed. Somehow the entry appTemp gets the whole thing out of step. How should I proceed?

John Kline

unread,
Jul 15, 2020, 1:50:39 PM7/15/20
to weewx...@googlegroups.com
You haven’t removed dewpoint from the javascript.  You need to do that.  It’s in loop-data.txt, so the javascript is trying to set an element with the I’d “current.dewpoint”, but there is no such element.

Please have a look at the JavaScript errors as you are changing things around.

On Jul 15, 2020, at 10:39 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:

The topic is called questions! I don't blame anything, on the contrary I appreciate your work. I try step by step to approach the problem. So I first wanted to make the appTemp available in realupdater and then when it runs in the template to use it and there I hang. Is it not allowed to define anything in stock in realupdater?

Christian Peters

unread,
Jul 15, 2020, 1:53:05 PM7/15/20
to weewx-user
John,

I struggeld installing the extension. I got:
Traceback (most recent call last):

 
File "/usr/share/weewx/wee_extension", line 13, in <module>
   
import weecfg.extension
 
File "/usr/share/weewx/weecfg/__init__.py", line 22, in <module>
   
import configobj
ImportError: No module named configobj

..but the module was installed!
I then figured out that wee_extension uses python2 but not python3 so the module was missing in python 2!  ;-)
I treid to gove Python3 a try with weewx this time as I reinstalled it!
I changed in we_extension the first line to

#!/usr/bin/env python3

and it works.

But first I installed the loop-data exxtension by hand...but I think all is in the right place as the loop-data.txt is build.

The WeatherBoardReport section in weewx.conf:

    [[WeatherBoardReport]]
        HTML_ROOT
= /var/www/html/weewx/weatherboard
        enable
= true
        skin
= WeatherBoard
       
[[[Extras]]]
            meta_title
= Live-Wetter Langenseifen, Hessen  Weather at a Glance WeatherBoard&trade;
            title
= Live-Wetter Langenseifen Hessen WeatherBoard&trade;
            subtitle
= Fortlaufend aktualisiert.
            logo
= ""
            loop_data_file
= ../loop-data.txt
            contact_email
= ""
            expiration_time
= 4
            page_update_pwd
= foobar
            googleAnalyticsId
= ""
            analytics_host
= ""
            show_purple
= False
       
[[[Labels]]]
           
[[[[Generic]]]]
                air_quality_index
= Air Quality Index
                contact
= Kontakt
                legend
= Legende
                rain_today
= Regen heute
                ten_min_max_gust
= 10min Boee
                time_of_day
= Uhrzeit
                high_gust_today
= Booe max.
       
[[[Units]]]
           
[[[[StringFormats]]]]
                mile_per_hour
= %.1f
                degree_C
= %.1f
                km_per_hour
= %.1f
                degree_F
= %.1f

This section I added at the end of weewx.conf by hand:

# ====================================================================================
# Options for extension 'weewx-loopdata'

[LoopData]
   
[[FileSpec]]
        loop_data_dir
= /var/www/html/weewx
        filename
= loop-data.txt
   
[[Formatting]]
        target_report
= WeatherBoardReport
   
[[RsyncSpec]]
        enable
= false
        remote_server
= foo.bar.com
        remote_user
= root
        remote_dir
= /var/www/html
        compress
= False
        log_success
= False
        ssh_options
= -o ConnectTimeout=1
        timeout
= 1
        skip_if_older_than
= 3
   
[[Include]]
        fields
= current.dateTime.raw, current.windDir.ordinal_compass, day.rain.sum, current.dewpoint, current.outTemp, current.rainRate, current.windSpeed, day.windGust.max, 10m.windGust.max, current.windSpeed

But there is even a skin.conf at /etc/weew/skinWeatherboard/ ...

# Copyright (C)2020 by John A Kline (jo...@johnkline.com)
# Distributed under the terms of the GNU Public License (GPLv3)
# See LICENSE for your rights.

[Extras]
   
# Fill path of loop data file.  If not a full path,
   
# it will be interpreted as relative to this skin's HTML_ROOT.
    loop_data_file
= '../loop-data.txt'

   
# Refresh rate is the rate at which the report should refresh with
   
# the latest readings.  A good choice is the rate at which your
   
# weather stations driver is feeing loop data.  Expressed in units
   
# of seconds.  Default: 2 seconds.
    refresh_rate
= 2

   
# Fill in a sutiable title/subtitle for the report.
    title
= 'my-weather-website.com WeatherBoard&trade;'
    subtitle
= 'Updated continuously.'

   
# If you have a log, specify it here.
    logo
= ''

   
# Fill in contact email to display on the report.
    contact_email
= 'weath...@my-weather-website.com'

   
# Choose your own password.  without ?page_update_pwd='xxx'
   
# at the end of the URL, auto updating will timeout.
   
# Note: This password will be viaible to users looking
   
# at page source in their browser.
    page_update_pwd
= 'foobar'

   
# Page expiration time is the number of hours the report will request
   
# loop data and update.  After which, a mouse clice will be needed
   
# to start refreshing again.  Default 4 hours.
    expiration_time
= 4

   
# If you have a google analytics id, uncomment the following line
   
# and fill in the ID.
   
# googleAnalyticsId =
   
# If you only want to use the ID on a certain host, uncomment the
   
# following line and fill in the hostname.
   
# analytics_host = www.example.com

   
# If a PurpleAir sensor is set up and both weewx-purple and
   
# purple-proxy are installed, or just weewx-purple is installed;
   
# change the 'False' below to 'True'.
   
# The weewx-purple extension can be found here:
   
#    https://github.com/chaunceygardiner/weewx-purple
   
# The purple-proxy server can be found here:
   
#    https://github.com/chaunceygardiner/purple-proxy
   
# It is preferable to install both weewx-purple and purple proxy
   
# as the proxy returns averages over the archive period (as
   
# opposed to one shot readings).
    show_purple
= False

[Labels]
   
[[Generic]]
       
# Some specialized labels
        air_quality_index
= Air Quality Index
        contact          
= Contact
        legend            
= Legend
        rain_today        
= Rain Today
        ten_min_max_gust  
= 10m Gust
        time_of_day      
= Time
        high_gust_today  
= Today's High Gust

[CheetahGenerator]
    encoding = html_entities
    [[ToDate]]
        [[[index]]]
            template = index.html.tmpl

[CopyGenerator]
    copy_once = favicon.ico, weatherboard.css
    copy_always = ,

[Generators]
        generator_list = weewx.cheetahgenerator.CheetahGenerator, weewx.reportengine.CopyGenerator

Do I have to care about!?

The WeatherBoard site seems to update with the interval given in weewx (here 1min)....but the JS seems not to work?
It's starnge too that there are some obersavervations missing and the time not catched and printed on the WB site...but Temp is changein (all 1min while refreshing)?

Hope you could figure something out of my setting!?

Thanks in advance!

Christian
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.

John Kline

unread,
Jul 15, 2020, 2:12:27 PM7/15/20
to weewx...@googlegroups.com


Hi Christian,

wee_extension should not have been using python2 if you did a python3 install of weewx; but let’s put that aside.

Of course, you should care that WeatherBoard is not updating on every loop cycle, that’s the whole point of it.

I might be better if you deleted all you have done manually and do a proper install, but let’s try to work with what you have.

Are you sure loop-data.txt is being generated?

If in weewx.conf, under [Engine][[Services]], on the report_services line, do you see user.loopdata.LoopData?

Would you send me a copy of /var/www/html/weewx/loop-data.txt?

Would you send me a directory listing of /var/www/html/weewx/weatherboard?

Lastly, from your browser, would you bring up the JavaScript console and tell me the error(s) you see?
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/155cc6a5-2234-44a0-94f2-99f6fbda1057o%40googlegroups.com.

John Kline

unread,
Jul 15, 2020, 2:28:18 PM7/15/20
to weewx...@googlegroups.com
Also, please add all of the fields required by WeatherBoard (see the README).

  • current.dateTime.raw
  • current.windDir.ordinal_compass
  • day.rain.sum
  • current.dewpoint
  • current.outTemp
  • current.rainRate
  • current.windSpeed
  • current.windSpeed.raw
  • 10m.windGust.max
  • day.windGust.max

You are missing current.windSpeed.raw.  It looks like you have current.windSpeed twice.  I think you meant one of them to be current.windSpeed.raw

fields = current.dateTime.raw,current.windDir.ordinal_compass, day.rain.sum, current.dewpoint,current.outTemp, current.rainRate, current.windSpeed,day.windGust.max, 10m.windGust.max, current.windSpeed

After you have fixed this, and with the loop-data.txt file you are sending, let’s see if there are missing observations.

On Jul 15, 2020, at 11:12 AM, John Kline <jo...@johnkline.com> wrote:



hctp...@googlemail.com

unread,
Jul 15, 2020, 2:39:01 PM7/15/20
to weewx-user
John,

strange...maybe I really should delete anything and start from scratch?

But before one more try.. I'm sure the loopdata is made, see some 'cat' of the file:
cat /var/www/html/weewx/loop-data.txt
{"current.dateTime.raw": 1594836959, "current.windDir.ordinal_compass": "NW", "day.rain.sum": "3,0 mm", "current.dewpoint": "8,7\u00b0C", "current.outTemp": "17,1\u00b0C", "current.rainRate": "1,2 mm/h", "current.windSpeed": "3,2 km/h", "day.windGust.max": "27,4 km/h", "10m.windGust.max": "14,5 km/h"}

cat /var/www/html/weewx/loop-data.txt
{"current.dateTime.raw": 1594836976, "current.windDir.ordinal_compass": "NNW", "day.rain.sum": "3,0 mm", "current.dewpoint": "8,7\u00b0C", "current.outTemp": "17,1\u00b0C", "current.rainRate": "1,0 mm/h", "current.windSpeed": "8,0 km/h", "day.windGust.max": "27,4 km/h", "10m.windGust.max": "14,5 km/h"}

cat /var/www/html/weewx/loop-data.txt
{"current.dateTime.raw": 1594836979, "current.windDir.ordinal_compass": "NNW", "day.rain.sum": "3,0 mm", "current.dewpoint": "8,7\u00b0C", "current.outTemp": "17,1\u00b0C", "current.rainRate": "1,0 mm/h", "current.windSpeed": "6,4 km/h", "day.windGust.max": "27,4 km/h", "10m.windGust.max": "14,5 km/h"}

cat /var/www/html/weewx/loop-data.txt
{"current.dateTime.raw": 1594836981, "current.windDir.ordinal_compass": "NNW", "day.rain.sum": "3,0 mm", "current.dewpoint": "8,7\u00b0C", "current.outTemp": "17,1\u00b0C", "current.rainRate": "1,0 mm/h", "current.windSpeed": "6,4 km/h", "day.windGust.max": "27,4 km/h", "10m.windGust.max": "14,5 km/h"}

cat /var/www/html/weewx/loop-data.txt
{"current.dateTime.raw": 1594836985, "current.windDir.ordinal_compass": "NW", "day.rain.sum": "3,0 mm", "current.dewpoint": "8,7\u00b0C", "current.outTemp": "17,1\u00b0C", "current.rainRate": "1,0 mm/h", "current.windSpeed": "4,8 km/h", "day.windGust.max": "27,4 km/h", "10m.windGust.max": "14,5 km/h"}#

What I think is a little bit strange, a:

tail -f /var/www/html/weewx/loop-data.txt 

doesn't show any changes after two seconds? Is there some caching....I dont use the rsync.... Anyway...
'
by the way, I sometimes see floats at the time value like "current.dateTime.raw": 1594837199.0..?

Yes, I added this

report_services = weewx.engine.StdPrint, weewx.engine.StdReport, user.loopdata.LoopData

and if I turn on debug=1 I see the file is written every loop.
a
cat /var/www/html/weewx/loop-data.txt:
{"current.dateTime.raw": 1594837649, "current.windDir.ordinal_compass": "N", "day.rain.sum": "3,0 mm", "current.dewpoint": "9,0\u00b0C", "current.outTemp": "16,8\u00b0C", "current.rainRate": "0,0 mm/h", "current.windSpeed": "4,8 km/h", "day.windGust.max": "27,4 km/h", "10m.windGust.max": "11,3 km/h"}
{"current.dateTime.raw": 1594837577, "current.windDir.ordinal_compass": "NW", "day.rain.sum": "3,0 mm", "current.dewpoint": "9,1\u00b0C", "current.outTemp": "16,9\u00b0C", "current.rainRate": "0,0 mm/h", "current.windSpeed": "6,4 km/h", "day.windGust.max": "27,4 km/h", "10m.windGust.max": "11,3 km/h"}

a ls -laht /var/www/html/weewx/weatherboard

drwxr-xr-x 12 www-data www-data 4,0K Jul 15 20:28 ..
drwxr-xr-x  2 root     root     4,0K Jul 15 20:27 .
-rw-r--r--  1 root     root      12K Jul 15 20:27 index.html
-rw-r--r--  1 root     root     1,7K Jul 15 19:41 weatherboard.css
-rw-r--r--  1 root     root     3,5K Jul 15 19:41 favicon.ico

So I'm not familiar with .js, I hope I opened the right one in my FF browser. Never did anything with JavaScript! :-O  But I got some errors, see attached screenshot.
Thanks for your patience!
Maybe something is blocked by Apache2 (I host the site by myself)....

Regards,

Christian
error1.png
error.png

hctp...@googlemail.com

unread,
Jul 15, 2020, 2:49:18 PM7/15/20
to weewx-user
Ok, 

cat /var/www/html/weewx/loop-data.txt 

{"current.dateTime.raw": 1594838795, "current.windDir.ordinal_compass": "NW", "day.rain.sum": "3,0 mm", "current.dewpoint": "8,9\u00b0C", "current.outTemp": "16,7\u00b0C", "current.rainRate": "0,0 mm/h", "current.windSpeed": "3,2 km/h", "day.windGust.max": "27,4 km/h", "10m.windGust.max": "8,0 km/h", "current.windSpeed.raw": 3.218688}

(with missing "current.windSpeed.raw")

....






hctp...@googlemail.com

unread,
Jul 15, 2020, 2:54:42 PM7/15/20
to weewx-user
...and the error form the browser after changes as screenshot....
error after fixing .png

hctp...@googlemail.com

unread,
Jul 15, 2020, 3:07:22 PM7/15/20
to weewx-user
ok...last post for now...maybe this is the problem, see screenshot...
Bildschirmfoto 2020-07-15 um 21.05.54.png

hctp...@googlemail.com

unread,
Jul 15, 2020, 3:32:31 PM7/15/20
to weewx-user
John,

the path was wrong, you were right all the time. 
The loop-data.txt must be placed into the weatherboard html dir! 
Now found the java console in Safari and it gives me the error with the wrong path!
Now it updates and runs fine! 
Would be nice to add the live functionality in any skin but I fear there must be added some Java code....
Maybe a future project! 

Thanks for you help! 
Now enjoying the new skin with live data! :-)

Regards,

Christian  

John Kline

unread,
Jul 15, 2020, 3:33:40 PM7/15/20
to weewx...@googlegroups.com

tail -f loop-data.txt won’t work because a new file is created on every loop.

You can use:
watch cat loop-data.txt

You screen shots are not of any javascript errors that might be on the page.

Would you send me the following file?
/var/www/html/weewx/weatherboard/index.html

On Jul 15, 2020, at 12:07 PM, 'hctp...@googlemail.com' via weewx-user <weewx...@googlegroups.com> wrote:

ok...last post for now...maybe this is the problem, see screenshot...
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/c28e82d7-4a36-42f2-832c-4eed5cb5438dn%40googlegroups.com.
<Bildschirmfoto 2020-07-15 um 21.05.54.png>

John Kline

unread,
Jul 15, 2020, 3:35:27 PM7/15/20
to weewx...@googlegroups.com
Great news!

The purpose of LoopData is to be able to add to any skin, but it does require knowledge of JavaScript.

On Jul 15, 2020, at 12:33 PM, John Kline <jo...@johnkline.com> wrote:



hctp...@googlemail.com

unread,
Jul 15, 2020, 3:46:34 PM7/15/20
to weewx-user
John,

is this a problem to write the loop-data.txt file every 2sec on a SSD regarding durability!?
Or would it be better to place it on a ramdisk (tmpfs) like /dev/shm ...

Regards,

Christian 

John Kline

unread,
Jul 15, 2020, 3:59:47 PM7/15/20
to weewx...@googlegroups.com
I do not personally regard it as a problem.  Others may have a different opinion.

It certainly is not necessary to have it on the SSD, but you would have to configure apache2 (or whatever web server you are using), to be able to serve loop-data.txt.

BTW, is your site visible externally?  If so, would you send a link?

On Jul 15, 2020, at 12:46 PM, 'hctp...@googlemail.com' via weewx-user <weewx...@googlegroups.com> wrote:

John,

hctp...@googlemail.com

unread,
Jul 15, 2020, 4:14:03 PM7/15/20
to weewx-user
John,

so maybe a project for the next days to put the loop-data.tx into ram and serve it via apache2. 
The WeatherBoard site:


and my main weather site:


.
The gauges you see on the main site seems to use Javascript so that's why I asked...! :-D 
At the moment I just give a fixed value and render the entire site every minute...near realtime... ;-) 

But diving into java would be a big task.... not sure I'm ready for that....already fighting with Python...! :-D

Regards,

Christian 

John Kline

unread,
Jul 15, 2020, 4:32:15 PM7/15/20
to weewx...@googlegroups.com
Thanks for sending those links.

Again, I don’t think it’s necessary to move the file to ram disk.  With modern SSDs and wear leveling, and especially with a file this size.  You might want to do some web searches before deciding if its worth the effort.

geni08...@gmail.com

unread,
Jul 16, 2020, 8:26:47 AM7/16/20
to weewx-user
Hi John, it could even add winDir and barometer and humidity!
What I would like to know why is enough for the two windGust values only the id in index.html.tmpl

loop02.jpg

John Kline

unread,
Jul 16, 2020, 9:46:28 AM7/16/20
to weewx...@googlegroups.com
It looks like you are on a roll!

I think you are asking why I don’t have the actual values filled in for windGust in the template.

The answer for $10m.windGust.max is that the $10m period is only understood by LoopData.  If you put $10m.windGust.max in the template, it would cause an error.  There is probably a way to compute the 10 minute high gust, but I didn’t bother to figure that out since the value will appear anyway on the next loop.

For $day.windGust.max, adding it to the template should work just fine.  It’s not needed.  In fact, none of the values are needed since they are overwritten by the JavaScript.



On Jul 16, 2020, at 5:26 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:

 Hi John, it could even add winDir and barometer and humidity!
What I would like to know why is enough for the two windGust values only the id in index.html.tmpl

geni08...@gmail.com

unread,
Jul 16, 2020, 11:18:16 AM7/16/20
to weewx-user
Hi John, Thank you for your help so far, my next goal is to update the Belchertown template with weewx-loopdata.
MQTT needs an infrastructure there ... I find your solution really elegant. Do you have a tip for me where to start?

hctp...@googlemail.com

unread,
Jul 16, 2020, 5:52:57 PM7/16/20
to weewx-user
John,

I think you are right as there a many processes writing files on and on to disk...
But it took me 20sec to move the loop-data.txt to tempfs! So I did just for fun:

changed 

loop_data_dir = /dev/shm

and made a softlink in the weatherboard html dir:

loop-data.txt -> /dev/shm/loop-data.txt

Voila!

So loop-data.txt now written to ram...! ;-) 

Regards,

Christian 




John Kline

unread,
Jul 16, 2020, 5:56:09 PM7/16/20
to weewx...@googlegroups.com

John Kline

unread,
Jul 16, 2020, 6:02:36 PM7/16/20
to weewx...@googlegroups.com
I’m not sure which parts of Bechlertown rely on MQTT and which parts rely on auto refreshing the page.  For the former, if the info is available in LoopData, you would need to add an id to the HTML element and then set the contents via javascript in the same way as WeatherBoard does it.

Bechlertown appears to be a well supported skin with frequent updates.  You do need to worry about taking updates of the skin since you’ll be making modifications.  Ideally, you would write a script to add the ids in the right place and add a line to include the javascript.

On Jul 16, 2020, at 8:18 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:



geni08...@gmail.com

unread,
Jul 17, 2020, 2:07:30 AM7/17/20
to weewx-user
Thank you very much, the script is a good idea.

There was another question regarding "trend.barometerRate.formatted". At the beginning this gave plausible values, from yesterday evening it delivers impossible values.
Is it possible that 2 sources supply data and interfere?
I tried to keep a momentary status.

Display liveboard
loopdata1.jpg

index.html
loopdata2.jpg

loop-data.txt
loopdata3.jpg

index.html.tmpl
<tr>
<td style="text-align:center;font-family:monospace;font-size:70px">
<span id="current.barometer">$current.barometer</span>&nbsp;(<span id="trend.barometer.formatted">$trend.barometer.formatted</span>)<span>&nbsp;-&nbsp;</span><span id="current.outHumidity">$current.outHumidity</span>
</td>
</tr>

John Kline

unread,
Jul 17, 2020, 10:23:27 AM7/17/20
to weewx...@googlegroups.com

As the documentation states, trend.barometer and 10m.windGust are special cases.

In this case, where we are talking about trend.barometer, it is alway the delta from three hours ago and uses archive records to compute the starting reading.  Also, it is expressed as a per hour rate.  Thus, it would be 1/3 of the three hour delta.  I did it this way because my sole purpose was to compute the text description (e.g., rising slowly).

Perhaps you have some bad data in your database?  Have you checked that to see what the actual delta and per hour delta should be?

In any event, I need to make trend less special.  I think I’ll do that this weekend.  It should honor the $delta.time_delta for the skin and report the actual delta, not on a per hour basis.  While I’m doing that, I’ll make sure my tests around trend.barometer are good enough.  If there is a bug, I should find it then.


On Jul 16, 2020, at 11:07 PM, geni08...@gmail.com <geni08...@gmail.com> wrote:

Thank you very much, the script is a good idea.


There was another question regarding "trend.barometerRate.formatted". At the beginning this gave plausible values, from yesterday evening it delivers impossible values.
Is it possible that 2 sources supply data and interfere?
I tried to keep a momentary status.

Display liveboard
<loopdata1.jpg>


index.html
<loopdata2.jpg>


loop-data.txt
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/3997a5f9-0144-4982-8db8-36ec802fc706n%40googlegroups.com.
<loopdata1.jpg>
<loopdata2.jpg>
<loopdata3.jpg>

geni08...@gmail.com

unread,
Jul 18, 2020, 2:17:27 AM7/18/20
to weewx-user
I don't think there are any errors in the database, the barometer trend is displayed in my season with a credible value that also matches the value in the index.html from the weatherboard (as documented in the older answer).
I also attached the file loop-data-xxx.txt, in the upper part you can see the values generated by loop-data in the lower part my entry in weewx.conf. It is striking that the values "trend.barometerRate.desc" and "trend.barometerRate" are missing.
Yesterday at noon I noticed that the value of the "trend.barometer.formatted", which is now> 300 is exactly at 12h (GTM + 2) on the expected value. Will watch this today).

loop-data - xxx.txt

John Kline

unread,
Jul 18, 2020, 9:05:51 AM7/18/20
to weewx...@googlegroups.com
I’ve already well on my way to replacing this.  Trend will work for all scalar values, not just barometer.  The code is done, but I need to add it to the tests.

On Jul 17, 2020, at 11:17 PM, geni08...@gmail.com <geni08...@gmail.com> wrote:

 I don't think there are any errors in the database, the barometer trend is displayed in my season with a credible value that also matches the value in the index.html from the weatherboard (as documented in the older answer).

John Kline

unread,
Jul 18, 2020, 4:23:49 PM7/18/20
to weewx...@googlegroups.com
Give 2.0.b7 a spin.

trend has now been generalized (as opposed to only working with barometer).  It will also honor the time_span configured for the target report.

If the numbers don’t look right to you, the last 36 records in the archive table would be more helpful than sending screenshots of the value differing from what report generation produces.

trend.barometer.desc (i.e, the .desc suffix) is still an oddball.  It shouldn’t be part of LoopData.  I’m going to remove it, but I need to move the code (to produce the description) to JavasSript (for one of my personal reports, not as part of LoopData).

On Jul 18, 2020, at 6:05 AM, John Kline <jo...@johnkline.com> wrote:



geni08...@gmail.com

unread,
Jul 20, 2020, 3:23:19 AM7/20/20
to weewx-user
Hi John, since version 2.0.b8 the display works as expected. I have just installed 2.0.b10 and see no difference on the fast.
What I don't understand is why the documented field "trend.barometerRate.formatted" does not provide any information in the loop-data.txt. Do I get my information from "trend.barometer.formatted"?

John Kline

unread,
Jul 20, 2020, 9:42:25 AM7/20/20
to weewx...@googlegroups.com
That slipped through in the upgrade section.  Yes, you want trend.barometer.formatted if you are looking if you don’t want a label.  (Use trend.barometer if you want a label.)

I’ll fix that in the upgrade section today (or just remove the upgrade section.)

On Jul 20, 2020, at 12:23 AM, geni08...@gmail.com <geni08...@gmail.com> wrote:

Hi John, since version 2.0.b8 the display works as expected. I have just installed 2.0.b10 and see no difference on the fast.
Reply all
Reply to author
Forward
0 new messages