Hi Mathew,

Took out KeepAlive from plist and added loop_on_init=True to weewx.conf 
file and this solved the problem. One could imagine having weewx try 2-5 
times before giving up by default for just such a situation. Thank you for 
the clear help in getting to the bottom of the issue. Hope this helps 
somebody else.

-Geoff

On Monday, March 16, 2020 at 2:10:53 PM UTC-7, mwall wrote:
>
>
>
> On Monday, March 16, 2020 at 4:31:08 PM UTC-4, Geoff Harris wrote:
>>
>> My recollection is that abnormal code 4 is when it can't connect to the 
>> USB. I can replicate the error by stopping weewx, unplugging the USB and 
>> starting it back up. 
>>
>>>
>>>
> geoff,
>
> if this is just a startup issue, then you might want to try the 
> loop_on_init option.
>
> the normal startup behavior for weewx is to exit if it does not find the 
> resources that it needs to operate.  this is to make it easier to 
> debug/diagnose when you are invoking weewx directly.
>
> these resources might be the usb, a sane time (from ntpd or whatever), 
> networking, database server, etc.
>
> when running weewx as a daemon, there are often cases where these other 
> resources are not ready.  typically you would use the system's init 
> dependencies to ensure availability.  however, sometimes that is not 
> possible.
>
> when loop_on_init=true then weewx will loop continually instead of exiting.
>
> the log should tell you whether this will help - in your case, you should 
> see a driver warning/error when it cannot find the usb.
>
> if you see such a warning/failure repeatedly (not just at startup), then 
> there is probably something funky with your usb.  KeepAlive will restart 
> weewx for you, but it won't fix the problem.
>
> if you see such a warning only once (just at startup), then there is 
> probably nothing wrong with weewx or your usb, just timing.  loop_on_init 
> should solve that.
>
> we are pretty hard-nosed about the 'just reboot to fix it' and the 
> keepalive or nanny script approaches to keep weewx running.  we would much 
> rather fix the problems instead of applying layer after layer of band-aid.
>
> m
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/1fa5290b-af74-4ed8-84ff-1dc9d2b8e7c7%40googlegroups.com.

Reply via email to