Also, I bought a new USB data logger as I thought that could be the issue.  
It was not.

Dave

On Monday, May 9, 2022 at 8:32:18 AM UTC-5 David Hathaway wrote:

> If you need another system to test on, mine reliably has this issue.  I 
> talked about it in Unable to wake up Vantage console 
> <https://groups.google.com/g/weewx-user/c/tzEYLxJBVy8/m/691INrMDAAAJ> a 
> couple months ago.  This is so persistent that I have jobs that starts 
> WeeWX every five minutes and then turn it off a minute later.  Any longer 
> and WeeWX will abend. (Another job starts wee_reports to generate graphs, 
> etc)
>
> The log looks like this,
>
> May  9 08:20:00 HP-Iron weewx[2476847]:  * Starting weewx weather system 
> weewx
> May  9 08:20:00 HP-Iron weewx[2476858] INFO __main__: Initializing weewx 
> version 4.8.0
> May  9 08:20:00 HP-Iron weewx[2476858] INFO __main__: Using Python 3.8.10 
> (default, Mar 15 2022, 12:22:08) #012[GCC 9.4.0]
> May  9 08:20:00 HP-Iron weewx[2476858] INFO __main__: Platform 
> Linux-5.13.0-37-generic-x86_64-with-glibc2.29
> May  9 08:20:00 HP-Iron weewx[2476858] INFO __main__: Locale is 
> 'en_US.UTF-8'
> May  9 08:20:00 HP-Iron weewx[2476858] INFO __main__: Using configuration 
> file /etc/weewx/weewx.conf
> May  9 08:20:00 HP-Iron weewx[2476858] INFO __main__: Debug is 0
> May  9 08:20:00 HP-Iron weewx[2476858] INFO __main__: PID file is 
> /var/run/weewx.pid
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.engine: Loading station 
> type Vantage (weewx.drivers.vantage)
> May  9 08:20:00 HP-Iron weewx[2476847]:    ...done.
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.engine: StdConvert 
> target unit is 0x1
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.wxservices: 
> StdWXCalculate will use data binding wx_binding
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.engine: Archive will use 
> data binding wx_binding
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.engine: Record 
> generation will be attempted in 'hardware'
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.engine: Using archive 
> interval of 300 seconds (specified by hardware)
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.restx: StationRegistry: 
> Station will be registered.
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.restx: Wunderground-PWS: 
> Data for station KTXSUGAR19 will be posted
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.restx: PWSweather: 
> Posting not enabled.
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.restx: CWOP: Posting not 
> enabled.
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.restx: WOW: Posting not 
> enabled.
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.restx: AWEKAS: Posting 
> not enabled.
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.engine: 'pyephem' not 
> detected, extended almanac data is not available
> May  9 08:20:00 HP-Iron weewx[2476872] INFO __main__: Starting up weewx 
> version 4.8.0
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.engine: Clock error is 
> -0.49 seconds (positive is fast)
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.engine: Using binding 
> 'wx_binding' to database 'weewx'
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.manager: Starting 
> backfill of daily summaries
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.manager: Daily summaries 
> up to date
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.wxxtypes: Type beaufort 
> has been deprecated. Use unit beaufort instead.
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.manager: Added record 
> 2022-05-09 08:20:00 CDT (1652102400) to database 'weewx'
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.manager: Added record 
> 2022-05-09 08:20:00 CDT (1652102400) to daily summary in 'weewx'
> May  9 08:20:00 HP-Iron weewx[2476872] INFO weewx.engine: Starting main 
> packet loop.
> May  9 08:20:01 HP-Iron weewx[2476872] INFO weewx.restx: Wunderground-PWS: 
> Published record 2022-05-09 08:20:00 CDT (1652102400)
> May  9 08:20:01 HP-Iron weewx[2476872] INFO weewx.restx: StationRegistry: 
> Published record 2022-05-09 08:20:00 CDT (1652102400)
> May  9 08:20:05 HP-Iron weewx[2476872] ERROR weewx.drivers.vantage: LOOP 
> try #1; error: Expected to read 99 chars; got 0 instead
> May  9 08:20:09 HP-Iron weewx[2476872] ERROR weewx.drivers.vantage: LOOP 
> try #2; error: Expected to read 99 chars; got 0 instead
> May  9 08:20:13 HP-Iron weewx[2476872] ERROR weewx.drivers.vantage: LOOP 
> try #3; error: Expected to read 99 chars; got 20 instead
> May  9 08:20:17 HP-Iron weewx[2476872] ERROR weewx.drivers.vantage: LOOP 
> try #4; error: Expected to read 99 chars; got 19 instead
> May  9 08:20:17 HP-Iron weewx[2476872] ERROR weewx.drivers.vantage: LOOP 
> max tries (4) exceeded.
> May  9 08:20:17 HP-Iron weewx[2476872] INFO weewx.engine: Main loop 
> exiting. Shutting engine down.
> May  9 08:20:17 HP-Iron weewx[2476872] CRITICAL __main__: Caught 
> WeeWxIOError: Max tries exceeded while getting LOOP data.
> May  9 08:20:17 HP-Iron weewx[2476872] CRITICAL __main__:     **** 
>  Waiting 60 seconds then retrying...
> May  9 08:21:00 HP-Iron weewx[2478821]:  * Stopping weewx weather system 
> weewx
> May  9 08:21:00 HP-Iron weewx[2476872] INFO __main__: Received signal TERM 
> (15).
>
>
> On Monday, May 9, 2022 at 6:16:27 AM UTC-5 dave.m...@gmail.com wrote:
>
>> Tom
>>
>> The system was stable overnight, no errors at all.
>>
>> Upgraded to WeeWX v4.8 at lunchtime and it's been stable for the past two 
>> hours - finger's crossed that it was just a reset of the data logger 
>> required.
>>
>> Dave
>>
>> On Monday, 9 May 2022 at 03:44:35 UTC+1 tke...@gmail.com wrote:
>>
>>> Thanks for that, John.
>>>
>>> I think we're saying the same thing because a new LOOP request starts 
>>> with a wake-up. My intention was to catch the error lower down in the 
>>> stack, then restart the loop.
>>>
>>> It's good to hear that the strategy works!
>>>
>>> -tk
>>>
>>> On Sun, May 8, 2022 at 4:30 PM 'John Kline' via weewx-user <
>>> weewx...@googlegroups.com> wrote:
>>>
>>>> Hi Tom,
>>>> 
>>>> You don’t need to restart or try a wake up.  You just need to return 
>>>> from genDavisLoopPackets so another request is made for packets.
>>>>
>>>> Below is what I have been running.  You can simplify it as the bad_read 
>>>> variable is not necessary since it has NEVER occurred that two bad reads 
>>>> happened in a row.  Returning from genDavisLoopPackets on this error 
>>>> always 
>>>> results in the next read working (of course, the loop command is reissued 
>>>> first since genDavisLoopPackets is called again).
>>>>
>>>> I have never sent this change because I’m running a copy of the vantage 
>>>> driver with many other changes.  If the excerpts below don’t make sense, 
>>>> you can see the whole driver at: 
>>>> https://github.com/chaunceygardiner/weewx-vantagenext
>>>>
>>>> Declare an exception:        
>>>> class ShortReadIOError(weewx.WeeWxIOError):
>>>>     """Exception raised when too few bytes read from serial port."""
>>>>
>>>> In read, raise the exception if too few bytes are read:
>>>>         N = len(_buffer)
>>>>         if N != chars:
>>>>             raise ShortReadIOError("Expected %d chars; got %d" % 
>>>> (chars, N))
>>>>
>>>> And, in genDavisLoopPackets, catch the ShortReadIOError and simply 
>>>> return:
>>>>                try:
>>>>                     loop_packet = self._get_packet()
>>>>                     log.debug('%s: Loop packet success!' % 
>>>> weeutil.weeutil.timestamp_to_string(loop_packet['dateTime']))
>>>>                 except ShortReadIOError as e:
>>>>                     log.info('get_packet: %s. (%d)' % (e, 
>>>> self.pkt_count))
>>>>                     # If already on a bad read, log that fact.
>>>>                     if self.on_bad_read:
>>>>                         log.info('genDavisLoopPackets: repeated bad 
>>>> read.')
>>>>                     self.on_bad_read = True
>>>>                     return
>>>>                 except weewx.WeeWxIOError as e:
>>>>                     log.error("LOOP try #%d; error: %s", count + 1, e)
>>>>                     time.sleep(self.port.wait_before_retry)
>>>>                 else:
>>>>                     self.on_bad_read = False
>>>>                     self.pkt_count += 1
>>>>                     yield loop_packet
>>>>                     break
>>>>
>>>> On May 8, 2022, at 2:02 PM, Tom Keffer <tke...@gmail.com> wrote:
>>>>
>>>> 
>>>> Now that I think about it, there is an experiment I've been meaning to 
>>>> try. Right now, the Vantage driver tries 3 times, then gives up and 
>>>> restarts the program from the top.
>>>>
>>>> The experiment would be to do something not quite so drastic. Rather 
>>>> than restart the program, try a Vantage "wake up" sequence instead.
>>>>
>>>> I've never tried this strategy because there hasn't been a logger 
>>>> regularly showing this error that I could test. But it appears yours does. 
>>>> I'm tied up with something else, but give me a few days to come up with a 
>>>> solution.
>>>>
>>>> In the meantime, I've posted issue #772 
>>>> <https://github.com/weewx/weewx/issues/772>.
>>>>
>>>> On Sun, May 8, 2022 at 1:03 PM Dave McCreath <dave.m...@gmail.com> 
>>>> wrote:
>>>>
>>>>> Spoke too soon.  The error appears to back back up, is this a data 
>>>>> logger issue?:
>>>>>
>>>>> May  8 20:55:18 raspberrypi weewx[8172] INFO weewx.restx: AWEKAS: 
>>>>> Published record 2022-05-08 20:55:00 BST (1652039700)
>>>>> May  8 20:55:18 raspberrypi weewx[8172] INFO weewx.restx: PWSWeather: 
>>>>> Published record 2022-05-08 20:55:00 BST (1652039700)
>>>>> May  8 20:55:18 raspberrypi weewx[8172] INFO weewx.restx: 
>>>>> Wunderground-PWS: Published record 2022-05-08 20:55:00 BST (1652039700)
>>>>> May  8 20:55:19 raspberrypi weewx[8172] INFO weewx.cheetahgenerator: 
>>>>> Generated 8 files for report SeasonsReport in 1.07 seconds
>>>>> May  8 20:55:21 raspberrypi weewx[8172] INFO weewx.imagegenerator: 
>>>>> Generated 30 images for report SeasonsReport in 2.44 seconds
>>>>> May  8 20:55:21 raspberrypi weewx[8172] INFO weewx.reportengine: 
>>>>> Copied 0 files to /var/www/html/weewx
>>>>> May  8 20:55:28 raspberrypi weewx[8172] ERROR weewx.drivers.vantage: 
>>>>> LOOP try #1; error: Expected to read 99 chars; got 0 instead
>>>>> May  8 20:55:32 raspberrypi weewx[8172] ERROR weewx.drivers.vantage: 
>>>>> LOOP try #2; error: Expected to read 99 chars; got 0 instead
>>>>> May  8 20:55:36 raspberrypi weewx[8172] ERROR weewx.drivers.vantage: 
>>>>> LOOP try #3; error: Expected to read 99 chars; got 0 instead
>>>>> May  8 20:55:40 raspberrypi weewx[8172] ERROR weewx.drivers.vantage: 
>>>>> LOOP try #4; error: Expected to read 99 chars; got 0 instead
>>>>> May  8 20:55:40 raspberrypi weewx[8172] ERROR weewx.drivers.vantage: 
>>>>> LOOP max tries (4) exceeded.
>>>>> May  8 20:55:40 raspberrypi weewx[8172] INFO weewx.engine: Main loop 
>>>>> exiting. Shutting engine down.
>>>>> May  8 20:55:40 raspberrypi weewx[8172] INFO weewx.engine: Shutting 
>>>>> down StdReport thread
>>>>> May  8 20:55:40 raspberrypi weewx[8172] CRITICAL __main__: Caught 
>>>>> WeeWxIOError: Max tries exceeded while getting LOOP data.
>>>>> May  8 20:55:40 raspberrypi weewx[8172] CRITICAL __main__:     **** 
>>>>>  Waiting 60 seconds then retrying...
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO __main__: retrying...
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO __main__: Using 
>>>>> configuration file /etc/weewx/weewx.conf
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO __main__: Debug is 0
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.engine: Loading 
>>>>> station type Vantage (weewx.drivers.vantage)
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.engine: StdConvert 
>>>>> target unit is 0x1
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.engine: Archive 
>>>>> will use data binding wx_binding
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.engine: Record 
>>>>> generation will be attempted in 'software'
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.engine: Using 
>>>>> archive interval of 300 seconds (software record generation)
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.restx: 
>>>>> StationRegistry: Station will not be registered: no station_url specified.
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.restx: 
>>>>> Wunderground-PWS: Data for station ICAMBSLE2 will be posted
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.restx: PWSWeather: 
>>>>> Data for station WISBECH will be posted
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.restx: CWOP: 
>>>>> Posting not enabled.
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.restx: WOW: Posting 
>>>>> not enabled.
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.restx: AWEKAS: Data 
>>>>> will be uploaded for user DMacWx
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO __main__: Starting up 
>>>>> weewx version 4.5.1
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.engine: Clock error 
>>>>> is 0.55 seconds (positive is fast)
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.engine: Using 
>>>>> binding 'wx_binding' to database 'weewx.sdb'
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.manager: Starting 
>>>>> backfill of daily summaries
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.manager: Daily 
>>>>> summaries up to date
>>>>> May  8 20:56:40 raspberrypi weewx[8172] INFO weewx.engine: Starting 
>>>>> main packet loop.
>>>>> May  8 21:00:16 raspberrypi weewx[8172] INFO weewx.manager: Added 
>>>>> record 2022-05-08 21:00:00 BST (1652040000) to database 'weewx.sdb'
>>>>> May  8 21:00:16 raspberrypi weewx[8172] INFO weewx.manager: Added 
>>>>> record 2022-05-08 21:00:00 BST (1652040000) to daily summary in 
>>>>> 'weewx.sdb'
>>>>> May  8 21:00:16 raspberrypi weewx[8172] INFO weewx.restx: AWEKAS: 
>>>>> Published record 2022-05-08 21:00:00 BST (1652040000)
>>>>> May  8 21:00:16 raspberrypi weewx[8172] INFO weewx.restx: PWSWeather: 
>>>>> Published record 2022-05-08 21:00:00 BST (1652040000)
>>>>> May  8 21:00:16 raspberrypi weewx[8172] INFO weewx.restx: 
>>>>> Wunderground-PWS: Published record 2022-05-08 21:00:00 BST (1652040000)
>>>>> May  8 21:00:17 raspberrypi weewx[8172] INFO weewx.cheetahgenerator: 
>>>>> Generated 8 files for report SeasonsReport in 1.02 seconds
>>>>> May  8 21:00:21 raspberrypi weewx[8172] INFO weewx.imagegenerator: 
>>>>> Generated 45 images for report SeasonsReport in 4.30 seconds
>>>>> May  8 21:00:21 raspberrypi weewx[8172] INFO weewx.reportengine: 
>>>>> Copied 5 files to /var/www/html/weewx
>>>>>
>>>>> Any suggestions welcome.
>>>>>
>>>>> Dave
>>>>>
>>>>> On Sunday, 8 May 2022 at 20:20:45 UTC+1 Dave McCreath 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+...@googlegroups.com.
>>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/weewx-user/9244ee2d-e630-4fd1-ae09-96e5815c52f8n%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/weewx-user/9244ee2d-e630-4fd1-ae09-96e5815c52f8n%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+...@googlegroups.com.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/weewx-user/CAPq0zEDik39%2BLEOGTnrcMAtW3CorRJqUiGe_96iVFszAm53gbA%40mail.gmail.com
>>>>  
>>>> <https://groups.google.com/d/msgid/weewx-user/CAPq0zEDik39%2BLEOGTnrcMAtW3CorRJqUiGe_96iVFszAm53gbA%40mail.gmail.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+...@googlegroups.com.
>>>>
>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/weewx-user/D2A80355-C607-40DC-803C-813ACB968BB4%40johnkline.com
>>>>  
>>>> <https://groups.google.com/d/msgid/weewx-user/D2A80355-C607-40DC-803C-813ACB968BB4%40johnkline.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/44ce5733-6ba6-4164-bea7-a0c174049dc8n%40googlegroups.com.

Reply via email to