[RELEASE] DarkSky.net Weather Driver, no PWS Required

I added 'windSpeed' and 'windDirection', required by some dashboards. I changed 'weather' from condition_text (e.g. 'Partly Cloudy') to condition_code (e.g. 'partlycloudy'), so it is the same as weatherIcon now.

Two things here: 1) in your post the attribute is 'weatherIcons' (it has a trailing 's'); and 2) I have no idea where values for that attribute come from. I could add the 'weatherIcons' if I had a way to populate that with appropriate values, and I don't know what those may be? You mention these may be openWeather tiles ... I have never used openWeather and the DarkSky may not work with those unless someone can map a DarkSky attribute to the openWeather source (or whatever the expected source is).

OK, Icons are now working.
My problem with them seemed to be the location link.
When I clicked on your link in an earlier post (https://raw.githubusercontent.com/Scottma61/WeatherIcons/master/), it said "invalid request" so I just followed the link for your driver code and went up a directory or 2 and found your weather icon folder and used the link from that page. (GitHub - Scottma61/WeatherIcons: WeatherIcons for Hubitat Drivers)
I copied and pasted the 1st link into the alternative location and it now works.
Thank You

I have absolutely no programming knowledge so I've never done more than download an occasional thing from github. I have no idea how or where you got the "Raw" link for that page. Guess I'll have to do some reading and maybe create an account there. Gotta figure out fork/clone etc...
That way I can make a backup of the drivers i'm using, for myself

1 Like

Glad you got it to work!

Here is the OpenWeatherMap documentation for weather icons, I guess thats what the system driver and tile are using.


I don't intend to be pedantic.. but I do like tossing out knowledge I 'earned' :slight_smile:

The Dashboard Weather Template uses Attribute Names that match what's defined within Hubitat's OpenWeatherMap driver. In other words, the Driver can read in OpenWeather's "wind.speed" key:value pair, and then translate that into an Attribute Name of "theWindIs"

They don't, but rather than looking at what OpenWeatherMap generates, just use the spelling found by creating a device for that driver:


Also has the benefit of hinting at the casting :slight_smile:

[UPDATED] V1.0.4 09/14/2019

  • added 'weatherIcons' used for OpenWeatherMap Icons/dashboard.

Icons working great now!


It will be interesting to compare darksky's data with OpenWeatherMap side by side like this. I am finding OWM data can be noisy (as they told me they aggregate data from multiple sensors, one sample from one source, next sample from different source) so im hoping dark sky will be nicer data. Im liking the true lux illuminance, Ill be using that in my motion lighting rules probably.

Thanks for the great driver and for fixing things on a Saturday! incredible.

example of 'noisy' data from OWM

1 Like


  • Tweaking and bug fixes.
1 Like

Thank you for your work! I can sympathize with the "joys" of programming & testing. :):exploding_head:


  • MOVED the code from my personal github to the HubitatCommunity github. The link in the first post has been updated. You should make sure you update the icon location to the new location here too. I will move/re-arrange my personal github so make sure you are going to the HubitatCommunity for any updates.
  • Added the updateCheck() routine (thanks @csteele) so you can see if the driver is current.
  • Added a second 'polling' interval. There are now two. One will run the poll interval selected during 'Daytime' hours and the second will run the interval selected during 'Nighttime'. They can be set the same or differently. I did this because I use the illuminance calculation so I wanted the 'Daytime' calculation to run frequently. However, at night I do not need it to run frequently so I reduce the frequency. 'Nighttime' is defined as between Twilight end and Twlight begin.
  • Added an option to run the poll every two minutes ... for those obsessed with current weather data.

Im getting an NPE at line 626

ERROR java.lang.NullPointerException: Cannot invoke method toInteger() on null object on line 626 (updated)

What is the extSource object?


Sorry. Moved icons to a location that can be used by multiple drivers to prevent duplication. Change your Icon location to here

Also corrected bug reported by @jon1 on line 626

A bug. I am maintaining two similar drivers and this was code from 'the other' driver that should not have been in this driver. It has been corrected.

the same NPE occurred at line 603

java.lang.NullPointerException: Cannot invoke method toInteger() on null object on line 603 (updated)

Corrected as of 2:58 pm EDT. I did NOT change the version #, Recopy code.


Are the condition codes all text or is there a number also associated with it? I had used condition code numbers with Apixu to turn on/off lights based on weather conditions.

I getting an error code400: Invalid request when I click on the link.

Sorry ... should have been more clear. Copy that link address into your preferences for the alternative icon location. It should find the icons there.


All text. There is a table towards the bottom of the code (line 859) to show all the options available.

Ah. Gotcha.
I clicked on it and assumed it would open a new window.
Copied the url in and it is working OK.
Thanks for the update.
Fantastic driver BTW.
Thanks again.

1 Like