Update: between 2018 to 2019, Weather Underground (WU) was acquired by IBM, changing their API service and the process to apply for an API key. At the moment of this writing, the OpenSprinkler weather service uses OpenWeatherMap and no longer depends on WU. In the future we do plan to still offer the option to use WU data as it's more accurate and reliable. Below we document the current way (as of July 16, 2019) to acquire a WU API key and PWS station name. We do not know how long this will be valid till they make changes again, so please use the instructions below at your own discretion.

Step 1: Create your WU account

Go to https://www.wunderground.com/signup and create a WU account.

Step 2: Create a PWS station

Log in to WU, then click on 'My Profile' at the top-right side of the screen, click on the 'My Device' tab. Here you will need to add a PWS (Personal Weather Station) device. You do not actually need to own a device physically. Enter your address, and from the list of available devices, you can select any (e.g. Acurite 3-in-1 Weather Station). It will generate a PWS station name. Please note that unless if you have a physical PWS that you own, this particular PWS will not have any valid data, so do NOT use this particular PWS for getting weather data.

Step 3: Create API key

Once you have a PWS device, you can go to the 'API Keys' tab to create a WU API key. Regardless of how many devices you have, you will only have one key. It's typically a 32-character long string.

Step 4: Finding PWS stations near you

The upcoming OpenSprinkler weather service will allow using WU and PWS as weather data source. To do so, you need to input your WU API key (obtained at step 3 above), and a valid PWS station name. The one you created in step 2 is NOT a valid PWS station (unless if you own a PWS device physically). To find out valid PWS stations, you can go to www.wunderground.com, search your location, then click the dropdown list under the location name, it will show you a list of available PWS names near you (for example: KMAAMHER21). Not all PWS stations have the same quality of weather data. Sometimes it may take a few rounds of trial and error to find out one that has the best quality of data.