Getting the weather with OpenRemote

I include the weather in Manchester UK, where I live, in my OpenRemote remote control. There was a article on how to use the iGoogle weather service with OpenRemote, but the iGoogle service has been discontinued and iGoogle itself now uses the Wunderground service.

It is very easy to use the Wunderground API from OpenRemote. You first have to register with Wunderground, which is free for developers. You then generate a shared key.

You can then set up OpenRemote commands and sensors for getting weather data. To do this you use the http protocol and use a URL like http://api.wunderground.com/api//conditions/q/UK/Manchester.xml.

You can look up the closest city to you that has a Wunderground weather station and substitute that. They are in the API documentation.

For the OpenRemote command that get the weather data, you should set the HTTP method to GET and the Xpath expression to //current_observation/weather or //current_observation/temp_c or //current_observation/relative_humidity, or one of the other elements in current_observation. You should set the polling interval to something like 10m so that you don’t call the service more often than is allowed for developers. You can set the sensor type to custom or level as appropriate.

I don’t currently use weather data in any OpenRemote rules but it would be easy to do so. You might want to make sure windows are closed when it is cold outside, for example.

Advertisements
This entry was posted in Home automation. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s