On Friday, January 20, 2017 at 12:40:51 AM UTC-5, dr__bob wrote: > > So a try, except bracketing the sendto would help. With a configurable > delay? With a configurable number of retries? But I've really got to > figure out why my cable modem apparently periodically restarts. >
weewx is designed to handle these things. the driver should retry n times, where n is an optional parameter in the driver, e.g., max_tries=3. there should also be a retry_wait, which defines how long to wait, in seconds, between retries. if the driver has max_retry failures, then it raises a weewx.RetriesExceeded exception. at that point, the weewx engine does one of these things: 1) if weewx is just starting up, weewx will exit 2) if weewx is just starting up, but the loop_on_init parameter is true, then weewx will sleep for 60 seconds, then try the whole thing again. it will do this forever. 3) if weewx has been running when this happens, weewx will sleep for 60 seconds, then start over this way you can disconnect the network, then reconnect, and weewx will recover automagically. so all the driver has to do is retry, and there is no need to add extra layers of systemd or cron or other types of nannies that way you can focus on hardware features such as history! m