On Tuesday, 26 March 2019 23:37:33 UTC-3, rich T wrote:
>
> I might be wrong, but I'm expecting is to see the decoded packets, so I
> can create a sensor map. Is there an option missing?
>
Rich,
First of all I have to check the output when the driver is runned directly;
the "[u'"at the start and "]"at the end of each line should not be there.
The purpose of step 7 is to see if the driver catches data packets (the
lines with the 8-byte hex code) and if they come fast enough (with interval
2.5 - 3.0 seconds).
The default sensor map is in the program, starting at line 668:
DEFAULT_SENSOR_MAP = {
'pressure': 'pressure',
'inTemp': 'temp_in', # temperature of optional BMP280 module
'windSpeed': 'wind_speed',
'windDir': 'wind_dir',
'outTemp': 'temperature',
'outHumidity': 'humidity',
'inHumidity': 'humidity_in',
# To use a rainRate calculation from this driver that closely matches
# that of a Davis station, uncomment the rainRate field then specify
# rainRate = hardware in section [StdWXCalculate] of weewx.conf
'rainRate': 'rain_rate',
'radiation': 'solar_radiation',
'UV': 'uv',
#'extraTemp1': 'temp_1',
#'extraTemp2': 'temp_2',
#'extraTemp3': 'temp_3',
'soilTemp1': 'soil_temp_1',
'soilTemp2': 'soil_temp_2',
'soilTemp3': 'soil_temp_3',
'soilTemp4': 'soil_temp_4',
'leafTemp1': 'leaf_temp_1',
#'leafTemp2': 'leaf_temp_2',
'extraHumid1': 'humid_1',
'extraHumid2': 'humid_2',
'soilMoist1': 'soil_moisture_1',
'soilMoist2': 'soil_moisture_2',
'soilMoist3': 'soil_moisture_3',
'soilMoist4': 'soil_moisture_4',
'leafWet1': 'leaf_wetness_1',
'leafWet2': 'leaf_wetness_2',
'rxCheckPercent': 'pct_good', # updated in
'txBatteryStatus': 'bat_iss',
'supplyVoltage': 'supercap_volt',
'referenceVoltage': 'solar_power',
'windBatteryStatus': 'bat_anemometer',
'rainBatteryStatus': 'bat_leaf_soil',
'outTempBatteryStatus': 'bat_th_1',
'inTempBatteryStatus': 'bat_th_2',
'extraTemp1': 'pct_good_1', # renamed
'extraTemp2': 'pct_good_2', # renamed
'extraTemp3': 'pct_good_3', # renamed
'leafTemp2': 'pct_good_4', # renamed
'consBatteryVoltage': 'freqError0',
'hail': 'freqError1',
'hailRate': 'freqError2',
'heatingTemp': 'freqError3',
'heatingVoltage': 'freqError4'}
The left side of the map contain the field names in de database when the
default wview schema is used. See weewx.conf for wx-binding:
[[wx_binding]]
# The database must match one of the sections in [Databases].
# This is likely to be the only option you would want to change.
database = archive_sqlite
# The name of the table within the database
table_name = archive
# The manager handles aggregation of data for historical summaries
manager = weewx.wxmanager.WXDaySummaryManager
# The schema defines the structure of the database.
# It is *only* used when the database is created.
schema = schemas.wview.schema
The right side of the map contain the names of the parsed data. Not all
parsed data names have an equivalent in the wview schema.
When you have additional temp/humidy stations, you may sore them in fields
extraTempx and extraHumidx.
The program has some extra data what might be handy for quality control:
Currently they are mapped to extraTemp1 - extraTemp3 and leafTemp2, but if
you only have two stations (ISS and LEAF/SOIL), you might want to use
leafTemp2 for the measured leaf_temp_2 signal and only use (i.e. map)
pct_good_1 and pct_good_2.
Also the frequency errors of the first 5 channels can be stored in the
database. This is handy for EU stations (they have 5 channels) but is is of
little use for US stations with its 51 channels).
When you don't want to store a particular packet (e.g. supercap_volt, only
available on a Vantage Vue station), you may delete or comment out the line
in the default sensor map.
Be careful with changing the last line: it should have a "}" at the end and
no comma.
Success!
Luc