# Wunderground upload problem using TCP

**URL:** <https://community.particle.io/t/wunderground-upload-problem-using-tcp/29437>\
**Category:** Troubleshooting\
**Created:** [February 21, 2017, 2:20am UTC](https://community.particle.io/t/wunderground-upload-problem-using-tcp/29437 "2017-02-21T02:20:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmwagner](https://avatars.discourse-cdn.com/v4/letter/b/71c47a/32.png) [@bmwagner](https://community.particle.io/u/bmwagner)\
**Post date:** [February 21, 2017, 2:20am UTC](https://community.particle.io/t/wunderground-upload-problem-using-tcp/29437/1 "2017-02-21T02:20:44Z")

</div>

I am trying to upload my information from my Particle to Wunderground. I have a weather station getting all the required information. This is my code relevant to this issue:

```
char SERVER [] = "rupdate.wunderground.com"; //Standard server - for sends once per minute or less
char WEBPAGE [] = "GET /weatherstation/updateweatherstation.php?";

//Station Identification
char ID [] = "KMNGRANA2"; //Your station ID here
char PASSWORD [] = "<my password here>"; //your Weather Underground password here

TCPClient client;
void weatherReport()
{ 
if (client.connect(SERVER, 80)) { //Output all variables needed by Wunderground
client.print(WEBPAGE);
client.print("ID=");
client.print(ID);
client.print("&PASSWORD=");
client.print(PASSWORD);
client.print("&dateutc=now"); //can use 'now' instead of time if sending in real time
client.print("&tempf=");
client.print(tempF);
client.print("&dewptf=");
client.print(dewpointF);
client.print("&humidity="); 
client.print(humidity);
client.print("&baromin=");
client.print(inchesMercury);
client.print("&winddir=");
client.print(winddir);
client.print("&windspeedmph=");
client.print(windspdmph);
client.print("&rainin=");
client.print(rainin);
client.print("&dailyrainin=");
client.print(dailyrainin);
client.print("&windgustmph=");
client.print(windgustmph);
client.print("&wwindgustdir=");
client.print(windgustdir);
client.print("&windspdmph_avg2m=");
client.print(windspdmph_avg2m);
client.print("&winddir_avg2m=");
client.print(winddir_avg2m);
client.print("&windgustmph_10m=");
client.print(windgustmph_10m);    
client.print("&windgustdir_10m=");
client.print(windgustdir_10m);
client.print("&action=updateraw"); //Standard update rate - for sending once a minute or less
client.print("&softwaretype=Particle-Photon&action=updateraw&realtime=1&rtfreq=5"); //Rapid Fire update rate - for sending multiple times per minute, specify frequency in seconds
client.println();
delay(5000);
}
else
{
Serial.println(("Connection failed"));
return;
}
}

```

The weather station had been broadcasting extremely well until recently. Now Wundergroud doesn’t register that it has been receiving any data at all.I have read that it might be an issue with the DNS but I don’t know what that means or how to fix it.  
The other thing I am interested in is using a Webhook instead of TCP and I would appropriate any help.  
Thanks in advance,  
Ben

---

<div class="post-metadata">

**Author:** ![electronweather](https://avatars.discourse-cdn.com/v4/letter/e/e95f7d/32.png) [@electronweather](https://community.particle.io/u/electronweather)\
**Post date:** [March 12, 2017, 5:40pm UTC](https://community.particle.io/t/wunderground-upload-problem-using-tcp/29437/2 "2017-03-12T17:40:59Z")

</div>

Hi, I have the same problem! Look here: [https://apicommunity.wunderground.com/weatherapi/topics/cannot-update-pws-http1-1-408-request-timeout](https://apicommunity.wunderground.com/weatherapi/topics/cannot-update-pws-http1-1-408-request-timeout)

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [March 12, 2017, 7:56pm UTC](https://community.particle.io/t/wunderground-upload-problem-using-tcp/29437/3 "2017-03-12T19:56:12Z")

</div>

> [@bmwagner](#):
>
> The other thing I am interested in is using a Webhook instead of TCP and I would appropriate any help

There is another member who got stuck with wunderground and webhooks, maybe this will help you too

> [@Webhook Problem with "&" and "="](https://community.particle.io/t/webhook-problem-with-and/30182/11):
>
> You had a literal for ID and that’s the reason why I wrote the above exactly the way I wrote it and not any other way wink The way you wrote it would just result in ...?ID=id&... If you want to have a variable you need to use a variable in that statement and not another string literal. char data[256]; char id[24] = "IWATTWIL26"; char pwd[] = "xxxxxxxx"; int humidity = 90; snprintf(data, sizeof(data) ,"{\"id\":\"%s\"" ",\"pwd\":\"%s\"" ",\"dt\":\"%s\"" ",\…

---

<div class="post-metadata">

**Author:** ![electronweather](https://avatars.discourse-cdn.com/v4/letter/e/e95f7d/32.png) [@electronweather](https://community.particle.io/u/electronweather)\
**Post date:** [March 13, 2017, 8:50pm UTC](https://community.particle.io/t/wunderground-upload-problem-using-tcp/29437/4 "2017-03-13T20:50:52Z")

</div>

![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/e/e338a04183f20e35a315b70f828d1c69ce5effa6.JPG)

It’s a post from: [https://apicommunity.wunderground.com/weatherapi/topics/cannot-update-pws-http1-1-408-request-timeout](https://apicommunity.wunderground.com/weatherapi/topics/cannot-update-pws-http1-1-408-request-timeout)
