[Updated] Weather Underground Driver - New API

Thanks for your work on this, Cobra. Below is what I get from my Ambient Weather WS-2902A.
I wonder about the Nulls at the bottom.
Also, can you provide the icon names used and maybe some example icons?

Current States

  • DriverAuthor : Cobra
  • DriverStatus : Current
  • DriverUpdate : N/A
  • DriverVersion : 4.3.0
  • currentConditions : Generally clear. Low 51ºF.
  • currentIcon :
  • dewpoint : 52
  • elevation : 56
  • feelsLike : 64
  • forecastConditions : Partly cloudy. Highs 82 to 86ºF and lows 50 to 54ºF.
  • forecastIcon :
  • forecastLow : 51
  • humidity : 67
  • illuminance : No Data
  • latitude : 38.40999985
  • longitude : -121.34600067
  • moonPhase : Waxing Crescent
  • observation_time : 2019-05-07 20:21:42
  • pollsSinceReset : 2
  • precip_rate : 0.00
  • precip_today : 0.00
  • pressure : 30.02
  • solarradiation : No Data
  • stationID : KCAELKGR100
  • stationType : AMBWeatherV4.1.1
  • temperature : 64
  • wind : 1
  • windPhraseForecast : Winds SSW at 10 to 20 mph.
  • wind_degree : 209
  • wind_gust : 2
  • chanceOfRain : null
  • rainTomorrow : null
  • precipType : null
  • weather : null
  • windPhrase : null
  • forecastHigh : null
  • wind_dir : null
  • UVHarm : null

I'm guessing those "nulls" only update at certain times of day, as I have the same weather station as you and they are populated for me with this app, and have been for about a month now.

2 Likes

Hi there
The ‘nulls’ usually come about because the data ia not available at WU.
I get one or two occasionally, unfortunately there is not much I can do about it apart from marking them as ‘no data’ or something similar.
As @waynespringer79 says, they will probably come in at some point.

WU uses icon numbers rather than names.
You can find them here;

Hubitat/resources/wuIcons/png at master · CobraVmax/Hubitat · GitHub

Andy

1 Like

The ‘nulls’ went away after running overnight.
Thanks for the icons.

John

1 Like

Great! :slight_smile:

@Cobra, any thoughts of adding a 'Debug logging' switch so as to limit log messages once you know everything is working? I have done this with other drivers as described here: Turn off debugging? How?
I would make the modifications myself, but I would rather not modify your code if you are still actively developing.

Try turning off the ‘log all wu response data’ switch
This should disable most of the logging
I usually turn off the logging in my drivers automatically after 30 mins or so but have not implemented it in this driver.
I’ll look at adding it in the next release

search

This little icon in the top right of your screen is pretty magical

@Cobra I just started seeing this error today....any idea?

Looks like there may be an error at their end
I had the same error..

The request is timing out.

1 Like

I noticed I was running 4.2.0 and you had 4.3.0 out so I copied and pasted over the code but the device still shows wu1

Do I need to delete and recreate the device for it to update?

You should not normally have to delete and recreate the device.
please try updating the code again

New version 4.5.0

Andy

Same thing happened when pasting this code over the other, I refreshed the browser a couple times on the device page, still shown v4.2.0

But after clicking "save preferences" it then update to v4.5.0

Thanks for your help

I'm sorry, I should have mentioned...
whenever you update a driver, you should usually 'save preferences ' again :slight_smile:

I'm about to release another version (4.6.0) as I have streamlined the code somewhat

Andy

1 Like

Ok.. Version 4.6.0 Uploaded to github

Code optimisation...

  • Converted httpGet call to asynchttpGet - This should prevent hub waiting for the respose from WU before doing other things
  • Randomised the update check routine to reduce load on my update server.
  • Removed 'isStateChange: true' to reduce database load.
  • Changed debug logging to reduce logging spam
  • Auto turn off logging after 30 minutes
1 Like

Hi @Cobra. Thanks for all your work on this driver. :grinning: I've forked your repo and made some custom attributes for temps, wind, and such that are a bit more friendly for Dashboard tiles.

Here's what they look like on my dashboard:

Imperial:

Metric:

I've also done some code cleanup and added a 1 minute auto poll option. Please feel free to check it out. And if you'd like to integrate my changes back into your version, I'd be happy to submit a pull request.

1 Like

As you are publicly releasing a version of this driver please remove my update code as it connects to my personal server.

@Cobra Done.

Thank you.

I've pushed a small update (4.6.2) to my fork to support tempHandler for apps like the built in Notifications app (pilfered from the NST Manager thermostat driver). As the code was before, Notifications wasn't able to get the temperature from the driver.