All, Can you give this version of the driver a try? Rather than restart from the top, it tries a wakeup, then a retry. If that doesn't work after 3 attempts, then it does a restart.
https://raw.githubusercontent.com/weewx/weewx/Issue_772/bin/weewx/drivers/vantage.py -tk On Mon, May 9, 2022 at 11:11 AM David Hathaway <hathaway.d...@gmail.com> wrote: > I wish mine would settle down. I do the stop/start jobs because mine > eventually exits the engine. > > Dave > > May 9 12:56:30 HP-Iron weewx[3016530] INFO weewx.restx: Wunderground-PWS: > Published record 2022-05-09 12:55:00 CDT (1652118900) > May 9 12:56:55 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: LOOP > try #1; error: Expected to read 99 chars; got 0 instead > May 9 12:56:59 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: LOOP > try #2; error: Expected to read 99 chars; got 10 instead > May 9 12:57:03 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: LOOP > try #3; error: Expected to read 99 chars; got 20 instead > May 9 12:57:07 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: LOOP > try #4; error: Expected to read 99 chars; got 20 instead > May 9 12:57:07 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: LOOP > max tries (4) exceeded. > May 9 12:57:07 HP-Iron weewx[3016530] INFO weewx.engine: Main loop > exiting. Shutting engine down. > May 9 12:57:07 HP-Iron weewx[3016530] CRITICAL __main__: Caught > WeeWxIOError: Max tries exceeded while getting LOOP data. > May 9 12:57:07 HP-Iron weewx[3016530] CRITICAL __main__: **** > Waiting 60 seconds then retrying... > May 9 12:58:07 HP-Iron weewx[3016530] INFO __main__: retrying... > May 9 12:58:07 HP-Iron weewx[3016530] INFO weewx.engine: Loading station > type Vantage (weewx.drivers.vantage) > May 9 12:58:07 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: > SerialException on read. > May 9 12:58:07 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: > **** read failed: device reports readiness to read but returned no data > (device disconnected or multiple access on port?) > May 9 12:58:07 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: > **** Is there a competing process running?? > May 9 12:58:08 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: No > <ACK> received from console > May 9 12:58:08 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: > _determine_hardware; retry #0: 'No <ACK> received from Vantage console' > May 9 12:58:08 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: No > <ACK> received from console > May 9 12:58:08 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: > _determine_hardware; retry #1: 'No <ACK> received from Vantage console' > May 9 12:58:08 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: No > <ACK> received from console > May 9 12:58:08 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: > _determine_hardware; retry #2: 'No <ACK> received from Vantage console' > May 9 12:58:08 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: No > <ACK> received from console > May 9 12:58:08 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: > _determine_hardware; retry #3: 'No <ACK> received from Vantage console' > May 9 12:58:08 HP-Iron weewx[3016530] ERROR weewx.drivers.vantage: Unable > to read hardware type; raise WeeWxIOError > May 9 12:58:08 HP-Iron weewx[3016530] ERROR weewx.engine: Import of > driver failed: Unable to read hardware type (<class 'weewx.WeeWxIOError'>) > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL weewx.engine: **** > Traceback (most recent call last): > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL weewx.engine: **** > File "/usr/share/weewx/weewx/engine.py", line 119, in setupStation > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL weewx.engine: **** > self.console = loader_function(config_dict, self) > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL weewx.engine: **** > File "/usr/share/weewx/weewx/drivers/vantage.py", line 40, in loader > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL weewx.engine: **** > return VantageService(engine, config_dict) > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL weewx.engine: **** > File "/usr/share/weewx/weewx/drivers/vantage.py", line 1916, in __init__ > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL weewx.engine: **** > Vantage.__init__(self, **config_dict[DRIVER_NAME]) > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL weewx.engine: **** > File "/usr/share/weewx/weewx/drivers/vantage.py", line 517, in __init__ > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL weewx.engine: **** > self._setup() > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL weewx.engine: **** > File "/usr/share/weewx/weewx/drivers/vantage.py", line 1339, in _setup > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL weewx.engine: **** > self.hardware_type = self._determine_hardware() > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL weewx.engine: **** > File "/usr/share/weewx/weewx/drivers/vantage.py", line 1330, in > _determine_hardware > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL weewx.engine: **** > raise weewx.WeeWxIOError("Unable to read hardware type") > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL weewx.engine: **** > weewx.WeeWxIOError: Unable to read hardware type > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL __main__: Unable to load > driver: Unable to read hardware type > May 9 12:58:08 HP-Iron weewx[3016530] CRITICAL __main__: **** > Exiting... > > On Monday, May 9, 2022 at 9:08:28 AM UTC-5 WindnFog wrote: > >> Here's my 2-cents worth. I have been fighting this error for 1-2 years >> with a Vantage VUE and a roughly 6-year-old USB logger. It's always on >> startup (or after a reboot.) It happens a few times and then stops. So >> here are the things I've done to "fix" it. >> >> (1) Cleared the logger and reset the console (batteries out, etc.) >> >> (2) Replaced the Raspberry Pi hardware entirely (went from a 4GB to an >> 8GB Pi 4) >> >> (3) Tried using a powered USB hub in case everything is drawing too much >> current. It didn't help, so I removed it. >> >> (3) Changed USB cables and then added ferrite chokes to the most recent >> one. >> >> (4) Rebuilt the operating system from scratch, going from 32-bit >> Raspberry O/S to the Arm64 port of Debian GNU/Linux 11. >> >> (5) Re-installed weewx from scratch, including all the extensions I use. >> >> (5) Faithfully upgraded to every release of weewx (currently v4.8.0) >> >> (6) Replaced the data logger with a new one. >> >> I still get 3 to 5 of those "expected 99, got 0" errors one each boot, >> and then it settles down and hums along without any more until the next >> reboot. >> >> My conclusion is that this is an annoying bug/defect in the Davis >> hardware or firmware that I am unwilling to chase any further. The system >> works fine, and if I don't look at the logs for the first 5-10 minutes >> after a restart, it doesn't bother me. If someone finds a permanent fix, >> I'll apply it, but I've decided to live with it for now. >> >> Paul VE1DX >> >> https://ve1dx.net/ >> >> On Sunday, May 8, 2022 at 4:20:45 PM UTC-3 dave.m...@gmail.com wrote: >> >>> Just noticed a couple of errors thrown up by WeeWX: >>> >>> ERROR weewx.drivers.vantage: LOOP try #1; error: Expected to read 99 >>> chars; got 0 instead. >>> >>> Having then read through this forum I then reset the data logger in the >>> Vantage console (removed all power, pulled the data logger out for 20 >>> seconds, replaced and then powered back up) and all appears to be back up >>> and running OK. >>> >>> My first data logger lasted about 5 years before giving up on me, this >>> one is about 3 years old, is this a sign that it's on its way out as well? >>> >>> They're not cheap! >>> >>> >>> Thanks >>> >>> >>> Dave >>> >>> >>> -- > You received this message because you are subscribed to the Google Groups > "weewx-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to weewx-user+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/weewx-user/ee068372-0940-41fb-bf94-1bacc9505b4en%40googlegroups.com > <https://groups.google.com/d/msgid/weewx-user/ee068372-0940-41fb-bf94-1bacc9505b4en%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEAGw0_vty30quW9X4P8r6Kkp2WBRLhex3ji314FqX0N4A%40mail.gmail.com.