HTTP Time example


#1

Hi! I’m trying to run the HTTP Time example with Particle Photon, but the console prints this error (I tried twice and got the very same errors):

Trying to connect…
HTTPConnectionError @[0053:0089:0053:0074:0055:003F:0052:0011]
Trying to connect…
HTTPConnectionError @[0053:0089:0053:0074:0055:003F:0052:0011]
Trying to connect…
HTTPConnectionError @[0053:0089:0053:0074:0055:003F:0052:0011]
ooops, something very wrong! :frowning: NameError @[0000:0103:0000:0000:0000:0000:0000:0000]

Is this a problem of my wifi or in the connection with the api website?
I’m using Zerynth Studio version 2.0.6. I used the same wifi for ADM example and there it worked.

#2

clicking on the @xxx link the IDE will show you where the error is rised in your code. I guess the wifi authentication phase fails.
  


#3
Indeed, the wifi autentication fails, because after it prints "Establishing Link..." the code for this error appears:
IOError  at line 42 of __main__ [the one containing the "wifi.link(...)" command, which I filled with correct wifi data]
raised at line 95 of wireless.wifi.link

I don't know how to solve this, I will probably check the behaviour with a different wifi...

#4

Hi KikiCS,

Zerynth r2.0.9 is out (link)
You can try to update your system, create a new virtual machine (r2.0.9) for your particle photon and uplink again.

Let me know if this can fix your problem :slight_smile:


#5

I was finally able to check the time. Wifi connection was no big deal, the problem was timeapi suggested in the example: it seems it’s not working (in fact I couldn’t find the website). I used another time api from a website called timezonedb.com and was able to download a long string that included time and date.