Vantage LOOP2 Question about omission in _loop_map

56 views
Skip to first unread message

Paul Anderson

unread,
Jan 26, 2020, 10:56:32 AM1/26/20
to weewx-development
Hi,
Been running development from GIT for several months but never tried LOOP2 until now. While trying LOOP2 I noticed that there were some fields present in the vantage driver loop2_schema that were not in the _loop_map. Wondering if this is by design or an error of omission? Just did a pull so totally up to date.

vantage driver
present in loop2_schema BUT NOT IN _loop_map

rain15
rain24
bar_calibration
hourRain
bar_reduction
pressure_raw
bar_offset

So if $current.XYZ is used in a template results are: 

rain15 ?'rain15'?
rain24 ?'rain24'?
bar_calibration ?'bar_calibration'?
hourRain ?'hourRain'?
bar_reduction ?'bar_reduction'?
pressure_raw N/A
bar_offset ?'bar_offset'?rain15 0.000000

If this is added to _loop_map , $current tags work as expected:

     'rain15'          : _decode_rain,
    'rain24'          : _decode_rain,
    'bar_calibration' : lambda p, k: float(p[k]) / 1000.0 if p[k] else None,
    'hourRain'        : _decode_rain,rain15 0.000000
    'bar_reduction'   : lambda p, k: float(p[k]) / 1000.0 if p[k] else None,
    'pressure_raw'    : lambda p, k: float(p[k]) / 1000.0 if p[k] else None,
    'bar_offset'      : lambda p, k: float(p[k]) / 1000.0 if p[k] else None,

Results in template become as expected:
rain15 0.000000
rain24 0.67 in
bar_calibration 17.606000
hourRain 0.00 in
bar_reduction 0.002000
pressure_raw 29.421000
bar_offset 0.061000

Barometer stuff is pretty obscure, but may be use case for the rain fields?

Thanks,
Paul


Tom Keffer

unread,
Feb 11, 2020, 8:50:47 AM2/11/20
to weewx-development
My favorite kind of report: a problem, along with a solution!

Good eye, Paul. I had missed these. 


My apologies for waiting so long on this: it never showed up in my in box. I just happened across it because I was browsing the forum's website.

-tk
Reply all
Reply to author
Forward
0 new messages