[RELEASE] DarkSky.net Weather Driver
DarkSky has been acquired by Apple (Apple Acquires Weather App Dark Sky - MacRumors). Before proceeding with this driver make sure you either already have your API Key, or can get one, before they stop issuing those. The API will continue through the end of 2021, then it will not be available and this driver will no longer function.
By Adam Grossman on July 1, 2020.
Update: Service to existing users and subscribers of the Android app will now continue until August 1, 2020, at which point the app will be shut down. Subscribers who are active at that time will receive a full refund. Weather forecasts, maps, and embeds available on the Dark Sky website will also shut down on August 1, 2020.
There has been a lot of requests for a Darksky.net weather driver, especially since the announcement that Weatherstack (formerly known as ApiXU.com) is making significant detrimental changes to the free api. I had driver for those who have their own Personal Weather Station PWS) and use Weather-Display software, so it was not hard to make a version of that driver that uses only DarkSky.net data .... and this driver is just that. No PWS required.
Many people contributed to the code within this driver. Significant contributors include:
- @Cobra who adapted it from @mattw01's work and I thank them for that!
@bangali for his original APIXU.COM base code that much of the early versions of this driver was
@bangali for his the Sunrise-Sunset.org code used to calculate illuminance/lux and the more
recent adaptations of that code from @csteele in his continuation driver 'wx-ApiXU'.
- @csteele (and prior versions from @bangali) for the attribute selection code.
- @csteele for his examples on how to convert to asyncHttp calls to reduce Hub resource utilization.
@bangali also contributed the icon work from
jebbett (Jake) · GitHub for new cooler 'Alternative' weather icons with icons courtesy
of VClouds Weather Icons by VClouds on DeviantArt.
In addition to all the cloned code from the Hubitat community, I have heavily modified/created new code myself @Matthew (Scottma61) with lots of help from the Hubitat community. If you believe you should have been acknowledged or received attribution for a code contribution, I will happily do so. While I compiled and orchestrated the driver, very little is actually original work of mine.
Latitude and Longitude are pulled from the Hub. Make sure your Latitude and Longitude are set properly in your Hub settings. These are used both for the Sunrise/Sunset times and the DarkSky forecast location.
The driver exposes a default set of attributes for weather capabilities:
Plus a small set of 'Required for Dashboard' attributes (used by SmartTiles/SharpTool.io, and maybe some others)
There are many other 'optional' attributes that can be selected if you need those exposed. It is best to keep those off if you do not require them as they will increase the Hub database size if selected. You can turn 'on' the 'Display All Preferences' then hit 'Save Preferences' to expose the optional attributes. Turn on those you want, turn off those you no longer want, then 'Save Preferences' again. You can turn off 'Display All Preferences' then 'Save Preferences' to hide those options and reduce the clutter on the driver display. NOTE: You do NOT have to select the optional attribute to allow those specific attributes to show in either the 'myTile' or 'weatherSummary' attributes (e.g. 'alert' will show in myTile and weatherSummary even if it is not selected). Optional attributes include:
- alert -- Display any weather alert?
- betwixt -- Display the 'slice-of-day'?
- cloud -- Display cloud coverage %?
- condition_code -- Display 'condition_code'?
- condition_icon_only -- Display 'condition_code_only'?
- condition_icon_url -- Display 'condition_code_url'?
- condition_icon -- Dislay 'condition_icon'?
- condition_iconWithText -- Display 'condition_iconWithText'?
- condition_text -- Display 'condition_text'?
- dewpoint -- Display the dewpoint?
- fcstHighLow -- Display forecast High/Low temperatures?
forecast_code -- Displays 'forecast_code'?
forecast_text -- Displays 'forecast_text'?
- illuminated -- Display 'illuminated' (with 'lux' added for use on a Dashboard)?
- is_day -- Display 'is_day'?
- localSunrise -- Display the Group of 'Time of Local Sunrise and Sunset,' with and without Dashboard text?
- myTile -- Display 'mytile'?
- moonPhase -- Display 'moonPhase'?
- nearestStorm -- Display the neastestStorm data?
nearestStormBearing -- Display 'nearestStormBearing'?
nearestStormCardinal -- Display 'nearestStormCardinal'?
nearestStormDirection -- Display 'nearestStormDirection'?
nearestStormDistance -- Display 'nearestStormDistance'?
- ozone -- Display 'ozone'?
- percentPrecip -- Display the Chance of Rain, in percent?
- summarymessage -- Display the Weather Summary?
- precipExtended -- Display precipitation forecast?
- obspoll -- Display Observation and Poll times?
- vis -- Display visibility distance?
- wind_cardinal -- Display the Wind Direction (text initials)?
- wind_degree -- Display the Wind Direction (number)?
- wind_direction -- Display the Wind Direction (text words)?
- wind_gust -- Display the Wind Gust?
- wind_string -- Display the wind string?