[Updated] Weather Underground Driver - New API

Guys, I have completely recoded the Weather Underground driver

This is the basic one with no connection to any PWS
You will though, need the new api key, which unfortunately, is only available if you push PWS data to WU

New driver is here:


I'm currently working on my Weewx & WU driver and hope to have that finished soon.



Looking good so far, I do have an error though?

One thing I forgot to mention..
If you want icons then you need to host them somewhere
I have mine on a local Pi so I can see them even with no internet

I will add something in case you don't use that 'feature'

I'll get something sorted this afternoon


As WU does not now post icon URL details in the json response I have had to allow the use of an external source for icons
This is now switchable so you won't get any errors if not using this feature

Updated GitHub to version 4.1.0


1 Like

What do you put in for the station ID?


You put your pws station name
Previously, you would enter pws:station id

For example previously I used ‘PWS:IDURHAM16’ (my station id)
But now you do not use the PWS:

My stationId is now just IDURHAM16


1 Like

Sorry, I haven't connected my PWS through Hubitat before, I thought they shutdown the WU API your title said "This is the basic one with no connection to any PWS". And the API key do you get that from https://www.apixu.com? I'm guessing once it connects it should show info like the Temperature, Wind Speed, Direction, ... in the driver State Variables?


So instead of pulling from Weewx, which would be used for station data right from your own PWS, this pulls WU data, but they don't let you pull data into an app for free. You have to either be a paying customer, or your PWS needs to be a contributor of weather data in order to get the API key needed to pull data into an application without charge.

Most weather stations upload to WU. As long as you are doing that, you can apparently get a new API key. I've had my account for many years, so I cannot tell you what this looks like for a new user. However here's how I just did it seconds ago.

  1. Log in to WU
  2. Click the Gear icon (top right) and choose "More Settings"
  3. Click the far right tab that says "API Keys"
  4. Click "Generate Key" and then "Copy to Clipboard" so you can paste it into the app.

This is driver for Weather Underground only
You need to own a pws and push data to WU to be able to get the correct (new) api key.
(Although this driver does not connect directly to your PWS.)

For apixu, you need @bangali’s driver from this thread.
Apixu.com worldwide weather data with outside lux. No PWS or server setup

When I said it was basic, I meant it does not connect directly to the PWS.
My other driver connects to a PWS via ‘weewx’ and suppliments the forecast data with data from WU.


1 Like

Great, its working now. Thanks.

1 Like

@Cobra First, everything is working fine and I don't have any issues, but I have consistently these 2 "warn" logs, that I was wondering what that means just for personal knowledge?


That is test code that I forgot to remove :slight_smile:

I’ll remove it on the next release.


1 Like

Is there any other way to pull the information from my PWS other than weewix

If your PWS uploads to Weather Underground, they are now issuing uploaders free API's again and this app works for it. What brand of PWS are you using?

Ambient Weather WS-2902. My friend in town owns it. He provided me his wunderground api last week.

Do I need to ask him for a newer api somehow?

That's the same one I have I believe, You can do one or both of these apps, the one we are on now (which you''ll need to start uploading to weatherrunderground.com (costs nothing) to get api key.

This depends if your friend received that api from weather underground within about the last month then no, you should be ok....if it was provided to him before they eventually shut down their free api's then yes you will need a new one, and that is only provided if the weather station is uploading to them (for free) OR they charge you for the API key.

OR you can install this app and driver Ambient Weather Device which you will need to go into your Ambient Weather Dashboard and generate a application key and api key to insert into the app once installed.

I use both to get all the data I prefer each dashboard tile states which device the data comes from...see attached screenshot.

@Cobra I have my own WU weather station on the roof so polling it with your code, thank you.
Every poll has this error:
" [error] java.lang.NullPointerException: Cannot execute null+1 on line 214 (pollSchedule)"
Not sure what the issue is.
In addition my weather station provides solarradiation but the software states " solarradiation : This station does not send Solar Radiation data
Any ideas?

1st thing to do is check the device and make sure you filled in all the options
Line 214 relates to the count of how many times it has polled.
I am not seeing any issues with this - it's just a basic bit of code to count.

The driver just says this when it can't get the data
I occasionally get this when WU doesn't send the data correctly
If you turn the logging on you will see a 'null' value somewhere for solarradiation from the WU response
Perhaps I should change the message to 'No Data' which would be less confusing

All Items are filled in with the exception of New Day Starts *
I'm not sure what that is supposed to be set for, 00:00:10?

Snippet from WU API of my data, ID, LAT, LON commented out by me.
"observations": [
"stationID": "----------",
"obsTimeUtc": "2019-04-24T09:58:00Z",
"obsTimeLocal": "2019-04-24 05:58:00",
"neighborhood": "Indian Head Knolls",
"softwareType": "",
"country": "US",
"solarRadiation": 0,
"lon": ,
"realtimeFrequency": null,
"epoch": 1556099880,
"uv": null,
"winddir": 265,
"humidity": 88,
"qcStatus": 1,
"imperial": {
"temp": 56,
"heatIndex": 56,
"dewpt": 53,
"windChill": 56,
"windSpeed": 4,
"windGust": null,
"pressure": 29.51,
"precipRate": 0,
"precipTotal": 0,
"elev": 157

I have my new day set at 00:01 but that shouldn't make too much difference
This is used to check to make sure you don't poll too many times within 24 hrs.
Is it night where you are?
I wouldn't expect to see '0' unless it is.

Here is my output atm:

Download the Hubitat app