Weather Underground

I have my own PWS with Wunderground and am trying to get some weather information available to Hubitat via the Wunderground device type

Everything is set up properly (at least it appear so) and I am getting the following on the Device Page:

Current States

  • alert : no current weather alerts
  • alertKeys : []
  • city : Albrightsville, PA
  • feelsLike : 48
  • forecastIcon : clear
  • humidity : 35
  • percentPrecip : 0
  • temperature : 48
  • timeZoneOffset : -0400
  • weather : Clear
  • weatherIcon : nt_clear
  • wind : 0

Is there any way to extend these 'current states' to include UV, SolarRadiation, and other info that is available in the State Variables?
e.g.:
State Variables
weatherCache : {alerts18210={weather={alerts=[], response={features={alerts=1}, version=0.1, termsofService=http://www.wunderground.com/weather/api/d/terms.html}, query_zone=054}, age=1524444385646}, conditions18210={weather={response={features={conditions=1}, version=0.1, termsofService=http://www.wunderground.com/weather/api/d/terms.html}, current_observation={nowcast=, temp_c=8.8, observation_epoch=1524444383, temp_f=47.8, wind_kph=0, wind_mph=0.0, wind_degrees=-9999, temperature_string=47.8 F (8.8 C), weather=Clear, feelslike_string=48 F (9 C), precip_today_metric=0, precip_1hr_string=0.00 in ( 0 mm), icon_url=http://icons.wxug.com/i/c/k/nt_clear.gif, image={link=http://www.wunderground.com, title=Weather Underground, url=http://icons.wxug.com/graphics/wu2/logo_130x80.png}, UV=0, station_id=KPAALBRI11, local_epoch=1524444384, local_tz_short=EDT, wind_dir=North, precip_1hr_metric= 0, pressure_in=30.36, local_tz_long=America/New_York, wind_gust_mph=0, windchill_string=48 F (9 C), wind_gust_kph=0, wind_string=Calm, local_time_rfc822=Sun, 22 Apr 2018 20:46:24 -0400, visibility_km=16.1, relative_humidity=35%, pressure_mb=1028, observation_time_rfc822=Sun, 22 Apr 2018 20:46:23 -0400, precip_1hr_in=0.00, feelslike_c=9, observation_time=Last Updated on April 22, 8:46 PM EDT, feelslike_f=48, history_url=http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=KPAALBRI11, windchill_f=48, windchill_c=9, precip_today_string=0.00 in (0 mm), icon=clear, precip_today_in=0.00, solarradiation=0, observation_location={elevation=1808 ft, country=US, country_iso3166=US, city=Mt. Pocono, latitude=41.01, state=Pennsylvania, full=Mt. Pocono, Pennsylvania, longitude=-75.54}, dewpoint_f=22, display_location={zip=18210, magic=1, elevation=516.3, country=US, country_iso3166=US, city=Albrightsville, state_name=Pennsylvania, latitude=41.00000000, wmo=99999, state=PA, full=Albrightsville, PA, longitude=-75.52999878}, dewpoint_string=22 F (-6 C), pressure_trend=+, dewpoint_c=-6, estimated={}, forecast_url=http://www.wunderground.com/US/PA/Albrightsville.html, local_tz_offset=-0400, heat_index_f=NA, heat_index_c=NA, ob_url=http://www.wunderground.com/cgi-bin/findweather/getForecast?query=41.008137,-75.536423, heat_index_string=NA, visibility_mi=10.0}}, age=1524444384820}, solarradiation18210={weather={response={features={}, error={type=unknownfeature}, version=0.1, termsofService=http://www.wunderground.com/weather/api/d/terms.html}}, age=1524444422767}, forecast18210={weather={response={features={forecast=1}, version=0.1, termsofService=http://www.wunderground.com/weather/api/d/terms.html}, forecast={simpleforecast={forecastday=[{date={tz_short=EDT, pretty=7:00 PM EDT on April 22, 2018, ampm=PM, year=2018, isdst=1, weekday=Sunday, weekday_short=Sun, epoch=1524438000, sec=0, min=00, month=4, hour=19, monthname_short=Apr, monthname=April, tz_long=America/New_York, yday=111, day=22}, icon_url=http://icons.wxug.com/i/c/k/clear.gif, period=1, maxhumidity=0, skyicon=, avewind={kph=2, mph=1, dir=NNW, degrees=348}, icon=clear, avehumidity=46, snow_allday={in=0.0, cm=0.0}, qpf_day={mm=null, in=null}, maxwind={kph=16, mph=10, dir=, degrees=0}, pop=0, qpf_night={mm=0, in=0.00}, high={celsius=15, fahrenheit=60}, minhumidity=0, low={celsius=3, fahrenheit=37}, snow_night={in=0.0, cm=0.0}, snow_day={in=null, cm=null}, conditions=Clear, qpf_allday={mm=0, in=0.00}}, {date={tz_short=EDT, pretty=7:00 PM EDT on April 23, 2018, ampm=PM, year=2018, isdst=1, weekday=Monday, weekday_short=Mon, epoch=1524524400, sec=0, min=00, month=4, hour=19, monthname_short=Apr, monthname=April, tz_long=America/New_York, yday=112, day=23}, icon_url=http://icons.wxug.com/i/c/k/clear.gif, period=2, maxhumidity=0, skyicon=, avewind={kph=13, mph=8, dir=SE, degrees=144}, icon=clear, avehumidity=40, snow_allday={in=0.0, cm=0.0}, qpf_day={mm=0, in=0.00}, maxwind={kph=16, mph=10, dir=SE, degrees=144}, pop=0, qpf_night={mm=0, in=0.00}, high={celsius=16, fahrenheit=61}, minhumidity=0, low={celsius=4, fahrenheit=40}, snow_night={in=0.0, cm=0.0}, snow_day={in=0.0, cm=0.0}, conditions=Clear, qpf_allday={mm=0, in=0.00}}, {date={tz_short=EDT, pretty=7:00 PM EDT on April 24, 2018, ampm=PM, year=2018, isdst=1, weekday=Tuesday, weekday_short=Tue, epoch=1524610800, sec=0, min=00, month=4, hour=19, monthname_short=Apr, monthname=April, tz_long=America/New_York, yday=113, day=24}, icon_url=http://icons.wxug.com/i/c/k/chancerain.gif, period=3, maxhumidity=0, skyicon=, avewind={kph=18, mph=11, dir=SE, degrees=142}, icon=chancerain, avehumidity=63, snow_allday={in=0.0, cm=0.0}, qpf_day={mm=1, in=0.04}, maxwind={kph=24, mph=15, dir=SE, degrees=142}, pop=50, qpf_night={mm=11, in=0.44}, high={celsius=13, fahrenheit=55}, minhumidity=0, low={celsius=7, fahrenheit=45}, snow_night={in=0.0, cm=0.0}, snow_day={in=0.0, cm=0.0}, conditions=Chance of Rain, qpf_allday={mm=12, in=0.48}}, {date={tz_short=EDT, pretty=7:00 PM EDT on April 25, 2018, ampm=PM, year=2018, isdst=1, weekday=Wednesday, weekday_short=Wed, epoch=1524697200, sec=0, min=00, month=4, hour=19, monthname_short=Apr, monthname=April, tz_long=America/New_York, yday=114, day=25}, icon_url=http://icons.wxug.com/i/c/k/rain.gif, period=4, maxhumidity=0, skyicon=, avewind={kph=19, mph=12, dir=ENE, degrees=77}, icon=rain, avehumidity=92, snow_allday={in=0.0, cm=0.0}, qpf_day={mm=13, in=0.52}, maxwind={kph=24, mph=15, dir=ENE, degrees=77}, pop=90, qpf_night={mm=0, in=0.00}, high={celsius=12, fahrenheit=53}, minhumidity=0, low={celsius=5, fahrenheit=41}, snow_night={in=0.0, cm=0.0}, snow_day={in=0.0, cm=0.0}, conditions=Rain, qpf_allday={mm=13, in=0.53}}]}, txt_forecast={date=7:53 PM EDT, forecastday=[{icon_url=http://icons.wxug.com/i/c/k/clear.gif, fcttext=Clear. Lows overnight in the upper 30s., pop=0, period=0, icon=clear, title=Sunday, fcttext_metric=Clear. Low 3C.}, {icon_url=http://icons.wxug.com/i/c/k/nt_clear.gif, fcttext=Clear skies. Low 37F. Winds light and variable., pop=0, period=1, icon=nt_clear, title=Sunday Night, fcttext_metric=Clear skies. Low 3C. Winds light and variable.}, {icon_url=http://icons.wxug.com/i/c/k/clear.gif, fcttext=Sunny skies. High 61F. Winds SE at 5 to 10 mph., pop=0, period=2, icon=clear, title=Monday, fcttext_metric=Sunny. High 16C. Winds SE at 10 to 15 km/h.}, {icon_url=http://icons.wxug.com/i/c/k/nt_partlycloudy.gif, fcttext=Partly cloudy. Low around 40F. Winds SSE at 5 to 10 mph., pop=0, period=3, icon=nt_partlycloudy, title=Monday Night, fcttext_metric=A few clouds from time to time. Low 4C. Winds SSE at 10 to 15 km/h.}, {icon_url=http://icons.wxug.com/i/c/k/chancerain.gif, fcttext=Considerable cloudiness. Occasional rain showers in the afternoon. High around 55F. Winds SE at 10 to 15 mph. Chance of rain 50%., pop=50, period=4, icon=chancerain, title=Tuesday, fcttext_metric=Cloudy early with showers for the afternoon hours. High 13C. Winds SE at 15 to 25 km/h. Chance of rain 50%.}, {icon_url=http://icons.wxug.com/i/c/k/nt_rain.gif, fcttext=Cloudy with periods of rain. Low around 45F. Winds ESE at 10 to 15 mph. Chance of rain 100%. Rainfall around a half an inch., pop=100, period=5, icon=nt_rain, title=Tuesday Night, fcttext_metric=Rain likely. Low 7C. Winds E at 15 to 25 km/h. Chance of rain 100%. Rainfall around 12mm.}, {icon_url=http://icons.wxug.com/i/c/k/rain.gif, fcttext=Rain. High 53F. Winds ENE at 10 to 15 mph. Chance of rain 90%. Rainfall around a half an inch., pop=90, period=6, icon=rain, title=Wednesday, fcttext_metric=Cloudy with periods of rain. High 11C. Winds ENE at 15 to 25 km/h. Chance of rain 90%. Rainfall near 12mm.}, {icon_url=http://icons.wxug.com/i/c/k/nt_mostlycloudy.gif, fcttext=Mostly cloudy. Low 41F. Winds WNW at 10 to 15 mph., pop=20, period=7, icon=nt_mostlycloudy, title=Wednesday Night, fcttext_metric=Cloudy. Low near 5C. Winds WNW at 15 to 25 km/h.}]}}}, age=1524444385401}}

I would love to pull in solarradiation and UV for starters from the above, as well as Wind Speed/Gust, Direction and some others for a dashboard I am working on.

For those interested, this is a Davis Vantage Pro2 weather station running on a RaspPi with weeWX software, all this data is currently going to Wunderground and others, including the weather site i run for the local area Albrightsville, PA Weather. Up where I live we say if you dont like the weather, drive 5min ...

In regards to the dashboard - for this device type it would be great to be able to pull in the weatherIcon and the weather text into a tile :slight_smile:

1 Like

If it outputs an image for the weather, you could pull that in. We haven’t even started work on doing custom tiles. That is a very complex undertaking…

It actually outputs the URL of the icon in the API return … e.g.:

icon_url=http://icons.wxug.com/i/c/k/nt_clear.gif

Any ideas on how to pull in other data from the variables? I dont see a way to do it directly, but I’d love to see the SolarRad and UV for some automations

Turn on landscape lighting when solarRad < X turn off when > Y

Turn on roof heater when it snowed in past X hours and solarRad < x

etc

Have a look here:

This has already been created.
You just need to enter your station details

Andy

1 Like

@Cobra thanks … I installed it and may have to tweak a few bits for my needs when I get an hour downtime … I’ll send anything I add/mod your way when ready :wink:

-jph

1 Like

I didn’t create it (Just tweaked it)
The best thing to do if you have mods is to post in the original thread

Andy

Will Do

In the version that you tweaked - can you use a PWS ID instead of a ZipCode or Lat/Long? There are about 10 different PWS stations in my area, each of which have varying degrees of crap data … and I would like to ensure that WU returns my crap data LOL

Instead of my zipcode (18210) I’d like to use my PWSID (KPAALBRI11) - havent given it a try (yet) but if it wont work that is something I may work on first

I think it’s

PWS:12345678

where 12345678 is your station ID

Andy

1 Like

Yep
just tried:

PWS:KPAALBRI11

seems to work as I got some data

Andy

1 Like

Yup ... just tried it myself ... I forgot all about that and dug it out of the API docs as you were posting ...

Time to re-review the blunderground API :slight_smile:

1 Like

I've just about had it with these clowns. A few hours ago I was logged into my WU account trying to figure out why nothing has gone from my.accurite to WU in 7 days. It now shows this...

05%20PM

But I still had my account opened in another tab from earlier today...

05%20PM

And when I try to contact support...

17%20PM

JHoke, I have a weather station. I am new to Hubitat. Could you explain in extreme rookie terms how you did this? I am working with SmartTools figuring that out....

John (@JHoke) is not really active on the forums recently.
If you have a PWS (Personal Weather Station) and are looking to get the data into Hubitat then you can use a program called ' Weewx'
Most people run it on a Raspberry PI
If you search the forums I believe John posted some installation instructions but I created a Pi image a while ago.
Then you will need a driver for a virtual device to receive the data from weewx
I created one here:

Weather Underground are not allowing new api keys at the moment but, if you have one already and send your data to WU then you can just use my WU driver
Here:

Andy

1 Like

Andy's app works really well and if you have trouble getting the data off your weather station as I did with my Ambient Weather Observer IP, just follow "Method 2" here on Pat O'Brien's blog. All you need is an inexpensive router compatible with DD-WRT and the patience to flash its firmware. You can stop at the end of Pat's instructions before getting to "Accepting the data on your server". That bit is unnecessary.

Once I did this. it was simple to redirect WU data that I was uploading from my Observer IP module to Weewx and finally Andy's driver. You can use any weather station that Weewx supports data from and also uploads to WU, which is all of them as far as I know. The router is just redirecting the upload to Weewx, so the brand of weather station doesn't matter in regard to the router piece of the puzzle.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.