Closed airframes closed 6 years ago
Found the issue. I'd configured weewx.conf with the weewx-sdr sensor map AcuRite config stanza with a direct copypasta from the git config. The four-character hex identifier in the example (0BFA) did not match what the parser saw coming from my station (0BE8). After running the parser directly, I was able to get the correct value and I updated the weewx config with my sensor's value. Now it's working.
Non-working weewx.conf config (git example):
[[sensor_map]]
# AcuRite 5n1 Professional Weather Station
windDir = wind_dir.0BFA.Acurite5n1Packet
windSpeed = wind_speed.0BFA.Acurite5n1Packet
outTemp = temperature.0BFA.Acurite5n1Packet
outHumidity = humidity.0BFA.Acurite5n1Packet
rain_total = rain_total.0BFA.Acurite5n1Packet
Working weewx.conf config:
[[sensor_map]]
# AcuRite 5n1 Professional Weather Station
windDir = wind_dir.0BE8.Acurite5n1Packet
windSpeed = wind_speed.0BE8.Acurite5n1Packet
outTemp = temperature.0BE8.Acurite5n1Packet
outHumidity = humidity.0BE8.Acurite5n1Packet
rain_total = rain_total.0BE8.Acurite5n1Packet
Hi,
I have weewx (3.8.0) running with weewx-sdr, rtl-sdr, and rtl_433. rtl_433 is reading a stream from an AcuRite 5n1 sensor (model 02032C). After some tinkering, I have a clean feed coming into to weewx, but it's not posting to my wunderground pws site.
weewx running with debug=1 shows the main loop picking up the feed, but no attempts to post to WU. FWIW, I had WU posting working intermittently when using the acurite driver with the usb/console setup, but that was intermittent and unreliable, so I'm attempting to get an rtl-sdr setup going instead.
I think the issue is with weewx-sdr possibly not parsing the rtl_433 output correctly or otherwise weewx-sdr and weewx somehow not connecting the dots to trigger the post. Here's the relevant weewx.conf config:
NOTE: I am pretty sure weewx no longer needs the [AcuRite] section because it's now using [SDR], but included it anyway
And here is the /var/log/syslog output:
Jan 7 11:41:27 DietPi weewx[20393]: engine: Initializing weewx version 3.8.0 Jan 7 11:41:27 DietPi weewx[20393]: engine: Using Python 2.7.13 (default, Nov 24 2017, 17:33:09) #012[GCC 6.3.0 20170516] Jan 7 11:41:27 DietPi weewx[20393]: engine: Platform Linux-4.9.0-4-amd64-x86_64-with-debian-9.3 Jan 7 11:41:27 DietPi weewx[20393]: engine: Locale is 'en_GB.UTF-8' Jan 7 11:41:27 DietPi weewx[20393]: engine: Using configuration file /etc/weewx/weewx.conf Jan 7 11:41:27 DietPi weewx[20393]: engine: debug is 1 Jan 7 11:41:27 DietPi weewx[20393]: engine: Initializing engine Jan 7 11:41:27 DietPi weewx[20393]: engine: Loading station type SDR (user.sdr) Jan 7 11:41:27 DietPi weewx[20393]: sdr: MainThread: driver version is 0.39 Jan 7 11:41:27 DietPi weewx[20393]: sdr: MainThread: sensor map is {'windDir': 'wind_dir.0BFA.Acurite5n1Packet', 'windSpeed': 'wind_speed.0BFA.Acurite5n1Packet', 'outTemp': 'temperature.0BFA.Acurite5n1Packet', 'outHumidity': 'humidity.0BFA.Acurite5n1Packet', 'rain_total': 'rain_total.0BFA.Acurite5n1Packet'} Jan 7 11:41:27 DietPi weewx[20393]: sdr: MainThread: deltas is {'strikes': 'strikes_total', 'rain': 'rain_total'} Jan 7 11:41:27 DietPi weewx[20393]: sdr: MainThread: startup process 'rtl_433 -q -U -F json -R 40' Jan 7 11:41:27 DietPi weewx[20393]: sdr: stdout-thread: start async reader for stdout-thread Jan 7 11:41:27 DietPi weewx[20393]: sdr: stderr-thread: start async reader for stderr-thread Jan 7 11:41:27 DietPi weewx[20393]: engine: Loading service weewx.engine.StdTimeSynch Jan 7 11:41:27 DietPi weewx[20393]: engine: Finished loading service weewx.engine.StdTimeSynch Jan 7 11:41:27 DietPi weewx[20393]: engine: Loading service weewx.engine.StdConvert Jan 7 11:41:27 DietPi weewx[20393]: engine: StdConvert target unit is 0x1 Jan 7 11:41:27 DietPi weewx[20393]: engine: Finished loading service weewx.engine.StdConvert Jan 7 11:41:27 DietPi weewx[20393]: engine: Loading service weewx.engine.StdCalibrate Jan 7 11:41:27 DietPi weewx[20393]: engine: Finished loading service weewx.engine.StdCalibrate Jan 7 11:41:27 DietPi weewx[20393]: engine: Loading service weewx.engine.StdQC Jan 7 11:41:27 DietPi weewx[20393]: engine: Finished loading service weewx.engine.StdQC Jan 7 11:41:27 DietPi weewx[20393]: engine: Loading service weewx.wxservices.StdWXCalculate Jan 7 11:41:27 DietPi weewx[20393]: wxcalculate: The following values will be calculated: barometer=prefer_hardware, windchill=prefer_hardware, dewpoint=prefer_hardware, appTemp=prefer_hardware, rainRate=prefer_hardware, windrun=prefer_hardware, heatindex=prefer_hardware, maxSolarRad=prefer_hardware, humidex=prefer_hardware, pressure=prefer_hardware, inDewpoint=prefer_hardware, ET=prefer_hardware, altimeter=prefer_hardware, cloudbase=prefer_hardware Jan 7 11:41:27 DietPi weewx[20393]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS Jan 7 11:41:27 DietPi weewx[20393]: engine: Finished loading service weewx.wxservices.StdWXCalculate Jan 7 11:41:27 DietPi weewx[20393]: engine: Loading service weewx.engine.StdArchive Jan 7 11:41:27 DietPi weewx[20393]: engine: Archive will use data binding wx_binding Jan 7 11:41:27 DietPi weewx[20393]: engine: Record generation will be attempted in 'hardware' Jan 7 11:41:27 DietPi weewx[20393]: engine: Using archive interval of 300 seconds (specified in weewx configuration) Jan 7 11:41:27 DietPi weewx[20393]: engine: Use LOOP data in hi/low calculations: 1 Jan 7 11:41:27 DietPi weewx[20393]: manager: Daily summary version is 2.0 Jan 7 11:41:27 DietPi weewx[20393]: engine: Using binding 'wx_binding' to database 'weewx.sdb' Jan 7 11:41:27 DietPi weewx[20393]: manager: Starting backfill of daily summaries Jan 7 11:41:27 DietPi weewx[20393]: engine: Finished loading service weewx.engine.StdArchive Jan 7 11:41:27 DietPi weewx[20393]: engine: Loading service weewx.restx.StdStationRegistry Jan 7 11:41:27 DietPi weewx[20393]: restx: StationRegistry: Station will not be registered: no station_url specified. Jan 7 11:41:27 DietPi weewx[20393]: engine: Finished loading service weewx.restx.StdStationRegistry Jan 7 11:41:27 DietPi weewx[20393]: engine: Loading service weewx.restx.StdWunderground Jan 7 11:41:27 DietPi weewx[20393]: restx: Wunderground-PWS: Data for station KORPORTL962 will be posted Jan 7 11:41:27 DietPi weewx[20393]: engine: Finished loading service weewx.restx.StdWunderground Jan 7 11:41:27 DietPi weewx[20393]: engine: Loading service weewx.restx.StdPWSweather Jan 7 11:41:27 DietPi weewx[20393]: restx: PWSweather: Posting not enabled. Jan 7 11:41:27 DietPi weewx[20393]: engine: Finished loading service weewx.restx.StdPWSweather Jan 7 11:41:27 DietPi weewx[20393]: engine: Loading service weewx.restx.StdCWOP Jan 7 11:41:27 DietPi weewx[20393]: restx: CWOP: Posting not enabled. Jan 7 11:41:27 DietPi weewx[20393]: engine: Finished loading service weewx.restx.StdCWOP Jan 7 11:41:27 DietPi weewx[20393]: engine: Loading service weewx.restx.StdWOW Jan 7 11:41:27 DietPi weewx[20393]: restx: WOW: Posting not enabled. Jan 7 11:41:27 DietPi weewx[20393]: engine: Finished loading service weewx.restx.StdWOW Jan 7 11:41:27 DietPi weewx[20393]: engine: Loading service weewx.restx.StdAWEKAS Jan 7 11:41:27 DietPi weewx[20393]: restx: AWEKAS: Posting not enabled. Jan 7 11:41:27 DietPi weewx[20393]: engine: Finished loading service weewx.restx.StdAWEKAS Jan 7 11:41:27 DietPi weewx[20393]: engine: Loading service weewx.engine.StdPrint Jan 7 11:41:27 DietPi weewx[20393]: engine: Finished loading service weewx.engine.StdPrint Jan 7 11:41:27 DietPi weewx[20393]: engine: Loading service weewx.engine.StdReport Jan 7 11:41:27 DietPi weewx[20393]: engine: Finished loading service weewx.engine.StdReport Jan 7 11:41:27 DietPi weewx[20393]: engine: Starting up weewx version 3.8.0 Jan 7 11:41:27 DietPi weewx[20393]: engine: Station does not support reading the time Jan 7 11:41:27 DietPi weewx[20393]: engine: Starting main packet loop. Jan 7 11:41:27 DietPi weewx[20393]: manager: Daily summary version is 2.0 Jan 7 11:41:27 DietPi acpid: input device has been disconnected, fd 8 Jan 7 11:41:27 DietPi kernel: [403072.154268] r820t 1-001a: destroying instance Jan 7 11:41:27 DietPi kernel: [403072.154611] dvb_usb_v2: 'Realtek RTL2832U reference design:2-1' successfully deinitialized and disconnected Jan 7 11:41:30 DietPi weewx[20393]: sdr: MainThread: lines=[] Jan 7 11:41:33 DietPi weewx[20393]: sdr: MainThread: lines=[] Jan 7 11:41:37 DietPi weewx[20393]: sdr: MainThread: lines=['{"time" : "2018-01-07 19:41:34", "model" : "Acurite 5n1 sensor", "sensor_id" : 3048, "channel" : "B", "sequence_num" : 0, "battery" : "OK", "message_type" : 56, "wind_speed_mph" : 0.000, "temperature_F" : 45.000, "humidity" : 90}\n'] Jan 7 11:41:37 DietPi weewx[20393]: sdr: MainThread: unmapped: [] ({}) Jan 7 11:41:40 DietPi weewx[20393]: sdr: MainThread: lines=[] Jan 7 11:41:45 DietPi weewx[20393]: sdr: MainThread: lines=['{"time" : "2018-01-07 19:41:42", "model" : "Acurite 5n1 sensor", "sensor_id" : 3048, "channel" : "B", "sequence_num" : 0, "battery" : "OK", "message_type" : 56, "wind_speed_mph" : 0.000, "temperature_F" : 45.100, "humidity" : 90}\n', '{"time" : "2018-01-07 19:41:42", "model" : "Acurite 5n1 sensor", "sensor_id" : 3048, "channel" : "B", "sequence_num" : 1, "battery" : "OK", "message_type" : 56, "wind_speed_mph" : 0.000, "temperature_F" : 45.100, "humidity" : 90}\n', '{"time" : "2018-01-07 19:41:42", "model" : "Acurite 5n1 sensor", "sensor_id" : 3048, "channel" : "B", "sequence_num" : 2, "battery" : "OK", "message_type" : 56, "wind_speed_mph" : 0.000, "temperature_F" : 45.100, "humidity" : 90}\n'] Jan 7 11:41:45 DietPi weewx[20393]: sdr: MainThread: unmapped: ['{"time" : "2018-01-07 19:41:42", "model" : "Acurite 5n1 sensor", "sensor_id" : 3048, "channel" : "B", "sequence_num" : 1, "battery" : "OK", "message_type" : 56, "wind_speed_mph" : 0.000, "temperature_F" : 45.100, "humidity" : 90}\n', '{"time" : "2018-01-07 19:41:42", "model" : "Acurite 5n1 sensor", "sensor_id" : 3048, "channel" : "B", "sequence_num" : 2, "battery" : "OK", "message_type" : 56, "wind_speed_mph" : 0.000, "temperature_F" : 45.100, "humidity" : 90}\n'] ({}) Jan 7 11:41:45 DietPi weewx[20393]: sdr: MainThread: unmapped: ['{"time" : "2018-01-07 19:41:42", "model" : "Acurite 5n1 sensor", "sensor_id" : 3048, "channel" : "B", "sequence_num" : 2, "battery" : "OK", "message_type" : 56, "wind_speed_mph" : 0.000, "temperature_F" : 45.100, "humidity" : 90}\n'] ({}) Jan 7 11:41:45 DietPi weewx[20393]: sdr: MainThread: unmapped: [] ({}) Jan 7 11:41:48 DietPi weewx[20393]: sdr: MainThread: lines=[] Jan 7 11:41:51 DietPi weewx[20393]: sdr: MainThread: lines=[] ...
And this last part just continues indefinitely--the sdr: MainThread lines repeat, picking up the feed from the acurite every 10 seconds or so, but I never see weewx trying to post.
A packet capture on the network shows no signs of traffic toward wunderground, and the host (DietPi) has no issues with internet connectivity (dns lookups work, wget works, git clone works, etc.).
Are the weewx-srd field mappings correct? Is there data or format missing or wrong that should otherwise be triggering weewx to post?
After several days of working with it, success feels so close! :-D
Thanks, MF
ps. Matthew--thanks for developing a way to use SDR with weewx. I was pulling my hair out trying to get the acurite console/USB to work and was ready to throw in the towel when I ran across your git.