Is anyone out there successfully sending weather data to weather underground with the WiFi101 library? I've been trying unsuccessfully to send a GET request with that library and using the Adafruit ATWINC1500 breakout. The only good information I've been able to find on Weather underground GET requests has been in this thread: Proper GET upload protocol to Weather Underground? - Home Automation - Arduino Forum
I've tried every combination and permutation of every suggestion in the thread and the best I've been able to do (using the WiFiWebClient example sketch) is to get a "Bad Request" return:
HTTP/1.1 400 Bad Request
Server: nginx
Date: Wed, 17 Apr 2019 04:33:36 GMT
Content-Type: text/html
Content-Length: 166
Connection: close
The relevant code is here (with my weatherstation ID and password removed):
if (client.connect("http://weatherstation.wunderground.com", 80)) {
Serial.println("connected to server");
// Make a HTTP request:
client.print("GET /weatherstation/updateweatherstation.php?ID=XXXXX&PASSWORD=XXXXX&dateutc=now&tempf=48&action=updateraw/ HTTP/1.1/r/n");
client.print("Host: http://weatherstation.wunderground.com:80/r/n");
client.print("Connection: close/r/n");
client.println();
}
Based on the discussion in the earlier thread, and given that Weather Underground recently changed something with their servers, I'm thinking that their get format may have changed. I did put the link into firefox and it processes the GET request just fine somehow and I get "success" returned.
Thank-you