OK, as far as changing to km/h.  It’s done the same way you would change a label
for any report in WeeWX.  In this case, just add the last two lines below to 
WeatherBoardReport in weewx.conf.  This is assuming the target_report
LoopData section is WeatherBoardReport (which it should be).

    [[WeatherBoardReport]]
        HTML_ROOT = public_html/weatherboard
        enable = true
        .
        .
        .
        [[[Units]]]
            [[[[StringFormats]]]]
                mile_per_hour = %.1f
                degree_C = %.1f
                km_per_hour = %.1f
                degree_F = %.1f
            [[[[Labels]]]
                km_per_hour = km/h

This change looks weird to me because there is a slash separating the two wind 
numbers:
3.5 km/h/ 7.7 km/h

You might want to change line 83 to:
<span id="FMT_10mMaxGust"></span><span> &mdash;</span><span 
id="FMT_HI_windGust"></span>

That will look better:
3.5 km/h - 7.7 km/h
 


> On Jul 3, 2020, at 2:17 PM, John Kline <j...@johnkline.com> wrote:
> 
> 
> OK, ignore my last email.  The accumulators were correct and conversions of 
> observations were being done correctly.  But not highs, lows, sums, ...
> 
> This is fixed in loopdata 1.3.5.  Please pull it, install it and restart 
> weewx.  It should all work with this change.
> 
> It’s fortunate (for me) that WeeWX stores rain in cm and defaults to 
> reporting it in mm.  Because of that, FMT_SUM_rain revealed the issue (in 
> Metric) and that let me fix it.
> 
> Thank you for reporting this.
> John
> 
>>> On Jul 3, 2020, at 12:28 PM, John Kline <j...@johnkline.com> wrote:
>>> 
>> 
>> I found the problem.  The database is storing rain as cm and, as you might 
>> expect, the day accumulators were correct.  I however, when I copied the 
>> accumulators at startup, was treating them as if they were in the report 
>> target units (in this case mm).
>> 
>> I’ll push a fix today.
>> 
>>>> On Jul 3, 2020, at 11:14 AM, John Kline <j...@johnkline.com> wrote:
>>>> 
>>> 
>>> I’ve duplicated the daily rainfall discrepancy.
>>> 
>>> I am asking WeeWX for the day summary and initializing my day accumulators 
>>> with the day summary.
>>>     day_summary = dbm._get_day_summary(time.time())
>>> 
>>> But the day summary accumulator for rain is reporting 1/10 of the actual 
>>> rain.  Before I can fix this, I need to take the time to understand why I 
>>> am seeing what I am seeing in WeeWX’s day summary.
>>> 
>>>>> On Jul 3, 2020, at 10:10 AM, Geni 0815 <geni0815.0...@gmail.com> wrote:
>>>>> 
>>>> 
>>>> I'm using the latest driver
>>>> wget -P / var / tmp 
>>>> https://raw.githubusercontent.com/weewx/weewx/master/bin/weewx/drivers/vantage.py
>>>> 
>>>> Am Freitag, 3. Juli 2020 18:47:16 UTC+2 schrieb John Kline:
>>>>> 
>>>>> 
>>>>> 
>>>>>> On Jul 3, 2020, at 9:27 AM, Geni 0815 <geni08...@gmail.com> wrote:
>>>>>> 
>>>>>> 
>>>>>> All fields are displayed again, we have absolute calm at the moment so I 
>>>>>> can not see how it works.
>>>>>> The error kph is desired km / h
>>>>> You can ask others how to change a label on a report.  Once you do that, 
>>>>> LoopData will use it.
>>>>>> Rain display is wrong where the 0.1mm would come from correctly 0.6mm
>>>>>> Indeed, when i curl your page, I see the .6 being generated at reporting 
>>>>>> time and I can look at your loop-data.txt and see 0.1.  I am actually 
>>>>>> copying the day summary accumulators, so this is perplexing.  I will 
>>>>>> investigate this.  I have not run into it since I have been using 
>>>>>> day_rain_total, which isn’t available in your driver.
>>>>>> 
>>>>>> Am Freitag, 3. Juli 2020 15:44:29 UTC+2 schrieb John Kline:
>>>>>>> 
>>>>>>> You didn’t quite get the change to appTemp correct.  The JavaScript was 
>>>>>>> trying to get a document element by the name of FMT_dewpoint, but that 
>>>>>>> element no longer exists in index.html.
>>>>>>> 
>>>>>>> Make the following changes and let me know how it goes.
>>>>>>> 
>>>>>>> In index.html.tmpl:
>>>>>>> Change:
>>>>>>>  <span id="FMT_outTemp">$current.outTemp</span><span>&nbsp;</span><span 
>>>>>>> id="appTemp">$current.appTemp</span>
>>>>>>> to:
>>>>>>> <span id="FMT_outTemp">$current.outTemp</span><span>&nbsp;</span><span 
>>>>>>> id="FMT_appTemp">$current.appTemp</span>
>>>>>>> 
>>>>>>> In weewx.conf>LoopData>Include>fields:
>>>>>>> Change:
>>>>>>> appTemp
>>>>>>> to:
>>>>>>> FMT_appTemp
>>>>>>> 
>>>>>>> In realtime_updater.inc:
>>>>>>> Change:
>>>>>>>          // dew point              
>>>>>>>           var dew = result["FMT_dewpoint"];
>>>>>>>           if (dew.length == 5) {
>>>>>>>             dew = "&nbsp;&nbsp;" + dew;
>>>>>>>           } else if (dew.length == 6) {
>>>>>>>             dew = "&nbsp;" + dew;
>>>>>>>           }                                                             
>>>>>>>                                                                         
>>>>>>>       
>>>>>>>           document.getElementById("FMT_dewpoint").innerHTML = dew;
>>>>>>> to:
>>>>>>>          // apparent temp              
>>>>>>>           var appTemp = result["FMT_appTemp"];
>>>>>>>           if (appTemp.length == 5) {
>>>>>>>             appTemp = "&nbsp;&nbsp;" + appTemp;
>>>>>>>           } else if (appTemp.length == 6) {
>>>>>>>             appTemp = "&nbsp;" + appTemp;
>>>>>>>           }                                                             
>>>>>>>                                                                         
>>>>>>>       
>>>>>>>           document.getElementById("FMT_appTemp").innerHTML = appTemp;
>>>>>>> 
>>>>>>>>> On Jul 3, 2020, at 4:41 AM, Geni 0815 <geni08...@gmail.com> wrote:
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Am Freitag, 3. Juli 2020 13:31:49 UTC+2 schrieb Geni 0815:
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Am Freitag, 3. Juli 2020 13:29:40 UTC+2 schrieb Geni 0815:
>>>>>>>>>> 
>>>>>>>>>> The values "FMT_windSpeed": "0.0 kph", "FMT_HI_windGust": "14.5 
>>>>>>>>>> kph", "FMT_10mMaxGust": "4.8 kph", have the label kph directly with 
>>>>>>>>>> them, this could be the problem
>>>>>>>>>> 
>>>>>>>>>>> # Options for extension 'loopdata'
>>>>>>>>>>> [LoopData]
>>>>>>>>>>>     [[FileSpec]]
>>>>>>>>>>>         loop_data_dir = /home/pi/wetter/loop-data
>>>>>>>>>>>         filename = loop-data.txt
>>>>>>>>>>>     [[Formatting]]
>>>>>>>>>>>         target_report = WeatherBoardReport
>>>>>>>>>>>     [[RsyncSpec]]
>>>>>>>>>>>         enable = false
>>>>>>>>>>>         remote_server = 192.168
>>>>>>>>>>>         remote_port = 2022
>>>>>>>>>>>         remote_user = 
>>>>>>>>>>>         remote_dir = /web/wetter/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, appTemp
>>>>>>>>>>>     [[Rename]]
>>>>>>>>>> 
>>>>>>>>>> Am Freitag, 3. Juli 2020 13:21:48 UTC+2 schrieb John Kline:
>>>>>>>>>>> 
>>>>>>>>>>> Your JavaScript has an error. Nothing is updated after it hits that 
>>>>>>>>>>> error.  Since the 10m and day high wind is only updated in the 
>>>>>>>>>>> JavaScript, they are blank.
>>>>>>>>>>> 
>>>>>>>>>>> Please send the LoopData section of WeeWX.conf and the 
>>>>>>>>>>> index.html.tmpl and realtime_updater.inc files.
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>> 
>>>>>>>>>>>>> On Jul 3, 2020, at 3:56 AM, Geni 0815 <geni08...@gmail.com> wrote:
>>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> Extension Name    Version   Description
>>>>>>>>>>>> weatherboard      1.1       WeatherBoard skin.
>>>>>>>>>>>> Belchertown       1.2b6     A clean modern skin with real time 
>>>>>>>>>>>> streaming updates and interactive charts. Modeled after 
>>>>>>>>>>>> BelchertownWeather.com
>>>>>>>>>>>> loopdata          1.3.4     Loop statistics for real time 
>>>>>>>>>>>> reporting.
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> Am Freitag, 3. Juli 2020 12:55:00 UTC+2 schrieb Geni 0815:
>>>>>>>>>>>>> 
>>>>>>>>>>>>> No errors in the syslog
>>>>>>>>>>>>> appTemp works in loop-data.txt and in the display of weatherboard
>>>>>>>>>>>>> all wind displays are not displayed correctly and there is no 
>>>>>>>>>>>>> refresh
>>>>>>>>>>>>> In the loop-date.txt there is always "FMT_SUM_rain": "0.1 mm", 
>>>>>>>>>>>>> but the display is 0.6mm
>>>>>>>>>>>>> 
>>>>>>>>>>>>> Am Freitag, 3. Juli 2020 08:32:56 UTC+2 schrieb John Kline:
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> OK, I’ve pushed new versions of loopdata and weatherboard to 
>>>>>>>>>>>>>> user FMT_SUM_rain rather than FMT_rain_day_total.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> You asked if appTemp could be displayed.  Yes, it can be 
>>>>>>>>>>>>>> included in loop-data.txt by adding appTemp (or FMT_appTemp) to 
>>>>>>>>>>>>>> the Include section of LoopData in weewx.conf.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>> Perhaps you are asking if I can add it to WeatherBoard.  I see 
>>>>>>>>>>>>>> you’ve copied it to translate the index.  Just change 
>>>>>>>>>>>>>> FMT_dewPoint to FMT_appTemp in index.html and 
>>>>>>>>>>>>>> realtime_updater.txt.  Someday, I hope to allow for a great deal 
>>>>>>>>>>>>>> of customization in the browser for the WeatherBoard skin; but I 
>>>>>>>>>>>>>> don’t see that happening anytime soon.
>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> On Jul 2, 2020, at 10:59 PM, John Kline <jo...@johnkline.com> 
>>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> One more place to change.
>>>>>>>>>>>>>>> Change the LoopData>Include section in weewx.conf.  That should 
>>>>>>>>>>>>>>> include FMT_SUM_rain rather than FMT_day_rain_total.
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> In addition to changing WeatherBoard, I’ll change the doc in 
>>>>>>>>>>>>>>> LoopData as day_rain_total is likely to be a source of 
>>>>>>>>>>>>>>> confusion for many.
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> On Jul 2, 2020, at 10:51 PM, John Kline <jo...@johnkline.com> 
>>>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> On Jul 2, 2020, at 10:28 PM, Geni 0815 <geni08...@gmail.com> 
>>>>>>>>>>>>>>>>>> wrote:
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Errors are no longer logged
>>>>>>>>>>>>>>>> That’s good.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> The translation doesn't work anymore:
>>>>>>>>>>>>>>>>> [[Rename]]
>>>>>>>>>>>>>>>>> kph = kmh
>>>>>>>>>>>>>>>> The README says:
>>>>>>>>>>>>>>>> Rename : Used to specify which fields to include and which 
>>>>>>>>>>>>>>>> names should be used as keys (i.e., what these fields should 
>>>>>>>>>>>>>>>> be renamed. If neither Rename nor fields is specified, all 
>>>>>>>>>>>>>>>> fields are included.
>>>>>>>>>>>>>>>> Perhaps I need to explain it better.  Rename is used to change 
>>>>>>>>>>>>>>>> the name of the keys in the json (loop-data.txt) file.  It 
>>>>>>>>>>>>>>>> would be used if you have existing JavaScript expecting a 
>>>>>>>>>>>>>>>> different key for an observation.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> The good news is that all formatting, conversion, labels, etc. 
>>>>>>>>>>>>>>>> is controlled by the skin you have targeted.  Just change the 
>>>>>>>>>>>>>>>> unit_label for in the skin and the loop-data.txt file will 
>>>>>>>>>>>>>>>> automagically reflect your change.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Rain amount is not in the loop-data.txt
>>>>>>>>>>>>>>>> WeatherBoard is using day_rain_total, which is in the loop 
>>>>>>>>>>>>>>>> packet for my weather station, but not yours.  It’s likely you 
>>>>>>>>>>>>>>>> have a rain observation in the loop packet — simply called 
>>>>>>>>>>>>>>>> rain.  SUM_rain would yield the same thing as day_rain_total.  
>>>>>>>>>>>>>>>> So, to fix this issue, edit WeatherBoard’s index.html.tmpl and 
>>>>>>>>>>>>>>>> realtime_updater.inc files and change FMT_day_rain_total to 
>>>>>>>>>>>>>>>> FMT_SUM_rain and you should be good to go.  I will update 
>>>>>>>>>>>>>>>> WeatherBoard with this change shortly.
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>> Cheers,
>>>>>>>>>>>>>>>> John
>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Currently live here: 
>>>>>>>>>>>>>>>>> https://affolter.familyds.net/wetter/weatherboard/
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Is it possible to get the appTemp displayed?
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> Am Donnerstag, 2. Juli 2020 20:33:09 UTC+2 schrieb John Kline:
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>> -- 
>>>>>>>>>>>> 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/230623f3-cd31-41f1-a7bd-b7238d5fd822o%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...@googlegroups.com.
>>>>>>>> To view this discussion on the web visit 
>>>>>>>> https://groups.google.com/d/msgid/weewx-user/62684dcf-e357-4d20-834b-24e4d94b140ao%40googlegroups.com.
>>>>>>>> <index.html.tmpl>
>>>>>> 
>>>>>> -- 
>>>>>> 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/da116212-bf75-46a5-ae25-ea286970f9e3o%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+unsubscr...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/weewx-user/dab37905-dfb6-4e5e-b90c-72e4aa9e97bbo%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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/572F8599-89C4-4A5B-9EE8-1F894CF22E1D%40johnkline.com.

Reply via email to