Ok now I got an output in the log, that is actually usefull.
Sep 11 16:31:05 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
url: https://api.netatmo.com/api/getstationsdata data:
access_token=5b4f50a7ac34a571728b5a93%7C72e86abdc6201e4d8722f$
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
resp_obj: {u'body': {u'user': {u'mail': u'[email protected]',
u'administrative': {u'lang': u'en-GB', u'reg_locale': $
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
cloud units: {'windunit': 2, 'unit': 0, 'pressureunit': 0}
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
Caught unrecoverable exception in netatmo-client:
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
**** 'time_utc'
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
cloud units: {'windunit': 2, 'unit': 0, 'pressureunit': 0}
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
Caught unrecoverable exception in netatmo-client:
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
**** 'time_utc'
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
cloud units: {'windunit': 2, 'unit': 0, 'pressureunit': 0}
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
Caught unrecoverable exception in netatmo-client:
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
**** 'time_utc'
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
cloud units: {'windunit': 2, 'unit': 0, 'pressureunit': 0}
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
Caught unrecoverable exception in netatmo-client:
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
**** 'time_utc'
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
cloud units: {'windunit': 2, 'unit': 0, 'pressureunit': 0}
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
Caught unrecoverable exception in netatmo-client:
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
**** 'time_utc'
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
failed to get data after 5 attempts
Sep 11 16:31:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
next update in 300 seconds
Sep 11 16:36:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
cloud units: {'windunit': 2, 'unit': 0, 'pressureunit': 0}
Sep 11 16:36:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
Caught unrecoverable exception in netatmo-client:
Sep 11 16:36:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
**** 'time_utc'
Sep 11 16:36:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
cloud units: {'windunit': 2, 'unit': 0, 'pressureunit': 0}
Sep 11 16:36:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
Caught unrecoverable exception in netatmo-client:
Sep 11 16:36:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
**** 'time_utc'
Sep 11 16:36:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
cloud units: {'windunit': 2, 'unit': 0, 'pressureunit': 0}
Sep 11 16:36:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
Caught unrecoverable exception in netatmo-client:
Sep 11 16:36:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
**** 'time_utc'
Sep 11 16:36:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
cloud units: {'windunit': 2, 'unit': 0, 'pressureunit': 0}
Sep 11 16:36:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
Caught unrecoverable exception in netatmo-client:
Sep 11 16:36:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
**** 'time_utc'
Sep 11 16:36:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
cloud units: {'windunit': 2, 'unit': 0, 'pressureunit': 0}
Sep 11 16:36:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
Caught unrecoverable exception in netatmo-client:
Sep 11 16:36:06 bnj-desktop-haven weewx[7275]: netatmo: netatmo-client:
**** 'time_utc'
So the problem has to do with "time_utc". But I don't really know what to
do about it. It's either the driver for netatmo or The API at netatmo
servers.
Bent
tirsdag den 11. september 2018 kl. 14.24.41 UTC+2 skrev Bent Jensen:
>
> 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.