Cannot update PWS, HTTP1.1 408 Request_timeout

  • 2
  • Problem
  • Updated 1 year ago
Hi, I have my PWS updating since last year. It is not longer posting because I get a 408 Request timeout answer.

I create a TCP connection with rtupdate.wunderground.com on port 80 and then do a Get

GET /weatherstation/updateweatherstation.php?ID=ITRIESTE153&PASSWORD=xxxxxxxx&dateutc=now&humidity=34.45&tempf=72.65&baromin=30.24&softwaretype=arduino&action=updateraw&realtime=1&rtfreq=60

The answer from the server is
Received:[HTTP/1.1 408 REQUEST_TIMEOUT
Content-Length:0
Connection: Close

]

But if I copy and paste the code on the browser I get a SUCCESS
rtupdate.wunderground.com/weatherstation/updateweatherstation.php?ID=ITRIESTE153&PASSWORD=xxxxxxxx&dateutc=now&humidity=34.45&tempf=72.65&baromin=30.24&softwaretype=arduino&action=updateraw&realtime=1&rtfreq=60

Any idea why it was working and now I get the timeout error?

Best,
rodrigo
Photo of Rodri

Rodri

  • 6 Posts
  • 3 Reply Likes

Posted 2 years ago

  • 2
Photo of arduino1231

arduino1231

  • 11 Posts
  • 1 Reply Like
Same problem here!
Photo of arduino1231

arduino1231

  • 11 Posts
  • 1 Reply Like
I also use an arduino. Could you post your code here?
Photo of Rodri

Rodri

  • 6 Posts
  • 3 Reply Likes
Hi Gabriel, I use a similar code to this one
https://github.com/danfein/WiFi-Weather/blob/master/WiFi_Wx_Station.ino
Best,
Rodri
Photo of kokohd

kokohd

  • 4 Posts
  • 1 Reply Like
I use Arduino with eth. shild and have the same problem .
Something has changed in wunderground.com after 30/01/2017???
Please help!
Photo of Rodri

Rodri

  • 6 Posts
  • 3 Reply Likes
Yes something happened after that day, we are waiting for an answer from Weather Underground
Photo of Camilo Osti

Camilo Osti

  • 2 Posts
  • 1 Reply Like
exact. same problem. Since 30/1/2017 I stopped publishing my arduino.I get tired of revising code but nothing works.
Photo of CCordero

CCordero

  • 3 Posts
  • 1 Reply Like
Hi. I do have a very complex WS setup based on Intel Galileo and adafruit weathershield. My PWS has been publishing for 2 years with no major issues. Since 30/1/17 log shows 404 BAD Request when posting wheather data to Wunderground. Review of my code did no spoot any problem.

Wunderground support team, any advice? Txs
Carlos
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
If your code is not doing a fresh DNS lookup on the domain, it might be stopping it from working.  And that would explain why the URL is working in the browser.  The change that happened at the end of January moved the DNS record and IP, but the hostname still resolves.  
Photo of Rodri

Rodri

  • 6 Posts
  • 3 Reply Likes
Hi Brendan, thanks for your answer!

I also tried using IP 35.160.24.227 but it doesn't work.

Again it works in the browser with success answer.
http://35.160.24.227/weatherstation/updateweatherstation.php?ID=ITRIESTE153&PASSWORD=XXXXXX&am...

Any other idea why it is not working?
Best,
Rodri
Photo of arduino1231

arduino1231

  • 11 Posts
  • 1 Reply Like
My code does a fresh DNS lookup and it doesnt work!!!
Photo of CCordero

CCordero

  • 3 Posts
  • 1 Reply Like
Hi.

I did found the issue.

Previous code was:
client.println(strWUencodedurl);
client.println("HTTP 1.1");
client.println("Host: rtupdate.wunderground.com");
client.println("Connection: close");
client.println();

New code is:
client.print(strWUencodedurl); // note print instead of println
client.println(" HTTP 1.1"); // note the space before HTTP
client.println("Host: rtupdate.wunderground.com");
client.println("Connection: close");
client.println();

Previous code has been working for 2 years :-(.

Hope this will help someone. Regards,
Carlos
Photo of Rodri

Rodri

  • 6 Posts
  • 3 Reply Likes
So if your code works with these changes it means that WU changes the way they interpret the incoming packet...
BTW, what is strWUencodedurl?
(Edited)
Photo of Mr.Anderson

Mr.Anderson

  • 1 Post
  • 0 Reply Likes
Thank You!!! This is my first Photon project with the Sparkfun WeatherShield and I have been unable from the beginning to get it to work

adding in
client.println(" HTTP 1.1"); // note the space before HTTP
client.println("Host: rtupdate.wunderground.com");
client.println("Connection: close");
client.println();
made it work.
2am and it is finally working after about 2 days of changing stuff around.

I did not use the line "client.print(strWUencodedurl); // note print instead of println"

Why it works I do not know, I am just glad it works now. Do you have the full code that includes the RAIN and WIND meter for the Photon too. I have found multiple example and they all are a little different
Photo of kokohd

kokohd

  • 4 Posts
  • 1 Reply Like
Does anyone have any success with arduno? Share Code please.
Photo of Rodri

Rodri

  • 6 Posts
  • 3 Reply Likes
No success yet here!
(Edited)
Photo of CCordero

CCordero

  • 3 Posts
  • 1 Reply Like
Hi.
All my PWS code is Arduino (running on Intel galileo).
strWUencodedurl is the string the code build to send the GET HTTP request to WUG. It is a web encoded content as described on the WUG API documentation.
One more thing I did forgot to mention: my previous code used the PWS ID of my weatherstation AND the password of my own WUG account.
The new code NOW use the same PWS ID but instead of my password, I use the PWS key as documented on WUG API wiki site.
I am not sure if this is a new requirement or this was already documented; the fact is if you do not use the PWS key in your request, you get an "INVALID USERNAME/PASSWORD" from WUG server.
My code does not use ip address but rtupdate.wunderground.com.
Hope this help. Rgds,
Carlos
Photo of arduino1231

arduino1231

  • 11 Posts
  • 1 Reply Like
I have used the station password before but it also stopped working..
Photo of kokohd

kokohd

  • 4 Posts
  • 1 Reply Like
Not good ! Probably WUG not want  Arduino stations ?!?!
Photo of arduino1231

arduino1231

  • 11 Posts
  • 1 Reply Like
Still no solution?
Photo of arduino1231

arduino1231

  • 11 Posts
  • 1 Reply Like
@Wundeground why you don't help us???
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
I've shared this with the team that deals with PWS upload.  This thread is more for API development.
Photo of Frederic Denjean

Frederic Denjean

  • 1 Post
  • 1 Reply Like
Hi all,
At least I can find some one with the same problem as mine.
I am also wondering:
-@Wundeground why you don't help us???
-Probably WUG not want  Arduino stations

Waiting for more info on this bug from WUG.

Regards
Fred
Photo of arduino1231

arduino1231

  • 11 Posts
  • 1 Reply Like
Still no success????
Photo of kokohd

kokohd

  • 4 Posts
  • 1 Reply Like
No success ! :-(
Photo of Andreas Poppe

Andreas Poppe

  • 1 Post
  • 0 Reply Likes
After updating the IP my station were online for some weeks but since some day the problem is back...
error message: Last updated: 7.3.2017, 18:45:35,

Would'n you think it would be nice to inform user before you change?
Photo of arduino1231

arduino1231

  • 11 Posts
  • 1 Reply Like
Yea, I'm really really angry!! Why you dont inform the users when you change something? @wunderground
Photo of Brendan Hayes

Brendan Hayes, Official Rep

  • 962 Posts
  • 123 Reply Likes
From our director of development and the creator of the Personal Weather Station network:

Hi Folks, 

Sorry about the IP for rtupdate.wunderground.com changing, and the behavior of the server process changing. 

We are now in AWS and their HTTP load balancing has strict behavior with requests (that is, it is less permissive). 

Anyone still having issues, please let me know. Including the exact exchange you make with rtupdate.wunderground.com will help us debug, or at least tell you why the request fails.

Please email me at:
john.celenza at weather dot com

Thanks, and sorry! I write software all day, and I know how it feels when something that has worked FOREVER suddenly breaks,
John
Photo of Martin Lesage

Martin Lesage

  • 1 Post
  • 0 Reply Likes
Is someone have something with Arduino Board working with Weather Underground. My PWS can only upload data once when I plug it and after that no data is update :(