123
Senior Member
If you don't own a weather station but need weather data, measured in your neighbourhood, Weather Underground's Personal Weather Station service might be of interest to you.
Weather Underground's Personal Weather Station (PWS) service collects weather data from private weather stations located in the USA, Canada, and in many other countries. The raw data is available via an XML feed, formatted charts, and a near-real-time display. With a little elbow-grease, you can probably create a PWS driver for your Home Automation program.
I live in a suburb of a major city. There are three PWS stations in my neighbourhood, all within two miles of my home. There's a good chance there's a PWS close to you.
XML Feed
The first step is determine if there is a private weather station in your neighbourhood. Go to the following URL and locate the nearest station: http://www.wunderground.com/weatherstation/index.asp
Make a note of the station's "Station ID". For example, "KNYBUFFA16" is for a station near Buffalo. Here is the URL to the station's weather data:
Charts
A station's weather data is also available in charts. Here's the URL that displays several charts for a given day (for KNYBUFFA16):
Here's how the URL works.
Indicate the date.
&day=28
&year=2009
&month=10
Specify the Station ID.
&ID=KNYBUFFA16
Specify the chart type, where 1=Month, 2=Week, 3=Day, 4=ThreeMonths, 5=SixMonths, and the width in pixels.
&type=3
&width=500
Specify which charts to display where 1=Enable 0=Disable
&showtemp=1
&showpressure=1
&showwind=1
&showwinddir=1
&showrain=1
&showsolarradiation=1
Near Real-time Display
The following URL leads to a Flash widget that displays weather data in near real-time:
To view the data in Imperial units, simply remove "units=metric" from the URL.
Weather Underground's Personal Weather Station (PWS) service collects weather data from private weather stations located in the USA, Canada, and in many other countries. The raw data is available via an XML feed, formatted charts, and a near-real-time display. With a little elbow-grease, you can probably create a PWS driver for your Home Automation program.
I live in a suburb of a major city. There are three PWS stations in my neighbourhood, all within two miles of my home. There's a good chance there's a PWS close to you.
XML Feed
The first step is determine if there is a private weather station in your neighbourhood. Go to the following URL and locate the nearest station: http://www.wunderground.com/weatherstation/index.asp
Make a note of the station's "Station ID". For example, "KNYBUFFA16" is for a station near Buffalo. Here is the URL to the station's weather data:
Code:
http://api.wunderground.com/weatherstation/WXCurrentObXML.asp?ID=KNYBUFFA16
A station's weather data is also available in charts. Here's the URL that displays several charts for a given day (for KNYBUFFA16):
Code:
http://www.wunderground.com/cgi-bin/wxStationGraphAll?day=28&year=2009&month=10&ID=KNYBUFFA16&type=3&width=500&showtemp=1&showpressure=1&showwind=1&showwinddir=1&showrain=1
Indicate the date.
&day=28
&year=2009
&month=10
Specify the Station ID.
&ID=KNYBUFFA16
Specify the chart type, where 1=Month, 2=Week, 3=Day, 4=ThreeMonths, 5=SixMonths, and the width in pixels.
&type=3
&width=500
Specify which charts to display where 1=Enable 0=Disable
&showtemp=1
&showpressure=1
&showwind=1
&showwinddir=1
&showrain=1
&showsolarradiation=1
Near Real-time Display
The following URL leads to a Flash widget that displays weather data in near real-time:
Code:
http://www.wunderground.com/swf/Rapid_Fire.swf?units=metric&station=KNYBUFFA16