The Klimalogg driver works best with its own schema, rather than the default weeWX schema. The default weeWX schema includes fields dewpoint and heatindex only (ie not numbered). Even if your driver outputs heatindex0, heatindex1 etc these will not be stored in the database as they are not in the default schema. Did you make the changes to weewx.conf to use the binding kl_binding as per the klimalogg driver readme? If not you will need to so that weewx uses a schema that includes heatindex0, heatindex1 etc.
The Klimalogg driver should automatically calculate heatindex and dewpoint for all your sensors, you can check this by running weeWX directly and looking at the contents of the LOOP packets and ARCHIVE records. You can run weeWX directly as per these instructions http://weewx.com/docs/usersguide.htm#Running_directly
If you cannot get it to work please post a copy of your weewx.conf with any sensitive info removed. Also, stop then start weeWX and post a log extract from when you start weeWX until a few archive records have been saved. Do not edit the log, we need to see the entire startup preamble.
Gary
LOOP: 2017-06-01 11:09:32 CEST (1496308172) altimeter: None, appTemp: None, barometer: None, batteryStatus0: 0, batteryStatus1: 0, batteryStatus2: 0, batteryStatus3: 0, batteryStatus4: 0, batteryStatus5: 0, batteryStatus6: 0, batteryStatus7: 0, batteryStatus8: 0, cloudbase: None, dateTime: 1496308172, dewpoint: None, heatindex: None, humidex: None, humidity0: 45, humidity1: 46, humidity2: 50, humidity3: 48, humidity4: 50, humidity5: None, humidity6: None, humidity7: None, humidity8: None, inDewpoint: None, maxSolarRad: None, pressure: None, rainRate: 0, rxCheckPercent: 100, temp0: 78.26, temp1: 82.94, temp2: 75.2, temp3: 78.26, temp4: 76.28, temp5: None, temp6:None, temp7: None, temp8: None, usUnits: 1, windchill: NoneREC: 2017-06-01 11:10:00 CEST (1496308200) altimeter: None, appTemp: None, barometer: None, batteryStatus0: 0.0, batteryStatus1: 0.0, batteryStatus2: 0.0, batteryStatus3: 0.0, batteryStatus4: 0.0, batteryStatus5: 0.0, batteryStatus6: 0.0, batteryStatus7: 0.0, batteryStatus8: 0.0, cloudbase: None, dateTime: 1496308200.0, dewpoint: None, ET: None, heatindex: None, humidex: None, humidity0: 45.0, humidity1: 46.0, humidity2: 50.3333333333, humidity3: 48.0, humidity4: 50.0, humidity5: None, humidity6: None, humidity7: None, humidity8:None, inDewpoint: None, interval: 5, maxSolarRad: None, pressure: None, rainRate: 0.0, rxCheckPercent: 100.0, temp0: 78.38, temp1: 82.94, temp2: 75.2, temp3: 78.26, temp4: 76.28, temp5: None, temp6: None, temp7: None, temp8: None, usUnits: 1, windchill: None, windrun: 0.0[[sensor_map]]
temp0 = Temp0
humidity0 = Humidity0
heatindex0 = heatindex0
dewpoint0 = dewpoint0
temp1 = Temp1
humidity1 = Humidity1
heatindex1 = heatindex1
dewpoint2 = dewpoint1
temp2 = Temp2
humidity2 = Humidity2
heatindex2 = heatindex2
dewpoint2 = dewpoint2
temp3 = Temp3
humidity3 = Humidity3
heatindex3 = heatindex3
dewpoint3 = dewpoint3
temp4 = Temp4
humidity4 = Humidity4
heatindex4 = heatindex4
dewpoint4 = dewpoint4
temp5 = Temp5
humidity5 = Humidity5
temp6 = Temp6
humidity6 = Humidity6
temp7 = Temp7
humidity7 = Humidity7
temp8 = Temp8
humidity8 = Humidity8
rxCheckPercent = SignalQuality
batteryStatus0 = BatteryStatus0
batteryStatus1 = BatteryStatus1
batteryStatus2 = BatteryStatus2
batteryStatus3 = BatteryStatus3
batteryStatus4 = BatteryStatus4
batteryStatus5 = BatteryStatus5
batteryStatus6 = BatteryStatus6
batteryStatus7 = BatteryStatus7
batteryStatus8 = BatteryStatus8
LOOP: 2017-06-01 21:35:31 CEST (1496345731) altimeter: None, appTemp: None, barometer: None, batteryStatus0: 0, batteryStatus1: 0, batteryStatus2: 0, batteryStatus3: 0, batteryStatus4: 0, batteryStatus5: 0, batteryStatus6: 0, batteryStatus7: 0, batteryStatus8: 0, cloudbase: None, dateTime: 1496345731, dewpoint: None, dewpoint0: 12.4395622918, dewpoint1: 10.2028620613, dewpoint2: 13.3146548925, dewpoint3: 15.3598579755, dewpoint4: 13.2895672777, heatindex: None, heatindex0: 26.4, heatindex1: 22.4, heatindex2: 26.2, heatindex3: 27.3566888636, heatindex4: 25.8, humidex: None, humidity0: 42, humidity1: 46, humidity2: 45, humidity3: 49, humidity4: 46, humidity5: None, humidity6: None, humidity7: None, humidity8: None, inDewpoint: None, maxSolarRad: None, pressure: None, rainRate: 0, rxCheckPercent: 100, temp0: 26.4, temp1: 22.4, temp2: 26.2, temp3: 27.0, temp4: 25.8, temp5: None, temp6: None, temp7: None, temp8: None, usUnits: 1, windchill: NoneREC: 2017-06-01 21:35:00 CEST (1496345700) altimeter: None, appTemp: None, barometer: None, cloudbase: None, dateTime: 1496345700, dewpoint: None, dewpoint0: 12.5292678342, dewpoint1: 10.293701522, dewpoint2: 13.3146548925, dewpoint3: 15.4512548665, dewpoint4: 13.2895672777, ET: None, heatindex: None, heatindex0: 26.5, heatindex1: 22.5, heatindex2: 26.2, heatindex3: 27.4492357563, heatindex4: 25.8, humidex: None, humidity0: 42, humidity1: 46, humidity2: 45, humidity3: 49, humidity4: 46, humidity5: None, humidity6: None, humidity7: None, humidity8: None, inDewpoint: None, interval: 5, maxSolarRad: None, pressure: None, rainRate: 0, temp0: 26.5, temp1: 22.5, temp2: 26.2, temp3: 27.1, temp4: 25.8, temp5: None, temp6: None, temp7: None, temp8: None, usUnits: 1, windchill: None, windrun: 0.0Re the mapping, if you look at the comments in the code around line 1447-1486 you see mention of options sensor_map_id and [[sensor_map]]. If sensor_map_id is 0 (default) or 1 then one either the Klimalogg or weeWX standard sensor maps is used respectively. Since the sensor map also determines what fields are output from the driver (lines 2090-2111) and since heatindex0 and friends are not in either predefined sensor maps, heatindex0 and friends will never be produced (output) if we use the predefined sensor maps. Fortunately, [[sensor_map]] gives us a way around this. We can use the default Klimalogg sensor map as the basis of a custom sensor map, the format of which is the comments mentioned earlier.
The short answer is that KL_SENSOR_MAP (line 1258) is used as the sensor map if no sensor map is specified.
As for the units issue, can't see anything obvious, the Klimalogg driver should ouput metric data and weeWX should take care of any conversions. Need to have a closer look at things on the big screen (rather than this iPad) when I get home later this morning.
Gary
# setup units to support custom Klimalogg sensor map
from weewx.units import obs_group_dict
obs_group_dict['temp0'] = 'group_temperature'
obs_group_dict['temp1'] = 'group_temperature'
obs_group_dict['temp2'] = 'group_temperature'
obs_group_dict['temp3'] = 'group_temperature'
obs_group_dict['temp4'] = 'group_temperature'
obs_group_dict['temp5'] = 'group_temperature'
obs_group_dict['temp6'] = 'group_temperature'
obs_group_dict['temp7'] = 'group_temperature'
obs_group_dict['temp8'] = 'group_temperature'
obs_group_dict['humidity0'] = 'group_percent'
obs_group_dict['humidity1'] = 'group_percent'
obs_group_dict['humidity2'] = 'group_percent'
obs_group_dict['humidity3'] = 'group_percent'
obs_group_dict['humidity4'] = 'group_percent'
obs_group_dict['humidity5'] = 'group_percent'
obs_group_dict['humidity6'] = 'group_percent'
obs_group_dict['humidity7'] = 'group_percent'
obs_group_dict['humidity8'] = 'group_percent'
obs_group_dict['dewpoint0'] = 'group_temperature'
obs_group_dict['dewpoint1'] = 'group_temperature'
obs_group_dict['dewpoint2'] = 'group_temperature'
obs_group_dict['dewpoint3'] = 'group_temperature'
obs_group_dict['dewpoint4'] = 'group_temperature'
obs_group_dict['dewpoint5'] = 'group_temperature'
obs_group_dict['dewpoint6'] = 'group_temperature'
obs_group_dict['dewpoint7'] = 'group_temperature'
obs_group_dict['dewpoint8'] = 'group_temperature'
obs_group_dict['heatindex0'] = 'group_temperature'
obs_group_dict['heatindex1'] = 'group_temperature'
obs_group_dict['heatindex2'] = 'group_temperature'
obs_group_dict['heatindex3'] = 'group_temperature'
obs_group_dict['heatindex4'] = 'group_temperature'
obs_group_dict['heatindex5'] = 'group_temperature'
obs_group_dict['heatindex6'] = 'group_temperature'
obs_group_dict['heatindex7'] = 'group_temperature'
obs_group_dict['heatindex8'] = 'group_temperature'
obs_group_dict['rxCheckPercent'] = 'group_percent'
obs_group_dict['batteryStatus0'] = 'group_count'
obs_group_dict['batteryStatus1'] = 'group_count'
obs_group_dict['batteryStatus2'] = 'group_count'
obs_group_dict['batteryStatus3'] = 'group_count'
obs_group_dict['batteryStatus4'] = 'group_count'
obs_group_dict['batteryStatus5'] = 'group_count'
obs_group_dict['batteryStatus6'] = 'group_count'
obs_group_dict['batteryStatus7'] = 'group_count'
obs_group_dict['batteryStatus8'] = 'group_count'
Gary
Since there are now wrong value/unit type entries in the database, how can I delete it? Just delete the sdb file when weewx is stopped (will it create a new one?).
$ sudo apt-get install sqlite3$ sqlite3 /home/weewx/archive/weewx.sdbsqlite> SELECT * FROM archive WHERE dateTime<1496922300;sqlite> SELECT datetime(dateTime, 'unixepoch', 'localtime'),* FROM archive WHERE dateTime<1496922300;sqlite> SELECT datetime(dateTime, 'unixepoch', 'localtime'),* FROM archive WHERE outTemp<40;sqlite> DELETE FROM archive WHERE dateTime<123456789;sqlite> DELETE FROM archive WHERE outTemp<40;$ /home/weewx/bin/wee_database --rebuild-dailyAdditionally, what about files like weewx.conf.{random_number}, weewx.conf.dist or weewx.conf.save which have been created over the time using weewx? Are they safe to delete? Since at the beginning there was only the weewx.conf (same issue goes for skin.conf).