Library: Weather by Yahoo

I didn’t find a simple weather library, so I wrote one myself.

WARNING: I don’t support this library any more, please use the other library basen on openweathermap.org

Library

It loads the basic weather data from the yahoo and is easy to use. It can easily be extended to use more weather data.

https://github.com/synox/yahoo-weather

If you find it useful, please discuss it, contribute, fork. :smile:
It would be great if we could provide a simple library for all the creative people here… :sunny:

Why Yahoo?

I chose yahoo api because it has a wide range of data but you can filter to load only those that you need! It supports JSON. From the following data I just selected high and low temp and description to reduce http response size.

example of available data: https://gist.github.com/synox/319ac3f2c9169146317a

5 Likes

Very nice! I’m thinking this would pair well with a frolic action function. Though it might be better to implement that server side. Hmmm…

@timb i don’t understand what you mean by “frolic action function”.

I think @timb was referring to this:

http://stream1.gifsoup.com/view2/1536584/frolic-o.gif

I have a Spark Core + Temp / Humidity Sensor setup to display that data on a OLED Display and it pushed that data to Google Drive Spreadsheet to be logged and graphed.

I want to pull local temp and humidity data and display that on the OLED Display along with the indoor temps I’m currently displaying plus I want to graph the outdoor temp along with the indoor temp in Google Drive Spreadsheet along with the indoor temp.

Google drive can accepts data in various formats and will automatically download it but I couldn’t get it working with a different weather app somebody recommended.

So how would I go about trying to get the Spark Core to import local temp and humidity for my zip code so I can display it on the LCD screen?

XD frolic action = geolocation, auto-correct comedy gold right there ladies and gentlemen.

1 Like

@Coffee Will this code work if built via the WEB IDE or did you have to compile locally for now?

It should work in web ide as well. Would be great if you could test it. :

@Coffee Can you help me out with the code in an effort to save myself some trouble and to get started with working code.

I’m wanting to pull the Temperature & Humidity Data for Fishers, Indiana, 46037 into my Spark Core so I can display it on a LCD screen.

I looked over your GitHub links and it looks pretty simple but I sure would appreciate you help getting this going if possible.

Try my full example, replace the woeid and add the httpclient files. Tell me if this fails.

What would I need to change to get the Temp and Humidity data instead of the Hi and Low temps + description you are printing out to LCD.

I looked over everything but still can’t understand clearly how to access the other weather data like Humidity by changing the code in the main loop.

@RWB I just wrote some tutorial, let me know if this is useful.

Please check first if it works without your customization. :smile:

Because I have trouble with the http-communiation with yahoo, I am switching to http://openweathermap.org/API, which gives me even more flexbility. I will let you know when it is ready for production.

1 Like

Please see my new library based on openweathermap.org, which is more stable and easier to use.