0

Getting Time
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Getting Time

by akbykraz on Wed Jul 21, 2021 3:04 pm

My Matrix Portal Weather project occasionally has a 'hang' when fetching Time from
the IOT server ... Currently I'm getting:

'Error ... connection to Adafruit IO ... The response was "404 Not Found ... openresty"
(with some imbedded html formatting code) ...

Noticed last night that this message occurred for about a half hour then started
working normally ... Right now (1140 AZT) it's asking IOT for Time for TZ America/Phoenix ...
It is indicating the Error connection (last Time update was @ 11:35 AZT) ... I'm monitoring
via the REPL to chase down an intermittent hang in the Weather project ...

I'm running the Matrix Portal @ ver 6.1 on a MP M4 SAMD51J19 ... My code is a modified
version of the original MP shipping code for weather display ...

Version CPY 6.1 is being used because any version newer causes code to crash with error
either in Portal Base (which I am waiting for an update to my GITHUB submission) or in the
Requests (which I also attempted to submit to GITHUB) ... Both submissions appear to be
shoved to the 'forgot' burner ...

I originally thought was that IOT server might be down for system maintenance (backup? because
it appears to happen early am's EDT) ...

Stopped code to retrieve CPY version & upon startup (1153 AZT) it appears IOT server now responding ...

Skip

akbykraz
 
Posts: 28
Joined: Sat Sep 12, 2020 4:00 pm

Re: Getting Time

by dastels on Wed Jul 21, 2021 4:00 pm

I assume it's just the network being a network... I.e. unreliable. Hanging isn't good though. It should be done in a way that fails as soon as it can, ideally raising an exception that your code can then handle in reasonable way.

Dave

dastels
 
Posts: 7252
Joined: Tue Oct 20, 2015 3:22 pm

Re: Getting Time

by brubell on Fri Jul 23, 2021 9:27 am

I originally thought was that IOT server might be down for system maintenance (backup? because
it appears to happen early am's EDT) ...


There were no reported outages of Adafruit IO during this time frame.

brubell
 
Posts: 1508
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.