For quite some time I had been running weewx version 2.3.6 with my FineOffset weather station.. I have a USB hub with PPPS and had added a small cludge in wxengine.py to power cycle the base station whenever the USB locked up, and it did this when needed, sometimes it would go 10 or more days without a reset. I have just in the last few days upgraded everything, Pi firmware, apt-get upgrade etc ... And upgraded weewx. I read through the change log and found that weewx had built in support now to switch the PPPS usb hub, so I configured it for that.. Didn't work.. Everything runs until suddenly I get spurious records that do not trigger weewx to reset the USB port though. I have the following in my /etc/weewx/weewx.conf:
I don't have debug mode turned on at this point, but will for the next time it happens, but here is the log of whats happening as far as I have seen it as you will see weewx is crashing without even issuing traceback output the first time around and it's restarted by my restart script I use:
Dec 31 07:31:33 weather weewx[3165]: fousb: unstable read: blocks differ for ptr 0x000000
Dec 31 07:31:33 weather weewx[3165]: fousb: unrecognised magic number 1000
Dec 31 07:31:33 weather weewx[3165]: fousb: magic number changed old=55aa new=1000
Dec 31 07:31:33 weather weewx[3165]: fousb: unstable read: blocks differ for ptr 0x001860
Dec 31 07:31:33 weather weewx[3165]: fousb: ignoring spurious rain counter decrement (0x1870): new: 9.48 old: 35.91
Dec 31 07:31:33 weather weewx[3165]: fousb: station status {'unknown': 1, 'lost_connection': 64, 'rain_overflow': 0} (65)
Dec 31 07:31:33 weather weewx[3165]: engine: ignoring windDir value of 1507.5, limits are (0.0, 359.0)
Dec 31 07:31:33 weather weewx[3165]: engine: ignoring outTemp value of 247.46, limits are (0.0, 122.0)
Dec 31 07:31:33 weather weewx[3165]: engine: ignoring windGustDir value of 1507.5, limits are (0.0, 359.0)
Dec 31 07:32:01 weather /USR/SBIN/CRON[4330]: (root) CMD (/usr/sbin/weewxrestart > /dev/null 2>&1)
Dec 31 07:32:03 weather weewx[4342]: engine: Initializing weewx version 3.0.1
Dec 31 07:32:03 weather weewx[4342]: engine: Using Python 2.7.3 (default, Mar 18 2014, 05:13:23) #012[GCC 4.6.3]
Dec 31 07:32:03 weather weewx[4342]: engine: pid file is /var/run/weewx.pid
Dec 31 07:32:03 weather weewx[4344]: engine: Using configuration file /etc/weewx/weewx.conf
Dec 31 07:32:03 weather weewx[4344]: engine: Loading station type FineOffsetUSB (weewx.drivers.fousb)
Dec 31 07:32:03 weather weewx[4344]: fousb: driver version is 1.7
Dec 31 07:32:03 weather weewx[4344]: fousb: power cycling enabled for port 1 on hub 001:005
Dec 31 07:32:03 weather weewx[4344]: fousb: polling mode is ADAPTIVE
Dec 31 07:32:03 weather weewx[4344]: fousb: found station on USB bus=001 device=015
Dec 31 07:32:03 weather weewx[4344]: engine: StdConvert target unit is 0x1
Dec 31 07:32:03 weather weewx[4344]: engine: Archive will use data binding wx_binding
Dec 31 07:32:03 weather weewx[4344]: engine: Record generation will be attempted in 'hardware'
Dec 31 07:32:04 weather weewx[4344]: fousb: unstable read: blocks differ for ptr 0x000000
Dec 31 07:32:04 weather weewx[4344]: fousb: unstable read: blocks differ for ptr 0x000020
Dec 31 07:32:04 weather weewx[4344]: fousb: unstable read: blocks differ for ptr 0x000040
Dec 31 07:32:04 weather weewx[4344]: fousb: unstable read: blocks differ for ptr 0x000060
Dec 31 07:32:05 weather weewx[4344]: fousb: unstable read: blocks differ for ptr 0x000080
Dec 31 07:32:05 weather weewx[4344]: fousb: unstable read: blocks differ for ptr 0x0000a0
Dec 31 07:32:05 weather weewx[4344]: fousb: unstable read: blocks differ for ptr 0x0000c0
Dec 31 07:32:05 weather weewx[4344]: fousb: unstable read: blocks differ for ptr 0x0000e0
Dec 31 07:32:05 weather weewx[4344]: fousb: unrecognised magic number 1000
Dec 31 07:32:05 weather weewx[4344]: engine: Caught unrecoverable exception in engine:
Dec 31 07:32:05 weather weewx[4344]: **** unsupported operand type(s) for *: 'NoneType' and 'int'
Dec 31 07:32:05 weather weewx[4344]: **** Traceback (most recent call last):
Dec 31 07:32:05 weather weewx[4344]: **** File "/usr/share/weewx/weewx/engine.py", line 834, in main
Dec 31 07:32:05 weather weewx[4344]: **** engine = EngineClass(config_dict)
Dec 31 07:32:05 weather weewx[4344]: **** File "/usr/share/weewx/weewx/engine.py", line 74, in __init__
Dec 31 07:32:05 weather weewx[4344]: **** self.loadServices(config_dict)
Dec 31 07:32:05 weather weewx[4344]: **** File "/usr/share/weewx/weewx/engine.py", line 140, in loadServices
Dec 31 07:32:05 weather weewx[4344]: **** self.service_obj.append(weeutil.weeutil._get_object(svc)(self, config_dict))
Dec 31 07:32:05 weather weewx[4344]: **** File "/usr/share/weewx/weewx/engine.py", line 483, in __init__
Dec 31 07:32:05 weather weewx[4344]: **** if software_interval != self.engine.console.archive_interval:
Dec 31 07:32:05 weather weewx[4344]: **** File "/usr/share/weewx/weewx/drivers/fousb.py", line 1003, in archive_interval
Dec 31 07:32:05 weather weewx[4344]: **** return self._archive_interval_minutes() * 60
Dec 31 07:32:05 weather weewx[4344]: **** TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
Dec 31 07:32:05 weather weewx[4344]: **** Exiting.
Hope this helps... Thanks in advance for any suggestions..