[Updated] Weather Underground Driver - New API

@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?

wuwarn1

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

I’ll remove it on the next release.

Andy

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?

OK
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,
"lat":
"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:

If you enable the logging, are you seeing this:

Which version of the driver are you using?

I've just posted a new version (V4.3.0) to github for this driver.

Sorry, I went out for my morning walk :slight_smile:
Yes, it was dark as it was about 6AM.
I grabbed the code from GitHub yesterday.
No, I am still seeing:
2019-04-24 09:03:56.156 am errorjava.lang.NullPointerException: Cannot execute null+1 on line 214 (pollSchedule)

dev:742019-04-24 09:03:56.131 am infostate.unit = e

I will grab the latest from GitHub and update, thanks.

With the latest driver, I am getting responses now.
Only other changes was that I set NewDayStarts to 12:00PM
Still no solarradiation but just checked my PWS and Solar is 0.0
Guess I'll be making a trip on the roof today.

Thanks again for your APP and quick support, I really appreciate it.

Current States

  • DriverAuthor : Cobra
  • DriverStatus : Current
  • DriverUpdate : N/A
  • DriverVersion : 4.3.0
  • UVHarm : High
  • chanceOfRain : 0
  • currentConditions : Generally clear. Highs 63 to 67ºF and lows 44 to 48ºF.
  • dewpoint : 49
  • elevation : 157
  • feelsLike : 63
  • forecastConditions : Partly cloudy. Highs 58 to 62ºF and lows 47 to 51ºF.
  • forecastHigh : 65
  • forecastLow : 46
  • humidity : 60
  • illuminance : No Data
  • latitude : 40.88063431
  • longitude : -73.25063324
  • moonPhase : Waning Gibbous
  • observation_time : 2019-04-24 09:12:00
  • pollsSinceReset : 2
  • precipType : rain
  • precip_rate : 0.00
  • precip_today : 0.00
  • pressure : 29.56
  • rainTomorrow : 0.0
  • solarradiation : No Data
  • stationID : KNYKINGS9
  • temperature : 63
  • weather : Sunny
  • wind : 5
  • windPhrase : Winds WNW at 10 to 20 mph.
  • windPhraseForecast : Winds NNW at 10 to 15 mph.
  • wind_degree : 321
  • wind_dir : WNW
1 Like

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: