Hello,
Like many others my arduino station stopped working on Jan 30th. Finally I got it working (IQUBECVI10).
I suspect that many users did like me : gathering information on the web for uploading their weather station data to Wunderground. The usual steps to connect to server, send GET parameters and disconnect were :
char SERVER [] = "weatherstation.wunderground.com" ; // server identification
char WEBPAGE [] = "GET /weatherstation/updateweatherstation.php?" ; // webpage
1- if (!client.connect(SERVER, 80)) // Connect to server
2- client.print(WEBPAGE); // Send data with GET and successive parameters
client.print(F("ID=XXXX"));
client.print(F("&PASSWORD=XXXX"));
client.print(F("&dateutc=now"));
client.print(F("&winddir="));
// and so on ....
client.print(F("&action=updateraw"));
client.println();
3- while (client.connected() && (millis() - lastRead < IDLE_TIMEOUT_MS)) // read server response
// other code to read server response
4- client.stop // stop client
Since Wunderground's server change at the end of Jan 2017, this is not working anymore.
Wrong / incomplete GET structure is the culprit.
Here are the steps with fixed lines (see the 3 commented lines) :
char SERVER [] = "weatherstation.wunderground.com" ;
char WEBPAGE [] = "GET /weatherstation/updateweatherstation.php?" ;
1- if (!client.connect(SERVER, 80))
2- client.print(WEBPAGE);
client.print(F("ID=XXXX"));
client.print(F("&PASSWORD=XXXX"));
client.print(F("&dateutc=now"));
client.print(F("&winddir="));
// and so on ....
client.println(F("&action=updateraw HTTP/1.1")); // print changed to println and HTTP/1.1 added at the end
client.println(F("Host:
http://weatherstation.wunderground.com")); // new line added
client.println("Connection: close"); // new line added
client.println();
3- while (client.connected() && (millis() - lastRead < IDLE_TIMEOUT_MS))
.......
4- client.stop
I hope this could help ! For me this solved the problem.
J Guy