Go Down

Topic: Proper GET upload protocol to Weather Underground? (Read 5823 times) previous topic - next topic

CrashEd

Has anyone managed to fix this issue?

I'm having similar issues to those that have posted above, but wondered if anyone had worked out a solution?

tyshkka

Yeap! Seems that WU changed smth again.
I cant update my PWS too

tyshkka

#17
Mar 21, 2018, 12:37 pm Last Edit: Mar 21, 2018, 01:27 pm by tyshkka
Has anyone managed to fix this issue?

I'm having similar issues to those that have posted above, but wondered if anyone had worked out a solution?
Crash, try to check all your variables what they content. My wind and temperature was incorrect: 832 and 8123.

I fix that and try another way to update, you can try it. Code below.

Code: [Select]

void wunderground() {
  if ((millis() - wMillis) > 10000) {
    if (ethClient.connect("rtupdate.wunderground.com", 80)) {
      p=p.toFloat()*0.0296;  //metric to US
      dew=(dew * 1.8 +32);
      n=(n.toFloat()*10);
      ethClient.print("GET /weatherstation/updateweatherstation.php?ID=_YOUR_PWS_&PASSWORD=_YOUR_PASSWORD_&dateutc=now&tempf=");
      ethClient.print(tf);
      ethClient.print("&winddir=");
      ethClient.print(va);
      ethClient.print("&windspeedmph=");
      ethClient.print(w);
      ethClient.print("&windgustmph=");
      ethClient.print(windgustmph);
      ethClient.print("&baromin=");
      ethClient.print(p);
      ethClient.print("&dewptf=");
      ethClient.print(dew);
      ethClient.print("&humidity=");
      ethClient.print(h);
      ethClient.print("&UV=");
      ethClient.print(x);
      ethClient.print("&solarradiation=");
      ethClient.print(n);
      ethClient.print("&windspdmph_avg2m=");
      ethClient.print(windavg);
      ethClient.print("&softwaretype=Arduino&action=updateraw&realtime=1&rtfreq=10");
      ethClient.print("/ HTTP/1.1\r\nHost: host:port\r\nConnection: close\r\n\r\n");
      ethClient.print("\r\n\r\n\r\n"); //just for to be sure =)
      ethClient.println();
      ethClient.println();
      ethClient.println();
      Serial.print("GET /weatherstation/updateweatherstation.php?ID=&PASSWORD=&dateutc=now&tempf=");
      Serial.print(tf); //starts here just check what you send
      Serial.print("&winddir=");
      Serial.print(va);
      Serial.print("&windspeedmph=");
      Serial.print(w);
      Serial.print("&windgustmph=");
      Serial.print(windgustmph);
      Serial.print("&baromin=");
      Serial.print(p);
      Serial.print("&dewptf=");
      Serial.print(dew);
      Serial.print("&humidity=");
      Serial.print(h);
      Serial.print("&UV=");
      Serial.print(x);
      Serial.print("&solarradiation=");
      Serial.print(n);
      Serial.print("&windspdmph_avg2m=");
      Serial.print(windavg);
      Serial.print("&softwaretype=Arduino&action=updateraw&realtime=1&rtfreq=10");
      Serial.print("/ HTTP/1.1\r\nHost: host:port\r\nConnection: close\r\n\r\n");
      Serial.print("\r\n\r\n\r\n");
      delay(200); //depends on your internet connection.
      ethClient.stop();
      Serial.println(F("transm ok")); //just to know that IF is ended. this is not checking
      wMillis = millis();
    }
 
  }
}

CrashEd

Crash, try to check all your variables what they content. My wind and temperature was incorrect: 832 and 8123.

I fix that and try another way to update, you can try it. Code below.
Hi tyshkka,

Thanks - that's fixed it! One of the variables was incorrect!

Cheers,
'Crash

Go Up