You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to weewx-user
I have a problem with the sdr driver.The problem is that sdr does not kill the rtl_433 process and due to some graphs with many queries there are times that I get the database is locked error that causes weewx to restart, then loading the driver again gives the error and stays in a loopuntil I solve it manually and lose all the data.
Aug 14 02:05:32 raspberrypi weewx[9020]: engine: Main loop exiting. Shutting engine down. Aug 14 02:05:32 raspberrypi weewx[9020]: engine: Shutting down StdReport thread Aug 14 02:05:47 raspberrypi weewx[9020]: reportengine: Caught unrecoverable exception in generator 'user.belchertown.HighchartsJsonGenerator' Aug 14 02:05:47 raspberrypi weewx[9020]: **** database is locked Aug 14 02:05:47 raspberrypi weewx[9020]: **** Traceback (most recent call last): Aug 14 02:05:47 raspberrypi weewx[9020]: **** File "/usr/share/weewx/weewx/reportengine.py", line 204, in run Aug 14 02:05:47 raspberrypi weewx[9020]: **** obj.start() Aug 14 02:05:47 raspberrypi weewx[9020]: **** File "/usr/share/weewx/weewx/reportengine.py", line 300, in start Aug 14 02:05:47 raspberrypi weewx[9020]: **** self.run() Aug 14 02:05:47 raspberrypi weewx[9020]: **** File "/usr/share/weewx/user/belchertown.py", line 1026, in run Aug 14 02:05:47 raspberrypi weewx[9020]: **** start_ts = archive.firstGoodStamp() Aug 14 02:05:47 raspberrypi weewx[9020]: **** File "/usr/share/weewx/weewx/manager.py", line 215, in firstGoodStamp Aug 14 02:05:47 raspberrypi weewx[9020]: **** _row = self.getSql("SELECT MIN(dateTime) FROM %s" % self.table_name) Aug 14 02:05:47 raspberrypi weewx[9020]: **** File "/usr/share/weewx/weewx/manager.py", line 395, in getSql Aug 14 02:05:47 raspberrypi weewx[9020]: **** _cursor.execute(sql, sqlargs) Aug 14 02:05:47 raspberrypi weewx[9020]: **** File "/usr/share/weewx/weedb/sqlite.py", line 43, in guarded_fn Aug 14 02:05:47 raspberrypi weewx[9020]: **** raise weedb.OperationalError(e) Aug 14 02:05:47 raspberrypi weewx[9020]: **** OperationalError: database is locked Aug 14 02:05:47 raspberrypi weewx[9020]: **** Generator terminated Aug 14 02:05:47 raspberrypi weewx[9020]: sdr: MainThread: shutdown process rtl_433 -q -F json -R 32 -M utc -f 868.3M Aug 14 02:05:57 raspberrypi weewx[9020]: sdr: MainThread: timed out waiting for stdout-thread Aug 14 02:06:07 raspberrypi weewx[9020]: sdr: MainThread: timed out waiting for stderr-thread Aug 14 02:06:07 raspberrypi weewx[9020]: engine: Database OperationalError exception: database is locked Aug 14 02:06:07 raspberrypi weewx[9020]: **** Waiting 2 minutes then retrying... Aug 14 02:08:07 raspberrypi weewx[9020]: engine: retrying... Aug 14 02:08:07 raspberrypi weewx[9020]: engine: Using configuration file /etc/weewx/weewx.conf Aug 14 02:08:07 raspberrypi weewx[9020]: engine: Loading station type SDR (user.sdr) Aug 14 02:08:07 raspberrypi weewx[9020]: sdr: MainThread: driver version is 0.64 Aug 14 02:08:07 raspberrypi weewx[9020]: sdr: MainThread: sensor map is {'windGust': 'wind_gust.*.FOWHx080Packet', 'windDir': 'wind_dir.*.FOWHx080Packet', 'windSpeed': 'wind_speed.*.FOWHx080Packet', 'outTemp': 'temperature.*.FOWHx080Packet', 'outHumidity': 'humidity.*.FOWHx080Packet', 'rain_total': 'rain_total.*.FOWHx080Packet', 'battery': 'battery.*.FOWHx080Packet'} Aug 14 02:08:07 raspberrypi weewx[9020]: sdr: MainThread: deltas is {'rain': 'rain_total'} Aug 14 02:08:07 raspberrypi weewx[9020]: sdr: MainThread: startup process 'rtl_433 -q -F json -R 32 -M utc -f 868.3M' Aug 14 02:08:07 raspberrypi weewx[9020]: engine: StdConvert target unit is 0x11 Aug 14 02:08:07 raspberrypi weewx[9020]: 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 Aug 14 02:08:07 raspberrypi weewx[9020]: wxcalculate: The following algorithms will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS Aug 14 02:08:07 raspberrypi weewx[9020]: engine: Archive will use data binding wx_binding Aug 14 02:08:07 raspberrypi weewx[9020]: engine: Record generation will be attempted in 'software' Aug 14 02:08:07 raspberrypi weewx[9020]: engine: Using archive interval of 300 seconds (software record generation) Aug 14 02:08:07 raspberrypi weewx[9020]: engine: Using binding 'wx_binding' to database 'weewx.sdb' Aug 14 02:08:07 raspberrypi weewx[9020]: manager: Starting backfill of daily summaries Aug 14 02:08:07 raspberrypi weewx[9020]: restx: StationRegistry: Station will be registered. Aug 14 02:08:07 raspberrypi weewx[9020]: restx: Wunderground: Posting not enabled. Aug 14 02:08:07 raspberrypi weewx[9020]: restx: PWSweather: Posting not enabled. Aug 14 02:08:08 raspberrypi weewx[9020]: restx: CWOP: Posting not enabled. Aug 14 02:08:08 raspberrypi weewx[9020]: restx: WOW: Posting not enabled. Aug 14 02:08:08 raspberrypi weewx[9020]: restx: AWEKAS: Posting not enabled. Aug 14 02:08:08 raspberrypi weewx[9020]: restx: MQTT: service version is 0.19 Aug 14 02:08:08 raspberrypi weewx[9020]: restx: MQTT: binding to ['loop', 'archive'] Aug 14 02:08:08 raspberrypi weewx[9020]: restx: MQTT: topic is estacion/datos Aug 14 02:08:08 raspberrypi weewx[9020]: restx: MQTT: desired unit system is METRIC Aug 14 02:08:08 raspberrypi weewx[9020]: restx: MQTT: data will be uploaded to mqtt://broker.hivemq.com:1883 Aug 14 02:08:08 raspberrypi weewx[9020]: engine: Starting up weewx version 3.9.1 Aug 14 02:08:08 raspberrypi weewx[9020]: engine: Starting main packet loop. Aug 14 02:08:08 raspberrypi weewx[9020]: sdr: MainThread: err: ['rtl_433 version unknown inputs file rtl_tcp RTL-SDR\n', 'Trying conf file at "rtl_433.conf"...\n', 'Trying conf file at "/root/.config/rtl_433/rtl_433.conf"...\n', 'Trying conf file at "/usr/local/etc/rtl_433/rtl_433.conf"...\n', 'Trying conf file at "/etc/rtl_433/rtl_433.conf"...\n', 'quiet option (-q) is default and deprecated. See -v to increase verbosity\n', '\n', '\tConsider using "-M newmodel" to transition to new model keys. This will become the default someday.\n', '\tA table of changes and discussion is at https://github.com/merbanan/rtl_433/pull/986.\n', '\n', 'Registered 1 out of 133 device decoding protocols [ 32 ]\n', 'usb_claim_interface error -6\n'] Aug 14 02:08:08 raspberrypi weewx[9020]: engine: Main loop exiting. Shutting engine down. Aug 14 02:08:08 raspberrypi weewx[9020]: sdr: MainThread: shutdown process rtl_433 -q -F json -R 32 -M utc -f 868.3M Aug 14 02:08:08 raspberrypi weewx[9020]: engine: Caught WeeWxIOError: rtl_433 process is not running Aug 14 02:08:08 raspberrypi weewx[9020]: **** Waiting 60 seconds then retrying... Aug 14 02:09:08 raspberrypi weewx[9020]: engine: retrying...