Hi, The problem you are experiencing is due an incompatibility between your station emitting what is known as partial loop packets (ie not all obs are included in all loop packets) and the mode in which you are operating the csv extension.
You are running the CSV extension such that it emits loop data to file and includes a header line. Subsequent loop packets are appended to the file. The header line is only written (1) when the csv output file is first created or (2) on each loop packet but only if mode = 'overwrite'. In your case you are using 'append' mode so the header line is only written when the csv output file is first created. Think now of the situation where the first loop packet has, say, observation outTemp but the next loop packet does not. So the header line is written and includes 'outTemp' in the relevant place. The line of csv data for that packet is written to file and each field matches with the header line. When the next loop packet is processed there is no outTemp field in the loop packet so nothing is written in outTemp's place in the line of csv data (well in fact something will be written it will be the next field if there is one). Consequently when your parser parses that line it expects to see outTemp data when in fact it sees the next value instead (perhaps it was outTempBatteryStatus) and hence you get nonsense values from your parser. Solutions, there are a few possibilities: 1. use 'overwrite' mode instead of append, in this mode the header line is written each time a packet is processed but there is only ever one line in your csv output file 2. delete the csv output file after each loop packet is read by your parser (this is a pretty lame solution) 3. rewrite the csv extension to cache loop packet data so that a 'complete' loop packet is written each time 4. emit archive record data rather than loop packet data Gary On Wednesday, 16 October 2019 01:19:24 UTC+10, Dave wrote: > > You'll note that debug is set to 1 in the weewx.conf I posted. So I have a > parsing program that monitors the CSV file. Here's output from manual weewx: > > LOOP: 2019-10-15 08:09:56 PDT (1571152196) altimeter: 29.9926902844, > channel: None, dateTime: 1571152196, inTemp: 77.0, maxSolarRad: None, > outTempBatteryStatus: 0, pressure: 29.8123680055, rain: None, rain_total: > 110.4646, rainRate: 0, rssi: 3, rxCheckPercent: 100.0, sensor_battery: 0, > sensor_id: 1228, usUnits: 1, windDir: None, windSpeed: 0.0 > LOOP: 2019-10-15 08:10:14 PDT (1571152214) appTemp: 54.9009717276, > channel: None, cloudbase: 428.468658946, dateTime: 1571152214, dewpoint: > 52.8847379006, heatindex: 54.0, humidex: 57.6993884477, maxSolarRad: None, > outHumidity: 96, outTemp: 54.0, outTempBatteryStatus: 0, rainRate: 0, rssi: > 3, rxCheckPercent: 100.0, sensor_battery: 0, sensor_id: 1228, usUnits: 1, > windchill: 54.0, windDir: None, windSpeed: 0.0 > > Here's raw CSV data corresponding to those LOOP entries: > > 1571152196,29.9926902844,None,77.0,None,0,29.8123680055,None,0,110.4646,3,100.0,0,1228,1,None,0.0 > > 1571152214,54.9009717276,None,428.468658946,52.8847379006,54.0,57.6993884477,None,96,54.0,0,0,3,100.0,0,1228,1,None,0.0,54.0 > > If I parse this: > Tue Oct 15 08:09:56 2019 altimeter:29.9926902844 barometer:77.0 > dewpoint:29.8123680055 inTemp:110.4646 maxSolarRad:3 outHumidity:100.0 > outTempBatteryStatus:1228 pressure:1 rssi:0.0 > > Tue Oct 15 08:10:14 2019 altimeter:54.9009717276 barometer:428.468658946 > channel:52.8847379006 cloudbase:54.0 dewpoint:57.6993884477 humidex:96 > inTemp:54.0 outTemp:3 outTempBatteryStatus:100.0 rainRate:1228 rssi:1 > sensor_battery:0.0 sensor_id:54.0 > > > I parse according to the first line in the file: > # > dateTime,altimeter,appTemp,barometer,channel,cloudbase,dewpoint,heatindex,humidex,inTemp,maxSolarRad,outHumidity,outTemp,outTempBatteryStatus,pressure,rainRate,rssi,rxCheckPercent,sensor_battery,sensor_id,usUnits,windSpeed,windchill > > > > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/e14ce066-22fd-4ed0-833f-839fd8ad64ab%40googlegroups.com.