Hi everyone,
I have a FineOffsetUSB WH1080 weather station connected via USB cable to a Raspberry Pi running weewx 3.8.2 and all is well.
However, if I disconnect the USB cable, the following occurs:
Aug 17 17:15:33 raspberrypi kernel: [ 3493.146569] usb 1-1.5: USB disconnect, device number 4
Aug 17 17:16:08 raspberrypi weewx[436]: fousb: get_observations failed: [Errno 19] No such device (it may have been disconnected)
Aug 17 17:16:38 raspberrypi weewx[436]: fousb: avoid 1.36598801613
Aug 17 17:16:40 raspberrypi weewx[436]: fousb: get_observations failed: [Errno 19] No such device (it may have been disconnected)
Aug 17 17:17:01 raspberrypi CRON[1014]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Aug 17 17:17:10 raspberrypi weewx[436]: fousb: get_observations failed: [Errno 19] No such device (it may have been disconnected)
Aug 17 17:17:40 raspberrypi weewx[436]: fousb: get_observations failed: [Errno 19] No such device (it may have been disconnected)
Aug 17 17:17:40 raspberrypi weewx[436]: engine: Main loop exiting. Shutting engine down.
Aug 17 17:17:40 raspberrypi weewx[436]: engine: Shutting down StdReport thread
Aug 17 17:17:40 raspberrypi weewx[436]: engine: StdReport thread has been terminated
Aug 17 17:17:40 raspberrypi weewx[436]: restx: Shut down Wunderground-PWS thread.
Aug 17 17:17:40 raspberrypi weewx[436]: engine: Caught WeeWxIOError: Max retries exceeded while fetching observations
Aug 17 17:17:40 raspberrypi weewx[436]: **** Waiting 60 seconds then retrying...
Aug 17 17:18:40 raspberrypi weewx[436]: engine: retrying...
Aug 17 17:18:40 raspberrypi weewx[436]: engine: Using configuration file /home/weewx/weewx.conf
Aug 17 17:18:40 raspberrypi weewx[436]: engine: Debug is 1
Aug 17 17:18:40 raspberrypi weewx[436]: engine: Initializing engine
Aug 17 17:18:40 raspberrypi weewx[436]: engine: Loading station type FineOffsetUSB (weewx.drivers.fousb)
Aug 17 17:18:40 raspberrypi weewx[436]: fousb: driver version is 1.9
Aug 17 17:18:40 raspberrypi weewx[436]: fousb: polling mode is PERIODIC
Aug 17 17:18:40 raspberrypi weewx[436]: fousb: polling interval is 60
Aug 17 17:18:40 raspberrypi weewx[436]: fousb: Cannot find USB device with Vendor=0x1941 ProdID=0x8021 Device=None
Aug 17 17:18:40 raspberrypi weewx[436]: import of driver failed: Unable to find USB device (<class 'weewx.WeeWxIOError'>)
Aug 17 17:18:40 raspberrypi weewx[436]: engine: Unable to load driver: Unable to find USB device
Aug 17 17:18:40 raspberrypi weewx[436]: **** Exiting...
Then when I reconnect the cable:
Aug 17 17:50:09 raspberrypi kernel: [ 5569.605720] usb 1-1.5: new low-speed USB device number 5 using dwc_otg
Aug 17 17:50:09 raspberrypi kernel: [ 5569.781581] usb 1-1.5: New USB device found, idVendor=1941, idProduct=8021
Aug 17 17:50:09 raspberrypi kernel: [ 5569.781594] usb 1-1.5: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Aug 17 17:50:09 raspberrypi mtp-probe: checking bus 1, device 5: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5"
Aug 17 17:50:09 raspberrypi mtp-probe: bus: 1, device: 5 was not an MTP device
Aug 17 17:50:09 raspberrypi kernel: [ 5569.815823] hid-generic 0003:1941:8021.0002: hiddev96,hidraw0: USB HID v1.00 Device [HID 1941:8021] on usb-3f980000.usb-1.5/input0
This is probably expected behaviour.
However, weewx never "resumes" or never starts sending data to my remote MySQL database or to Wunderground.
I'm guessing because of this:
Aug 17 17:17:40 raspberrypi weewx[436]: engine: Shutting down StdReport thread
Aug 17 17:17:40 raspberrypi weewx[436]: engine: StdReport thread has been terminated
The only way to get things moving again is to restart the weewx service (or the entire Raspberry Pi).
Is there a setting I can change to have weewx keep retrying every 60 seconds? Rather than it giving up after the first failed retry attempt?
Thanks!