help troubleshooting: weewx database stopped accepting data, out of the blue

143 views
Skip to first unread message

Eric K

unread,
Jun 10, 2021, 1:53:59 PM6/10/21
to weewx-user
After running for a month without problems, it appears the weewx.sdb file has stopped accepting data.
It happened about 11:30am today, without any warning or apparent cause.

I'm pulling in data via the sdr driver primarily and also from MQTTSubscribe.
From the syslog, I can see that data is still coming in from the sdr and MQTTSubscribe, but it's not getting logged to the database, and thus the weewx webpage has N/A for all the temp and pressure values.

Restarting weewx did not fix it.
Shutting down weewx and restarting Ubuntu 20 did not fix it.

I wonder if the database file got corrupted somehow?
Is the sqlite database limited to around 5MB in size?
My current sqlite database size info is:
-rw-r--r--  1 weewx weewx 4751360 Jun 10 11:35 weewx.sdb

I was capturing the debug=1 level to the syslog file at that moment.
Can anyone see any clues?

Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] INFO weewx.manager: Added record 2021-06-10 11:25:00 CDT (1623342300) to database 'weewx.sdb'
Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] INFO weewx.manager: Added record 2021-06-10 11:25:00 CDT (1623342300) to daily summary in 'weewx.sdb'
Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.restx: StationRegistry: wait interval (410100 < 604800) has not passed for record 2021-06-10 11:25:00 CDT (1623342300)
Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Running reports for latest time in the database.
Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'SeasonsReport' not enabled. Skipping.
Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'SmartphoneReport' not enabled. Skipping.
Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'MobileReport' not enabled. Skipping.
Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'StandardReport' not enabled. Skipping.
Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Running report 'Belchertown'
Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Found configuration file /home/weewx/skins/EricBelchertown/skin.conf for report 'Belchertown'
Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 'weewx.cheetahgenerator.JSONHelpers', 'user.belchertown.getData']
Jun 10 11:27:32 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.manager: Daily summary version is 4.0
Jun 10 11:27:33 Ubuntu20-WEEWX weewx[4066] INFO weewx.restx: PWSWeather: Published record 2021-06-10 11:25:00 CDT (1623342300)
Jun 10 11:27:33 Ubuntu20-WEEWX weewx[4066] INFO weewx.cheetahgenerator: Generated 11 files for report Belchertown in 0.32 seconds
Jun 10 11:27:33 Ubuntu20-WEEWX weewx[4066] INFO weewx.reportengine: Copied 2 files to /home/weewx/public_html
Jun 10 11:27:33 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.manager: Daily summary version is 4.0
Jun 10 11:27:33 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'FTP' not enabled. Skipping.
Jun 10 11:27:33 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'RSYNC' not enabled. Skipping.
Jun 10 11:27:33 Ubuntu20-WEEWX weewx[4066] INFO weewx.restx: Wunderground-PWS: Published record 2021-06-10 11:25:00 CDT (1623342300)
Jun 10 11:27:35 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[]
Jun 10 11:27:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) MessageCallbackProvider data-> incoming topic: tele/BMP280/SENSOR, QOS: 0, retain: 0, payload: b'{"Time":"2021-06-10T11:27:37","BMP280":{"Temperature":20.8,"Pressure":977.1},"PressureUnit":"hPa","TempUnit":"C"}'
Jun 10 11:27:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> incoming tele/BMP280/SENSOR: appTemp1: 20.8, barometer: 977.1
Jun 10 11:27:38 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[]
Jun 10 11:27:43 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=['{"time" : "2021-06-10 16:27:39", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 2, "battery_ok" : 1, "message_type" : 39, "wind_avg_mi_h" : 2.000, "uv" : 1, "lux" : 3140, "strike_count" : 241, "strike_distance" : 0, "exception" : 0, "raw_msg" : "c811e78181823a3ca05a"}\n']
Jun 10 11:27:43 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: packet={'windSpeed': 2.0, 'UV': 1, 'luminosity': 3140, 'Atlas_strike_count': 241, 'lightning_distance': 0, 'windBatteryStatus': 0, 'dateTime': 1623342459, 'usUnits': 1}
Jun 10 11:27:43 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing tele/BMP280/SENSOR: appTemp1: 20.8, barometer: 977.1, dateTime: 1623342457.4788659, usUnits: 16
Jun 10 11:27:43 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing accumulated tele/BMP280/SENSOR: appTemp1: 69.44, barometer: 28.85375078625, dateTime: 1623342459, usUnits: 1
Jun 10 11:27:43 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2021-06-10 11:27:39 CDT (1623342459): appTemp1: 69.44, Atlas_strike_count: 241, barometer: 28.85375078625, dateTime: 1623342459, lightning_distance: 0, lightning_strike_count: 0, luminosity: 3140, usUnits: 1, UV: 1, windBatteryStatus: 0, windSpeed: 2.0
Jun 10 11:27:46 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[]
Jun 10 11:28:10 Ubuntu20-WEEWX weewx[4066] message repeated 8 times: [ DEBUG user.sdr: lines=[]]
Jun 10 11:28:13 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=['{"time" : "2021-06-10 16:28:10", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 1, "battery_ok" : 1, "message_type" : 39, "wind_avg_mi_h" : 2.000, "uv" : 2, "lux" : 3090, "strike_count" : 241, "strike_distance" : 0, "exception" : 0, "raw_msg" : "c411e7818282353ca052"}\n', '{"time" : "2021-06-10 16:28:10", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 2, "battery_ok" : 1, "message_type" : 39, "wind_avg_mi_h" : 2.000, "uv" : 2, "lux" : 3090, "strike_count" : 241, "strike_distance" : 0, "exception" : 0, "raw_msg" : "c811e7818282353ca056"}\n']
Jun 10 11:28:13 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: packet={'windSpeed': 2.0, 'UV': 2, 'luminosity': 3090, 'Atlas_strike_count': 241, 'lightning_distance': 0, 'windBatteryStatus': 0, 'dateTime': 1623342490, 'usUnits': 1}
Jun 10 11:28:13 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2021-06-10 11:28:10 CDT (1623342490): Atlas_strike_count: 241, dateTime: 1623342490, lightning_distance: 0, lightning_strike_count: 0, luminosity: 3090, usUnits: 1, UV: 2, windBatteryStatus: 0, windSpeed: 2.0
Jun 10 11:28:13 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: packet={'windSpeed': 2.0, 'UV': 2, 'luminosity': 3090, 'Atlas_strike_count': 241, 'lightning_distance': 0, 'windBatteryStatus': 0, 'dateTime': 1623342490, 'usUnits': 1}
Jun 10 11:28:13 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2021-06-10 11:28:10 CDT (1623342490): Atlas_strike_count: 241, dateTime: 1623342490, lightning_distance: 0, lightning_strike_count: 0, luminosity: 3090, usUnits: 1, UV: 2, windBatteryStatus: 0, windSpeed: 2.0
Jun 10 11:28:16 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[]
Jun 10 11:28:34 Ubuntu20-WEEWX weewx[4066] message repeated 6 times: [ DEBUG user.sdr: lines=[]]
Jun 10 11:28:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) MessageCallbackProvider data-> incoming topic: tele/BMP280/SENSOR, QOS: 0, retain: 0, payload: b'{"Time":"2021-06-10T11:28:37","BMP280":{"Temperature":20.9,"Pressure":977.1},"PressureUnit":"hPa","TempUnit":"C"}'
Jun 10 11:28:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> incoming tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1
Jun 10 11:28:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[]
Jun 10 11:29:34 Ubuntu20-WEEWX weewx[4066] message repeated 19 times: [ DEBUG user.sdr: lines=[]]
Jun 10 11:29:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) MessageCallbackProvider data-> incoming topic: tele/BMP280/SENSOR, QOS: 0, retain: 0, payload: b'{"Time":"2021-06-10T11:29:37","BMP280":{"Temperature":20.9,"Pressure":977.1},"PressureUnit":"hPa","TempUnit":"C"}'
Jun 10 11:29:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> incoming tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1
Jun 10 11:29:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[]
Jun 10 11:29:40 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[]
Jun 10 11:29:45 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=['{"time" : "2021-06-10 16:29:42", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 1, "battery_ok" : 1, "message_type" : 39, "wind_avg_mi_h" : 3.000, "uv" : 2, "lux" : 3280, "strike_count" : 241, "strike_distance" : 0, "exception" : 0, "raw_msg" : "c411e7814282483ca025"}\n', '{"time" : "2021-06-10 16:29:42", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 2, "battery_ok" : 1, "message_type" : 39, "wind_avg_mi_h" : 3.000, "uv" : 2, "lux" : 3280, "strike_count" : 241, "strike_distance" : 0, "exception" : 0, "raw_msg" : "c811e7814282483ca029"}\n']
Jun 10 11:29:45 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: packet={'windSpeed': 3.0, 'UV': 2, 'luminosity': 3280, 'Atlas_strike_count': 241, 'lightning_distance': 0, 'windBatteryStatus': 0, 'dateTime': 1623342582, 'usUnits': 1}
Jun 10 11:29:45 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1, dateTime: 1623342517.5098, usUnits: 16
Jun 10 11:29:45 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1, dateTime: 1623342577.4890494, usUnits: 16
Jun 10 11:29:45 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing accumulated tele/BMP280/SENSOR: appTemp1: 69.62, barometer: 28.85375078625, dateTime: 1623342582, usUnits: 1
Jun 10 11:29:45 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2021-06-10 11:29:42 CDT (1623342582): appTemp1: 69.62, Atlas_strike_count: 241, barometer: 28.85375078625, dateTime: 1623342582, lightning_distance: 0, lightning_strike_count: 0, luminosity: 3280, usUnits: 1, UV: 2, windBatteryStatus: 0, windSpeed: 3.0
Jun 10 11:29:45 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: packet={'windSpeed': 3.0, 'UV': 2, 'luminosity': 3280, 'Atlas_strike_count': 241, 'lightning_distance': 0, 'windBatteryStatus': 0, 'dateTime': 1623342582, 'usUnits': 1}
Jun 10 11:29:45 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2021-06-10 11:29:42 CDT (1623342582): Atlas_strike_count: 241, dateTime: 1623342582, lightning_distance: 0, lightning_strike_count: 0, luminosity: 3280, usUnits: 1, UV: 2, windBatteryStatus: 0, windSpeed: 3.0
Jun 10 11:29:48 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[]
Jun 10 11:30:00 Ubuntu20-WEEWX weewx[4066] message repeated 4 times: [ DEBUG user.sdr: lines=[]]
Jun 10 11:30:01 Ubuntu20-WEEWX CRON[45270]: (root) CMD ([ -x /etc/init.d/anacron ] && if [ ! -d /run/systemd/system ]; then /usr/sbin/invoke-rc.d anacron start >/dev/null; fi)
Jun 10 11:30:03 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[]
Jun 10 11:30:36 Ubuntu20-WEEWX weewx[4066] message repeated 11 times: [ DEBUG user.sdr: lines=[]]
Jun 10 11:30:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) MessageCallbackProvider data-> incoming topic: tele/BMP280/SENSOR, QOS: 0, retain: 0, payload: b'{"Time":"2021-06-10T11:30:37","BMP280":{"Temperature":20.9,"Pressure":977.1},"PressureUnit":"hPa","TempUnit":"C"}'
Jun 10 11:30:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> incoming tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1
Jun 10 11:30:39 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[]
Jun 10 11:31:18 Ubuntu20-WEEWX weewx[4066] message repeated 13 times: [ DEBUG user.sdr: lines=[]]
Jun 10 11:31:21 Ubuntu20-WEEWX systemd[1]: Started Run anacron jobs.
Jun 10 11:31:21 Ubuntu20-WEEWX anacron[45271]: Anacron 2.3 started on 2021-06-10
Jun 10 11:31:21 Ubuntu20-WEEWX anacron[45271]: Normal exit (0 jobs run)
Jun 10 11:31:21 Ubuntu20-WEEWX systemd[1]: anacron.service: Succeeded.
Jun 10 11:31:21 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[]
Jun 10 11:31:36 Ubuntu20-WEEWX weewx[4066] message repeated 5 times: [ DEBUG user.sdr: lines=[]]
Jun 10 11:31:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) MessageCallbackProvider data-> incoming topic: tele/BMP280/SENSOR, QOS: 0, retain: 0, payload: b'{"Time":"2021-06-10T11:31:37","BMP280":{"Temperature":20.9,"Pressure":977.1},"PressureUnit":"hPa","TempUnit":"C"}'
Jun 10 11:31:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> incoming tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1
Jun 10 11:31:39 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[]
Jun 10 11:32:36 Ubuntu20-WEEWX weewx[4066] message repeated 19 times: [ DEBUG user.sdr: lines=[]]
Jun 10 11:32:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) MessageCallbackProvider data-> incoming topic: tele/BMP280/SENSOR, QOS: 0, retain: 0, payload: b'{"Time":"2021-06-10T11:32:37","BMP280":{"Temperature":20.9,"Pressure":977.1},"PressureUnit":"hPa","TempUnit":"C"}'
Jun 10 11:32:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> incoming tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1
Jun 10 11:32:39 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[]
Jun 10 11:33:36 Ubuntu20-WEEWX weewx[4066] message repeated 19 times: [ DEBUG user.sdr: lines=[]]
Jun 10 11:33:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) MessageCallbackProvider data-> incoming topic: tele/BMP280/SENSOR, QOS: 0, retain: 0, payload: b'{"Time":"2021-06-10T11:33:37","BMP280":{"Temperature":20.9,"Pressure":977.1},"PressureUnit":"hPa","TempUnit":"C"}'
Jun 10 11:33:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> incoming tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1
Jun 10 11:33:39 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[]
Jun 10 11:34:36 Ubuntu20-WEEWX weewx[4066] message repeated 19 times: [ DEBUG user.sdr: lines=[]]
Jun 10 11:34:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) MessageCallbackProvider data-> incoming topic: tele/BMP280/SENSOR, QOS: 0, retain: 0, payload: b'{"Time":"2021-06-10T11:34:37","BMP280":{"Temperature":20.9,"Pressure":977.1},"PressureUnit":"hPa","TempUnit":"C"}'
Jun 10 11:34:37 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> incoming tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1
Jun 10 11:34:39 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=[]
Jun 10 11:35:09 Ubuntu20-WEEWX weewx[4066] message repeated 10 times: [ DEBUG user.sdr: lines=[]]
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: lines=['{"time" : "2021-06-10 16:35:10", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 1, "battery_ok" : 1, "message_type" : 38, "wind_avg_mi_h" : 2.000, "wind_dir_deg" : 176.000, "rain_in" : 3.280, "strike_count" : 241, "strike_distance" : 0, "exception" : 0, "raw_msg" : "c41166810542483ca027"}\n', '{"time" : "2021-06-10 16:35:10", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 2, "battery_ok" : 1, "message_type" : 38, "wind_avg_mi_h" : 2.000, "wind_dir_deg" : 176.000, "rain_in" : 3.280, "strike_count" : 241, "strike_distance" : 0, "exception" : 0, "raw_msg" : "c81166810542483ca02b"}\n']
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG user.sdr: packet={'windSpeed': 2.0, 'windDir': 176.0, 'Atlas_rain_total': 3.28, 'Atlas_strike_count': 241, 'lightning_distance': 0, 'windBatteryStatus': 0, 'dateTime': 1623342910, 'usUnits': 1}
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1, dateTime: 1623342637.5231528, usUnits: 16
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1, dateTime: 1623342697.4931262, usUnits: 16
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1, dateTime: 1623342757.5019915, usUnits: 16
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1, dateTime: 1623342817.4489577, usUnits: 16
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 977.1, dateTime: 1623342877.5332673, usUnits: 16
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing accumulated tele/BMP280/SENSOR: appTemp1: 69.62, barometer: 28.85375078625, dateTime: 1623342910, usUnits: 1
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2021-06-10 11:35:10 CDT (1623342910): appTemp1: 69.62, Atlas_rain_total: 3.28, Atlas_strike_count: 241, barometer: 28.85375078625, dateTime: 1623342910, lightning_distance: 0, lightning_strike_count: 0, rain: 0.0, usUnits: 1, windBatteryStatus: 0, windDir: 176.0, windSpeed: 2.0
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG user.MQTTSubscribe: (Service) data-> final record is 2021-06-10 11:30:00 CDT (1623342600): appTemp1: 69.485, Atlas_rain_total: 3.28, Atlas_strike_count: 241.0, barometer: 29.878996869479167, beaufort: 1.0, dateTime: 1623342600, interval: 5.0, lightning_distance: None, lightning_strike_count: 0.0, luminosity: 3176.0, maxSolarRad: 889.8842533501141, radiation: 25.058639999999997, rain: 0.0, rainRate: 0.0, usUnits: 1, UV: 1.8, windBatteryStatus: 0.0, windDir: 317.0, windGust: 3.0, windGustDir: None, windSpeed: 2.3333333333333335
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] INFO weewx.manager: Added record 2021-06-10 11:30:00 CDT (1623342600) to database 'weewx.sdb'
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] INFO weewx.manager: Added record 2021-06-10 11:30:00 CDT (1623342600) to daily summary in 'weewx.sdb'
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.restx: StationRegistry: wait interval (410400 < 604800) has not passed for record 2021-06-10 11:30:00 CDT (1623342600)
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Running reports for latest time in the database.
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'SeasonsReport' not enabled. Skipping.
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'SmartphoneReport' not enabled. Skipping.
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'MobileReport' not enabled. Skipping.
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'StandardReport' not enabled. Skipping.
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Running report 'Belchertown'

Eric K

unread,
Jun 10, 2021, 2:29:54 PM6/10/21
to weewx-user
Strangely, it posted data to the database around 12:15pm, and then stopped again?

Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG user.MQTTSubscribe: (Service) data-> final record is 2021-06-10 12:15:00 CDT (1623345300): appTemp1: 69.488, Atlas_rain_total: 3.28, Atlas_strike_count: 241.0, barometer: 29.874321288124996, beaufort: 0.0, dateTime: 1623345300, interval: 5.0, lightning_distance: 0.0, lightning_strike_count: 0.0, luminosity: 3720.0, maxSolarRad: 947.8926188082237, radiation: 29.3508, rain: 0.0, rainRate: 0.0, usUnits: 1, UV: 1.0, windBatteryStatus: 0.0, windDir: None, windGust: 0.0, windGustDir: None, windSpeed: 0.0
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.manager: Added record 2021-06-10 12:15:00 CDT (1623345300) to database 'weewx.sdb'
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.manager: Added record 2021-06-10 12:15:00 CDT (1623345300) to daily summary in 'weewx.sdb'
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: MQTT: Unexpected exception of type <class 'ValueError'>
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Running reports for latest time in the database.
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Report 'SeasonsReport' not enabled. Skipping.
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Report 'SmartphoneReport' not enabled. Skipping.
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Report 'MobileReport' not enabled. Skipping.
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Report 'StandardReport' not enabled. Skipping.
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Running report 'Belchertown'
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Found configuration file /home/weewx/skins/EricBelchertown/skin.conf for report 'Belchertown'
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras', 'weewx.cheetahgenerator.JSONHelpers', 'user.belchertown.getData']
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: *** Traceback (most recent call last):
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: ***   File "/home/weewx/bin/weewx/restx.py", line 381, in run_loop
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: ***     self.process_record(_record, dbmanager)
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: ***   File "/home/weewx/bin/user/mqtt.py", line 494, in process_record
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: ***     mc.connect(url.hostname, url.port)
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: ***   File "/usr/local/lib/python3.8/dist-packages/paho/mqtt/client.py", line 939, in connect
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: ***     self.connect_async(host, port, keepalive,
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: ***   File "/usr/local/lib/python3.8/dist-packages/paho/mqtt/client.py", line 1005, in connect_async
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: ***     raise ValueError('Invalid host.')
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] ERROR weewx.restx: *** ValueError: Invalid host.
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] CRITICAL weewx.restx: MQTT: Thread terminating. Reason: Invalid host.
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.manager: Daily summary version is 4.0
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.restx: StationRegistry: Failed upload attempt 1: HTTP Error 502: Bad Gateway
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.cheetahgenerator: Generated 11 files for report Belchertown in 0.33 seconds
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.reportengine: Copied 2 files to /home/weewx/public_html
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.manager: Daily summary version is 4.0
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.restx: PWSWeather: Published record 2021-06-10 12:15:00 CDT (1623345300)
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Report 'FTP' not enabled. Skipping.
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG weewx.reportengine: Report 'RSYNC' not enabled. Skipping.
Jun 10 12:15:34 Ubuntu20-WEEWX weewx[3673] INFO weewx.restx: Wunderground-PWS: Published record 2021-06-10 12:15:00 CDT (1623345300)
Jun 10 12:15:36 Ubuntu20-WEEWX weewx[3673] DEBUG user.sdr: lines=[]



Eric Koester

unread,
Jun 10, 2021, 3:58:56 PM6/10/21
to weewx...@googlegroups.com
I think I figured out what has been going on - low batteries my Acurite Atlas.
I just changed the batteries in the Acurite Atlas, and the database is again getting periodic entries.
I think this mystery is solved.

Diagnosis:

As I looked through the syslog, I noted that when there was no logging to the weewx.sdb file, there were long periods where there were no packets being received from the Acurite Atlas (even though there were packets coming in from MQTTSubscribe).

Then, at 12:15, there were a couple of logged packets from the Atlas, and the weewx.sdb database got an entry!

Jun 10 12:14:40 Ubuntu20-WEEWX weewx[3673] DEBUG user.sdr: lines=[]
Jun 10 12:15:28 Ubuntu20-WEEWX weewx[3673] message repeated 16 times: [ DEBUG user.sdr: lines=[]]
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG user.sdr: lines=['{"time" : "2021-06-10 17:15:29", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 0, "battery_ok" : 1, "message_type" : 37, "wind_avg_mi_h" : 3.000, "temperature_F" : 90.800, "humidity" : 47, "strike_count" : 241, "strike_distance" : 0, "exception" : 0, "raw_msg" : "c0116581ca9caf3ca0a8"}\n', '{"time" : "2021-06-10 17:15:29", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 1, "battery_ok" : 1, "message_type" : 37, "wind_avg_mi_h" : 3.000, "temperature_F" : 90.800, "humidity" : 47, "strike_count" : 241, "strike_distance" : 0, "exception" : 0, "raw_msg" : "c4116581ca9caf3ca0ac"}\n', '{"time" : "2021-06-10 17:15:29", "model" : "Acurite-Atlas", "id" : 17, "channel" : "A", "sequence_num" : 2, "battery_ok" : 1, "message_type" : 37, "wind_avg_mi_h" : 3.000, "temperature_F" : 90.800, "humidity" : 47, "strike_count" : 241, "strike_distance" : 0, "exception" : 0, "raw_msg" : "c8116581ca9caf3ca0b0"}\n']
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG user.sdr: packet={'outTemp': 90.8, 'outHumidity': 47.0, 'windSpeed': 3.0, 'Atlas_strike_count': 241, 'lightning_distance': 0, 'windBatteryStatus': 0, 'dateTime': 1623345329, 'usUnits': 1}
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing tele/BMP280/SENSOR: appTemp1: 20.9, barometer: 976.9, dateTime: 1623345277.4587064, usUnits: 16
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG user.MQTTSubscribe: (Service) TopicManager data-> outgoing accumulated tele/BMP280/SENSOR: appTemp1: 69.62, barometer: 28.84784478875, dateTime: 1623345329, usUnits: 1
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2021-06-10 12:15:29 CDT (1623345329): appTemp1: 69.62, Atlas_strike_count: 241, barometer: 28.84784478875, dateTime: 1623345329, lightning_distance: 0, lightning_strike_count: 0, outHumidity: 47.0, outTemp: 90.8, usUnits: 1, windBatteryStatus: 0, windSpeed: 3.0

Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] DEBUG user.MQTTSubscribe: (Service) data-> final record is 2021-06-10 12:15:00 CDT (1623345300): appTemp1: 69.488, Atlas_rain_total: 3.28, Atlas_strike_count: 241.0, barometer: 29.874321288124996, beaufort: 0.0, dateTime: 1623345300, interval: 5.0, lightning_distance: 0.0, lightning_strike_count: 0.0, luminosity: 3720.0, maxSolarRad: 947.8926188082237, radiation: 29.3508, rain: 0.0, rainRate: 0.0, usUnits: 1, UV: 1.0, windBatteryStatus: 0.0, windDir: None, windGust: 0.0, windGustDir: None, windSpeed: 0.0
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.manager: Added record 2021-06-10 12:15:00 CDT (1623345300) to database 'weewx.sdb'
Jun 10 12:15:33 Ubuntu20-WEEWX weewx[3673] INFO weewx.manager: Added record 2021-06-10 12:15:00 CDT (1623345300) to daily summary in 'weewx.sdb'

I'd seen this no-database-entry behavior before, when I was setting up weewx on my Raspberry Pi.
At that time, I concluded that when the main input to weewx (user.sdr in my case) doesn't have a data stream, then nothing gets written to the weewx.sdb, even if there are other live data sources, such as MQTTSubscribe.
So, when the weewx.sdb isn't getting entries, the primary data input to weewx is likely iffy or off-line.


--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/swT60KbC1jM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/a2385a43-5fc8-4e1e-b639-1def80c99c04n%40googlegroups.com.

gjr80

unread,
Jun 10, 2021, 7:56:55 PM6/10/21
to weewx-user
In working through your troubleshooting you might want to keep in mind the event driven model used by WeeWX. The key event that kicks of activity within WeeWX is the arrival of a loop packet from the driver. The arrival of a new loop packet then kicks off a number of services that perform some action on, or in response to the arrival of that loop packet (eg apply QC limits, corrections etc). WeeWX then accumulates the resulting (perhaps modified) loop packet and awaits the next loop packet and then the process repeats. When using software record generation (as you are) if the loop packet that just arrived belongs to the next archive period this causes WeeWX to generate an archive record from the previously accumulated loop packets. This event then causes the generated archive record to be saved to database, reports to be run etc.

Consequently when you have problems with few or no archive records being saved to database, one of the first things you look for are incoming loop packets. In your case look at the archive period from Jun 10 1130 to 1135:
You will see there were no loop packets emitted by the sdr driver during that archive period. The only loop packet in the above extract is at 11:35:10 (highlighted) but it is from the next archive period. This causes WeeWX to generate an archive record for the period 11:30 to 11:35, though there were no loop packets received during that time so the archive record is empty. Despite this the archive record is saved to database:


Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] INFO weewx.manager: Added record 2021-06-10 11:30:00 CDT (1623342600) to database 'weewx.sdb'
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] INFO weewx.manager: Added record 2021-06-10 11:30:00 CDT (1623342600) to daily summary in 'weewx.sdb'


triggering the reports:


Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Running reports for latest time in the database.
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'SeasonsReport' not enabled. Skipping.
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'SmartphoneReport' not enabled. Skipping.
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'MobileReport' not enabled. Skipping.
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Report 'StandardReport' not enabled. Skipping.
Jun 10 11:35:14 Ubuntu20-WEEWX weewx[4066] DEBUG weewx.reportengine: Running report 'Belchertown'


I don't know what the these reports would have shown but given the archive record would have been empty I would expect any current data to be missing or N/A.

You indicate that replacing the batteries in your Acurite may have solved the issue, perhaps it has (remember you had loop packets appearing sporadically in earlier logs - the log extract shown only covers a 53 second period with one loop packet so it is impossible to say from the log extract). I have no idea how often an Acurite Atlas emits data or how often it updates its display, but I would expect it would be sub-one minute so you should be seeing multiple loop packets each archive period - you need to monitor the log over a longer period. If you are not seeing multiple regular loop packets in each archive period then something is amiss, or perhaps your archive interval is too short (I strongly suspect that is not the case - five minutes should be fine).

You have a complex setup with the sdr driver, MQTT uploader and MQTTSubscribe running as a service. You really need to get the sdr side of things working reliably before everything else will come together as it should, in that regard it may be easier to disable those other services so you can concentrate on sdr. If things still do not seem reliable you may want to run rtl_433 from the command line (without WeeWX) to see what data it is receiving from your station and how often - this has the advantage of taking WeeWX out of the picture.

Gary

Eric Koester

unread,
Jun 11, 2021, 12:04:35 PM6/11/21
to weewx...@googlegroups.com
Thanks for the explanation of the event driven nature of WeeWX, Gary!  
That's great.  
It confirms my observations and theory of "no data into the primary driver, no data into the weewx.sdb".

In addition to putting new batteries into the Acurite Atlas, I moved my SDR antenna to a higher location.
Since doing those 2 things, there have been no drops in data from the Atlas.

I'll keep watching it.

Reply all
Reply to author
Forward
0 new messages