This is a heads-up for the upcoming ‘weather’ feature in the OpenSprinkler software. It makes use of the Google Weather API to obtain current weather data in your local area. The Google Weather API returns data in XML format. Unfortunately the OpenSprinkler, which uses a small microcontroller, cannot directly handle the returned data. So what I had to do is to write a Python script that translates the XML data into something that’s much shorter and simpler, so that it can be processed by OpenSprinkler. I’ve put up the script on this website. You can try it by using the following url:
http://rayshobby.net/scripts/getweather.py?location=nyc
It returns a simple html page that’s well within a single Ethernet packet. One nice feature about using the Google API is that you can specify the location in a variety of different formats, such as zip code, city name, or sometimes abbreviated names like ‘nyc’. Feel free to give it a try. This script will be published later, so you can install it on any server you want.
Another feature is the weather forecasts. Right now I have no plan to use this information, but it may be useful for the future. You can get forecast data using:
http://rayshobby.net/scripts/getweather.py?location=nyc&forecast=1
It can return up to four days of forecasts.
I’ve modified the Arduino code to periodically retrieve weather data from the server. The new OpenSprinkler webpage has the following changes:
What I am currently working on is to update the software code to allow the control by weather data. The simplest way is to use the ‘rain index’ to control rain delay hours. More complicated strategy can be implemented by yourself. That’s the value of open-source and programmable gadgets!
Hello there,
I received the opensprinkler and it is working fine for the last few weeks.
Is there any plan to utilise the weather forecast and stop the sprinkler from running the program.
FW version is 1.7 and I cannot seem to find this option anywhere.
Thanks
Not yet, because Google has silently stopped their weather API and I haven’t had time to work on alternative APIs.
Is this feature still in the works? If this is added, it would definitely help getting me off the fence about buying this. Very cool product you’ve got here.
what about yahoo weather API, or like XBMC using weatherunderground.
On the forum there have been active discussions on using the Yahoo Weather API to fine tune water duration. For example, this thread:
http://rayshobby.net/phpBB3/viewtopic.php?f=28&t=564