Sorry Gary, I didn't see you answer. Thank you for your suggestion.

I am currently triyng your suggestion, but it might take a day or two until 
it shows. It almost allways happens at night (my night), but not at the 
same time.

But in the meantime I can tell that I have installed weewx on another 
server on another Network some 20 kilometers apart from the first one 
(since I'm just taking data from a server, I don't have to be near the 
weatherstation :-))
And interesting enough, both servers stop collecting data at the exact same 
time! which proves that weewx is not the faulty part.

So now it's just a matter of leaning back and wait to see if both my 
servers fail to get data, If not, your trick works. If they do it is 
somwhere in the driver or on the netatmo servers.

I'll get back whenever I have some news.

Bent

onsdag den 5. september 2018 kl. 12.04.00 UTC+2 skrev gjr80:

> Not a netatmo user but I suspect that the client thread in the netatmo 
> driver encounters an error and silently dies thus leaving WeeWX running but 
> with no data coming in so no activity happens. Suggest you make the 
> following changes to /usr/share/weewx/user/netatmo.py (circa line 310):
>
>     def collect_data(self):
>         """Loop forever, wake up periodically to see if it is time to 
> quit."""
>         last_poll = 0
>         while self._collect_data:
>             now = int(time.time())
>             if now - last_poll > self._poll_interval:
>                 for tries in range(self._max_tries):
>                     try:
>                         CloudClient.get_data(self._sd, self._device_id)
>                         break
>                     except (socket.error, socket.timeout, urllib2.
> HTTPError, urllib2.URLError), e:
>                         logerr("failed attempt %s of %s to get data: %s" %
>                                (tries + 1, self._max_tries, e))
>                         logdbg("waiting %s seconds before retry" %
>                                self._retry_wait)
>                         time.sleep(self._retry_wait)
>                     except Exception, e:
>                         logerr("Caught unrecoverable exception in 
> netatmo-client:")
>                         logerr("    ****  %s" % e)
>                 else:
>                     logerr("failed to get data after %d attempts" %
>                            self._max_tries)
>                 last_poll = now
>                 logdbg('next update in %s seconds' % self._poll_interval)
>             time.sleep(1)
>
>
> Restart WeeWX and monitor the log and post a log extract showing the error 
> when it occurs.
>
> Gary
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to