SDR shutsdown after receiving the 1st paquet

102 views
Skip to first unread message

sbar...@gmail.com

unread,
Oct 21, 2023, 7:04:02 AM10/21/23
to weewx-user
Hi, 

I have been using weewx for a while now and have an issue that seems to come every few years.
Weewx will die after reveiving the 1st SDR paquet. Last time, I thought that maybe the receiver was dead, and I replaced it (but kept the old one just in case, as it did not seem dead when using rtl_433 directly)
Today, it happened again. So I put back the old sdr receiver, but no better.

 have tried running the sdr.py plugin, and it does not die, nor show any error. Packets jsut come in and are logged on screen.

Is there a way to find which condition triggers the sdr shutdown from weewx main process, upon receiving a SDR packet?

Thank you.

ps : 
I was running 4.5.1 until this morning. I ran an upgrade and update to 4.10.2 just in case, but no channge.
Here is the syslog showing the shutdown

Oct 21 12:50:15 weatherpi weewx[14101] INFO __main__: retrying...
Oct 21 12:50:15 weatherpi weewx[14101] INFO weewx.engine: Loading station type SDR (user.sdr)
Oct 21 12:50:15 weatherpi weewx[14101] INFO user.sdr: driver version is 0.78
Oct 21 12:50:15 weatherpi weewx[14101] INFO user.sdr: sensor map is {'windGust': 'wind_gust.0:*.OSWGR800Packet', 'windSpeed': 'wind_speed.0:*.OSWGR800Packet', 'windBatteryStatus': 'battery.0:*.OSWGR800Packet', 'windDir': 'wind_dir.0:*.OSWGR800Packet', 'rain_total': 'rain_total.0:*.OSPCR800Packet', 'rainBatteryStatus': 'battery.0:*.OSPCR800Packet', 'extraTemp1': 'temperature_C.1:*.AmbientWeather-TX8300', 'UV': 'uv_index.1:*.OSUV800Packet', 'inTemp': 'temperature.1:*.OSBTHGN129Packet', 'inHumidity': 'humidity.1:*.OSBTHGN129Packet', 'inTempBatteryStatus': 'battery.1:*.OSBTHGN129Packet', 'outTemp': 'temperature.1:*.OSTHGR810Packet', 'outTempBatteryStatus': 'battery.2:*.OSTHGR810Packet', 'Humidity': 'humidity.1:*.OSTHGR810Packet'}
Oct 21 12:50:15 weatherpi weewx[14101] INFO user.sdr: deltas is {'rain': 'rain_total', 'strikes': 'strikes_total'}
Oct 21 12:50:15 weatherpi weewx[14101] INFO user.sdr: startup process 'rtl_433 -F json -M utc'
Oct 21 12:50:15 weatherpi weewx[14101] INFO user.sdr: startup process '['rtl_433', '-F', 'json', '-M', 'utc']'
Oct 21 12:50:16 weatherpi /weewxd: SDS011: sds011 Extension version is 0.1
Oct 21 12:50:16 weatherpi /weewxd: SDS011: model is SDS011
Oct 21 12:50:16 weatherpi /weewxd: SDS011: port is /dev/ttyUSB0
Oct 21 12:50:16 weatherpi /weewxd: SDS011: poll interval is 30
Oct 21 12:50:16 weatherpi /weewxd: PiSense: PiSensewx configuration {'i2c_port': '1', 'i2c_address': '0x5c', 'temperatureKeys': 'extraTemp1', 'pressureKeys': 'pressure', 'humidityKeys': 'outHumidity', 'temperature_must_have': '', 'pressure_mus_have': '', 'humidity_must_have': ''}
Oct 21 12:50:16 weatherpi weewx[14101] INFO user.sdr: shutdown process rtl_433 -F json -M utc
Oct 21 12:50:16 weatherpi kernel: [ 3384.620882] dvb_usb_v2: 'Realtek RTL2832U reference design:1-1.5' successfully deinitialized and disconnected
Oct 21 12:50:20 weatherpi kernel: [ 3388.896552] usb 1-1.5: dvb_usb_v2: found a 'Realtek RTL2832U reference design' in warm state
Oct 21 12:50:20 weatherpi kernel: [ 3388.926802] usb 1-1.5: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
Oct 21 12:50:20 weatherpi kernel: [ 3388.926854] dvbdev: DVB: registering new adapter (Realtek RTL2832U reference design)
Oct 21 12:50:20 weatherpi kernel: [ 3388.926877] usb 1-1.5: media controller created
Oct 21 12:50:20 weatherpi kernel: [ 3388.930466] dvbdev: dvb_create_media_entity: media entity 'dvb-demux' registered.
Oct 21 12:50:20 weatherpi kernel: [ 3388.951861] i2c i2c-11: Added multiplexed i2c bus 12
Oct 21 12:50:20 weatherpi kernel: [ 3388.951890] rtl2832 11-0010: Realtek RTL2832 successfully attached
Oct 21 12:50:20 weatherpi kernel: [ 3388.952004] usb 1-1.5: DVB: registering adapter 0 frontend 0 (Realtek RTL2832 (DVB-T))...
Oct 21 12:50:20 weatherpi kernel: [ 3388.952047] dvbdev: dvb_create_media_entity: media entity 'Realtek RTL2832 (DVB-T)' registered.
Oct 21 12:50:20 weatherpi kernel: [ 3388.958988] i2c i2c-12: fc0012: Fitipower FC0012 successfully identified
Oct 21 12:50:20 weatherpi kernel: [ 3388.984120] rtl2832_sdr rtl2832_sdr.6.auto: Registered as swradio0
Oct 21 12:50:20 weatherpi kernel: [ 3388.984145] rtl2832_sdr rtl2832_sdr.6.auto: Realtek RTL2832 SDR attached
Oct 21 12:50:20 weatherpi kernel: [ 3388.984163] rtl2832_sdr rtl2832_sdr.6.auto: SDR API is still slightly experimental and functionality changes may follow
Oct 21 12:50:20 weatherpi kernel: [ 3388.992908] Registered IR keymap rc-empty
Oct 21 12:50:20 weatherpi kernel: [ 3388.993227] rc rc1: Realtek RTL2832U reference design as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/rc/rc1
Oct 21 12:50:20 weatherpi kernel: [ 3388.993993] rc rc1: lirc_dev: driver dvb_usb_rtl28xxu registered at minor = 0, raw IR receiver, no transmitter
Oct 21 12:50:20 weatherpi kernel: [ 3388.994260] input: Realtek RTL2832U reference design as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/rc/rc1/input71
Oct 21 12:50:20 weatherpi kernel: [ 3388.996106] usb 1-1.5: dvb_usb_v2: schedule remote query interval to 200 msecs
Oct 21 12:50:20 weatherpi kernel: [ 3389.004791] usb 1-1.5: dvb_usb_v2: 'Realtek RTL2832U reference design' successfully initialized and connected
Oct 21 12:50:29 weatherpi kernel: [ 3398.340965] dvb_usb_v2: 'Realtek RTL2832U reference design:1-1.5' successfully deinitialized and disconnected

sbar...@gmail.com

unread,
Nov 25, 2023, 8:45:01 AM11/25/23
to weewx-user
Hi,

I finally decided to find a work around to this dying SDR driver by myself. It ends up SDR is working fine and not dying at all. What happens is that someone else is dying, with an exception not logged, triggering a shutdown.

So if I may suggest an improvement to weewx, add something like to log unhandled exception shutting down weewx: 
logging.debug   ("An exception was thrown!", exc_info=True)

at line 168 in  loadServices function except part (I am running 4.10.2)

after adding that I got the actual exception, with module name, function name and faulty line number.

Regards,
Reply all
Reply to author
Forward
0 new messages