I just setup a WeeWX instance with your import config file in your first post but using
rain = discrete and a csv data file using the two records in your last post. I ran
wee_import using these files and
--dry-run and
--verbose and received somewhat different output to what you posted, in my case there were warnings of missing fields in the csv data file:
$ sudo /home/weewx/bin/wee_import --import-config=/var/tmp/csv.conf --verbose
/home/weewx/bin/wee_import:719: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.version import StrictVersion
Using WeeWX configuration file /home/weewx/weewx.conf
Starting wee_import...
A CSV import from source file '/var/tmp/remy.csv' has been requested.
The following options will be used:
config=/home/weewx/weewx.conf, import-config=/var/tmp/csv.conf
source=/var/tmp/remy.csv, from=None, to=None
dry-run=None, calc_missing=True, ignore_invalid_data=True
tranche=250, interval=conf, date/time_string_format=%Y-%m-%d %H:%M:%S
delimiter=',', rain=discrete, wind_direction=[-360.0, 360.0]
UV=True, radiation=True
Using database binding 'wx_binding', which is bound to database 'weewx.sdb'
Destination table 'archive' unit system is '0x01' (US).
Missing derived observations will be calculated.
Starting import ...
Obtaining raw import data for period 1 ...
The following imported field-to-WeeWX field map will be used:
source field 'dateTime' in units 'unix_epoch' --> WeeWX field 'dateTime'
source field 'barometer' in units 'hPa' --> WeeWX field 'barometer'
source field 'inTemp' in units 'degree_C' --> WeeWX field 'inTemp'
source field 'outTemp' in units 'degree_C' --> WeeWX field 'outTemp'
source field 'inHumidity' in units 'percent' --> WeeWX field 'inHumidity'
source field 'outHumidity' in units 'percent' --> WeeWX field 'outHumidity'
source field 'windSpeed' in units 'km_per_hour' --> WeeWX field 'windSpeed'
source field 'windDir' in units 'degree_compass' --> WeeWX field 'windDir'
source field 'windGust' in units 'km_per_hour' --> WeeWX field 'windGust'
source field 'rainRate' in units 'mm_per_hour' --> WeeWX field 'rainRate'
source field 'rain' in units 'mm' --> WeeWX field 'rain'
source field 'dewpoint' in units 'degree_C' --> WeeWX field 'dewpoint'
source field 'windchill' in units 'degree_C' --> WeeWX field 'windchill'
source field 'radiation' in units 'watt_per_meter_squared' --> WeeWX field 'radiation'
source field 'UV' in units 'uv_index' --> WeeWX field 'UV'
source field 'extraTemp1' in units 'degree_C' --> WeeWX field 'extraTemp1'
Raw import data read successfully for period 1.
Mapping raw import data for period 1 ...
Warning: Import field 'inTemp' is mapped to WeeWX field 'inTemp' but the
import field 'inTemp' could not be found in one or more records.
WeeWX field 'inTemp' will be set to 'None' in these records.
Warning: Import field 'inHumidity' is mapped to WeeWX field 'inHumidity' but the
import field 'inHumidity' could not be found in one or more records.
WeeWX field 'inHumidity' will be set to 'None' in these records.
Warning: Import field 'radiation' is mapped to WeeWX field 'radiation' but the
import field 'radiation' could not be found in one or more records.
WeeWX field 'radiation' will be set to 'None' in these records.
Warning: Import field 'UV' is mapped to WeeWX field 'UV' but the
import field 'UV' could not be found in one or more records.
WeeWX field 'UV' will be set to 'None' in these records.
Warning: Import field 'extraTemp1' is mapped to WeeWX field 'extraTemp1' but the
import field 'extraTemp1' could not be found in one or more records.
WeeWX field 'extraTemp1' will be set to 'None' in these records.
Mapped 2 records.
Raw import data mapped successfully for period 1.
Saving mapped data to archive for period 1 ...
2 records identified for import.
Proceeding will save all imported records in the WeeWX archive.
Are you sure you want to proceed (y/n)? y
Unique records processed: 2; Last timestamp: 2023-08-28 18:35:00 AEST (1693211700)
Mapped data saved to archive successfully ""for period 1.
Calculating missing derived observations ...
Processing record: 2; Last record: 2023-08-29 00:00:00 AEST (1693231200)
Recalculating daily summaries...
Finished recalculating daily summaries
Finished calculating missing derived observations
Finished import
2 records were processed and 2 unique records imported in 2.87 seconds.
Those records with a timestamp already in the archive will not have been
imported. Confirm successful import in the WeeWX log file.
These warnings are inconsequential for your import, but they make me wonder if you have posted the correct output for the command/config/data specified? Importantly, in my test the data was imported as expected:
$ sqlite3 /home/weewx/archive/weewx.sdb
SQLite version 3.37.2 2022-01-06 13:25:41
Enter ".help" for usage hints.
sqlite> SELECT dateTime,datetime(dateTime, 'unixepoch', 'localtime'),outTemp,rain,rainRate FROM archive ORDER BY dateTime DESC LIMIT 6;
1693340400|2023-08-30 06:20:00|32.1130389185491|0.0|0.0
1693340100|2023-08-30 06:15:00|32.3124634933352|0.0|0.0
1693339800|2023-08-30 06:10:00|32.5203063775446|0.0|0.0
1693339500|2023-08-30 06:05:00|32.6532104624026|0.0|0.0
1693211700|2023-08-28 18:35:00|60.8|0.0078740157480315|0.2362204722
1693211400|2023-08-28 18:30:00|63.68|0.0118110236220472|0.14173228332
sqlite>
(note the fields are in the native units (US customary) for my database ie rain and rainRate values are in inches and inches/hour)
Also, the command and response specified in your posts include the use of the
--dry-run command line option; if
--dry-run is used data will never be saved to database - that is the point of
--dry-run. Have you run the same command without
--dry-run? If not I suggest you try that and if it does not import correctly post the exact command line used and the exact output received. If you have run
wee_import without
--dry-run please post the corresponding
wee_import output.
One other thing, how are you determining that the data was not imported? The most reliable way is to directly query the database, if you are relying upon WeeWX generated output this can be unreliable/untimely due to caching, delays in generation etc.
Gary