tag formatting with Davis airlink data

110 views
Skip to first unread message

Jacques Terrettaz

unread,
Feb 28, 2025, 10:01:27 AMFeb 28
to weewx-user
Hello,

I have recently installed a Davis Airlink sensor, and configured the following weewx plugin : https://github.com/chaunceygardiner/weewx-airlink
I have added to my sqlite database the fields "pm1_0", pm2_5" and "pm10_0".

Almost everything seems OK : sqlite database receiveing the date, image generator  working ( http://meteo-sciez.fr/weewx/airlink/), but I still have some problems with template tags :

WIth the following test  tmpl file :

pm1-act-label-false|$current.pm1_0.format(add_label=False)
pm1-act|$current.pm1_0
pm1-act-raw|$current.pm1_0.raw
outTemp-act-label-false|$current.outTemp.format(add_label=False)
outTemp-act|$current.outTemp.format
outTemp-act-raw|$current.outTemp.raw

the output is :

pm1-act-label-false|= 1.1
pm1-act|= 1.1 µg/m³
pm1-act-raw|1.0662251655629138
outTemp-act-label-false|10.7
outTemp-act|10.7 °C
outTemp-act-raw|10.72222222222222
 

Only for pm1_0, pm2_5 and pm10_0, there is a " =" at the beginning for tags such as "$current.pmX_X" or "$current.pmX_X.format(add_label=False)"

This " =" is visible also for a skin such as weewx-wdc :
weewx.info.txt
GraphiqueCollé-1.png

jterr...@gmail.com

unread,
Feb 28, 2025, 10:36:09 AMFeb 28
to weewx-user
the end of my email was somehow not visible...

 (see http://meteo-sciez.fr/site/mesures.php)

Do you have any idea why a " =" is added in front of tags for pmx_x values?

Tom Keffer

unread,
Feb 28, 2025, 10:37:20 AMFeb 28
to weewx...@googlegroups.com
Not sure if this is the problem, but try using "false" instead of "False".

--
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 visit https://groups.google.com/d/msgid/weewx-user/984792f5-30a2-49f9-aecc-b8e857816be0n%40googlegroups.com.

jterr...@gmail.com

unread,
Feb 28, 2025, 10:50:18 AMFeb 28
to weewx-user
Thanks for your reply Tom.
The problem does not seems here to be due to "false" or "False"  since a tag such as "$current.pm1_0"  is computed as " = 1.1 µg/m³"  with the " ="  before the value of the tag.

vince

unread,
Feb 28, 2025, 2:56:39 PMFeb 28
to weewx-user
Why not simply format the .raw value to the required number of decimal places ?

I do this with my purpleair data from a secondary db, if it helps any....

             <tr>
                <td class="stats_label">pm2_5_cf_1</td>
                <td class="stats_data">$latest('purpleair_binding').pm2_5_cf_1.formatted $unit.label.pm2_5_cf_1</td>
              </tr>

Jacques Terrettaz

unread,
Feb 28, 2025, 3:24:15 PMFeb 28
to weewx...@googlegroups.com
Thanks  Vince,

Workarounds are possible, but  I would be happy to  understand, if possible,  why weewx is adding  a " ="  ( which is not expected) to tags for  parameters  with group unit  "group_concentration "

 

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/8OY5vAF8Q78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/ab075971-088d-4c0a-96cb-2c52d83d1eb4n%40googlegroups.com.

vince

unread,
Feb 28, 2025, 3:37:41 PMFeb 28
to weewx-user
FWIW - I have occasionally found $current has unexpected behavior when $latest sometimes works better.

Jacques Terrettaz

unread,
Feb 28, 2025, 3:37:42 PMFeb 28
to weewx...@googlegroups.com
Just tested .... With my settings, and without a secondary  db,  the tag  $latest.pm2_5.formatted  produce   = 2.8    with the " =" !



Le 28 févr. 2025 à 20:56, vince <vince...@gmail.com> a écrit :

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/8OY5vAF8Q78/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/ab075971-088d-4c0a-96cb-2c52d83d1eb4n%40googlegroups.com.

gjr80

unread,
Feb 28, 2025, 5:09:01 PMFeb 28
to weewx-user
Your problem is in weewx.conf  [StdReport] [[Defaults]] [[[StringFormats]]]. You have a = in the group_concentration format:

microgram_per_meter_cubed = = %.1f

Gary

gjr80

unread,
Feb 28, 2025, 5:11:37 PMFeb 28
to weewx-user
Correction the ‘ microgram_per_meter_cubed’ format.

Gary

Jacques Terrettaz

unread,
Mar 1, 2025, 2:20:20 AMMar 1
to weewx...@googlegroups.com
Thanks Gary. It was the problem.

Reply all
Reply to author
Forward
0 new messages