[Release] Enhanced Weather Underground Driver

Hi All, I found a number of issues with Cobra's version of a WU driver in the way it handles certain forecast fields, plus I've made a number of enhancements that I think are worthy of branching out.

Major Changes:

  • "currentConditions" has been renamed to "forecastShort" as this is a more accurate name.
  • Added "cloudCover" as I find this useful for automating Lamps around the house without having Lux sensors in every room.
  • My driver takes your location directly from your Hub rather than from WU (doesnt make much difference to operation)
  • Switches the WU language from en-GB to en-US as this seems to cause issues for Aussies and most likely Americans too.
  • forecastToday auto switches to day/night content
  • forecastTodayIcon auto switches to day/night icons

So the fun part is my Driver switches the detailed forecast from Day to Night automatically as soon as WU changes the day content to null. This is also great for those of us using icons as they switch too.

If you find any issues or have any ideas to improve it please let me know.

Install the driver by importing the below URL into a new HE Driver:

https://raw.githubusercontent.com/dJOS1475/Hubitat_WU_Driver/main/WU_Driver.groovy

PS, I'm not actually a developer, so feel free to constructively provide feedback on improving the code quality.

5 Likes

UPDATES:

17 Nov 2020 - v5.5.0 - WU Icons now hosted on GitHub Repo (but still optional) - no URL's are required to be copy and pasted and Icon's now work when connected via the cloud

20 Nov 2020 - v5.6.0 - add selectable language eg en-GB or en-US
(I can add more options if requested)

You can update your driver by importing the below URL:

https://raw.githubusercontent.com/dJOS1475/Hubitat_WU_Driver/main/WU_Driver.groovy

My PWS uploads to WU. Can I use data from this with your app?

1 Like

You certainly can, it uses your WU API key and station ID.

Have you compared accuracy to our local BOM weather ?
I started using @cometfish’s BOM Driver because it seemed to be more accurate than the international sites.

1 Like

I haven’t on Hubitat. I only use WU for the forecast data.

Live data is from my PWS as we live in a micro-climate in the Yarra Ranges so even the closest BoM station is wrong most of the time.

1 Like

I've just tried to install this and got an error.

expecting ')', found 'if' @ line 345, column 4

Something easy to fix I hope!

Ah oops, I’ll upload a fix tomorrow.

I know exactly what the issue is. :man_facepalming:

1 Like

I'm a new HE user, and this was the first driver I installed. I got the same error noted above and just "trial and errored" a fix yesterday. Replaced and moved some ) and } as I recall. Working GREAT, so thanks for creating this. Allows me to use my own data from a Davis VP2 that I upload to WU.

I haven't yet figured out how to get all data onto my dashboard yet, but should be fun to try. Also, if you ever decide to code a driver that reads local CumulusMX data with no cloud involvement, I'd be happy to help test it. I saw that someone created a Weewx driver, but I've found that Weewx itself locks up often on the RPi on which I run CumulusMX, so I decided to stay with CumulusMX, which runs for months and months with no intervention, in my case. Anyway, thanks again for offering this driver. Greatly appreciated.

1 Like

@andy-e @Madcodger
Should be fixed now - I must have hit the space bar by accident before I hit save which broke some formatting on that line. :man_facepalming:

1 Like

Ok, got it loaded now. Thanks for that.
Now playing around with it, but not getting icons. Clicked on Use Externally Hosted Icons which didn't do any good, so switched it back off. Now I can't Save Preferences 'cos it wants the Icon Base URL filled in no matter what the setting is...

Hopefully another easy fix!

You need to download them and copy them into the hub with file manager ATM.

It’s a bit of a kludge but the next version will hopefully do things properly.

I’m still learning the groovy language and haven’t written code in several decades. Hopefully it won’t take me too long to figure out.

Ok, got it now! But what about not being able to leave the Icon Base URL field blank after turning the Externally Hosted Icons switch on then back off? Is this fixable?

You can store the icons locally on the hub (it's very tedious to upload 50 icons one at a time tho) and then point the WU driver at "http://<Hub_IP>/local/". I'll look into a method of storing them locally automatically in the next versions.

Yeah, I got all that! I’m just saying that once I switched the External Icons switch on and then back off, I can no longer save my preferences from the Device edit screen. Locks up asking for the External Icon location box to be filled. Won’t let me out. I have to abandon the screen. Seriously, really, I understand fully what you say about the Icons locations - this is purely about the Virtual Device details screen not letting me save any preferences once the External Icons switch has been used...

I’m not using this driver but Have you tried using - [quote="dJOS, post:15, topic:54141"]
then point the WU driver at "http://<Hub_IP>/local/".
[/quote]

That is bizarre, I can’t replicate this.

Which browser are you using?

Thanks for the idea. I just put that in the address field and it cleared the error.

2 Likes

The Wunderground Icon's have been uploaded to my GitHub Repo and you can now point your WU driver at the following location:

https://github.com/dJOS1475/Hubitat_WU_Driver/raw/main/wuIcons/

I'll update the 1st post.

1 Like

v5.5.0 released:

Download the Hubitat app