Migrating a Project from Weather Underground to Open Weather Maps

The brief but joyous rescue of a project whose original API disappeared behind a paywall.

Favorited Favorite 5

I am a really big fan of open and free tools; this shouldn't surprise regular readers of this blog. As I started on a recent project I dug up an old piece of code that used the Weather Underground API. Much to my consternation and dismay, my code didn't work. A little digging into the matter brought me to the sad fact that they had closed their API. The screenshot below will give you more detail with regard to this closure.

alt text

You get nothing!

I have several projects that have used the Weather Underground API in the past, and although you can still use the Weather Underground template - an excellent, citizen-built platform with many private weather stations reporting - access to downloads from the API is now behind a paywall.

I started digging around to see what else was available. I scrolled through a couple options on Google and settled on Open Weather Map.

alt text

The API documentation is reasonably good on this website and with a little digging I got a working example going in short order.

alt text

Oh, be joyful!

My test example uses an ESP8266, and populates temperature pressure and relative humidity into usable variables in the Arduino environment. My test code is linked via GitHub page in this Repository.

You’ll need to sign up to get a key from Open Weather Map.

alt text

There are a few other services also available, and here is an excellent Reddit discussion of some of the alternatives.

Let me know what you come up with and I would love to see folks using some of the other weather services available with whatever groovy hardware you choose!


Comments 14 comments

  • UniKyrn / about 6 years ago / 3

    Yep, when WU sold out to The Weather Channel, things just starting failing soon after. I'd been pushing data to them using Virtual Weather Station for a decade, then noticed I wasn't getting any data back from them. They told me the old export API was no longer available, so I stopped sending them my data. That got their attention and I started getting emails asking why my station wasn't sending to them.

    "I send you data, you send me data, this was the pact. You broke the pact."

    • Member #420025 / about 6 years ago / 1

      They sold out to The Weather COMPANY, NOT The Weather CHANNEL.

    • Member #134773 / about 6 years ago / 1

      It seems to me that a reasonable approach would be to allow folks who send WU data access WU for "free", but if you don't send them data, then you have to send them $ to access the data.

      I'm reminded of something that happened 17 or 18 years ago: Yahoo had a "singles" thing that had been free, but they changed it to pay. Before the change, I'd met several "quality" people (though not "the perfect match" -- several because of geographic issues). After the change, the "quality" of "candidates" went WAY down, and to top it off, when I tried to cancel my subscription, I ended up having to dispute on-going charges on my credit card to get them to stop. (Yahoo's behavior on the payment point soured me on any sort of "subscription" service on the 'net.)

    • Miskatonic / about 6 years ago / 1

      I suspected we might find people in a similar place with this post. The response from their service people has been pretty draconian.

  • Alexi Carey / about 6 years ago / 1

    Dark Sky API is pretty good!

  • Aristarco / about 6 years ago / 1

    I'm having problems with Yahoo Weather API because they now want OAuth authorization to retrieve the info and makes it unnecessarily complicated for my little Arduino UNO-based project. This seems to be a way better option. Should have used it since the beginning. Thanks for the tip!

  • MrAureliusR / about 6 years ago / 1

    I'm confused, I just fired up an app I wrote a couple years ago using the wunderground API and it works just fine -- what did they shut down?

    • Miskatonic / about 6 years ago * / 1

      Here is their statement. The comments are amazing.

    • I'm not sure either. I built a weather station about 2 1/2 years ago and have been uploading data to WU. About a year ago I made a smart irrigation controller that used my PWS data locally and requested XML forecast data for my zipcode from WG. I've been hearing something might be changing or going away but both are functioning properly.

      Perhaps older API's that predated our projects have been shut down. I am not a paying subscriber, my account is free because I upload data.

  • REDACTED-GDPR / about 6 years ago * / 1

    Thank you for the interesting article. It got me doing some web browsing to consider adding a personal weather station at my own place. This raspberry pi based station sounds pretty interesting: https://projects.raspberrypi.org/en/projects/build-your-own-weather-station

    (edited for link click-ability)

  • xsk8rat / about 6 years ago / 1

    I really like that your example code is more modular than the typical example Arduino code. It really makes it more understandable for me. YMMV Thank you!

    Sincerely,

    Mark

    • Miskatonic / about 6 years ago / 1

      Absolutely!!! I hope it's a good start to a project and you build something delightful.

Related Posts

Recent Posts

Tags


All Tags