Using the new API

  • 1
  • Question
  • Updated 3 weeks ago
  • (Edited)
Some years ago I had my personal weather station regularly submitting data to WU. Recently this has not been working for various local reasons. I have just tried to reactivate the system, and it seems the old API has been discontinued. What is the easiest way of modifying my code to submit data to the new system? Where is it described how to submit readings (initially just temperature) to WU? The information that I have seen seems mostly to be for reading data from the system, not submitting it. It looks as if I have to create JSON data. Is this the case? Which data fields of the JSON data are optional? How is this data submitted (get or post)? To which URL? Do I use the same API key as before, or do I need a new one?

Is there a working example of code that will submit weather readings to WU using the new API? Where can I find this?

Thanks - Rowan
Photo of Rowan Sylvester-Bradley

Rowan Sylvester-Bradley

  • 6 Posts
  • 0 Reply Likes

Posted 4 weeks ago

  • 1
Photo of Emery Wooten

Emery Wooten

  • 22 Posts
  • 14 Reply Likes
The API sends, it does not receive.  To put your station online: https://www.wunderground.com/weatherstation/overview.asp
Photo of Rowan Sylvester-Bradley

Rowan Sylvester-Bradley

  • 6 Posts
  • 0 Reply Likes
Thanks for your reply. This link only contains information about how to use commercial weather stations. My PWS is my own design, therefore I need to understand how to submit weather readings in technical detail. This was very easy with the old Wunderground site, just a simple GET request to a URL with the station ID, password and weather data in parameters. How do I do the same thing with the new system? Or are you not interested in receiving my data?

Thanks - Rowan
Photo of joegr

joegr

  • 21 Posts
  • 9 Reply Likes
Nothing has changed on the sending side.  I am still using the same code that I wrote years ago to send my weather station data to WU.  No changes, not even the URL.
Photo of Emery Wooten

Emery Wooten

  • 22 Posts
  • 14 Reply Likes
I am not interested because I am just a user like you but as far as I know the protocol has not changed.  I have been uploading data with the same version of Weather Display software for years and WU is still accepting it.  I found this page that might help you out: https://feedback.weather.com/customer/en/portal/articles/2924682-pws-upload-protocol?b_id=17298

Photo of Rowan Sylvester-Bradley

Rowan Sylvester-Bradley

  • 6 Posts
  • 0 Reply Likes
Thanks for your replies. So the same URL that has worked in the past should work now? In which case, what is wrong with this:
https://rtupdate.wunderground.com/weatherstation/updateweatherstation.php?ID=INEWMA3&PASSWORD=s1...

Should I be using that same station ID and key as before, or do I need to get a new one?

Thanks - Rowan
Photo of Emery Wooten

Emery Wooten

  • 22 Posts
  • 14 Reply Likes