[RELEASE] Weather-Display With DarkSky.net Forecast Driver

[UPDATED]
V4.4.2
02/24/2020 ~8:20 PM EDT

I think I have the "java.lang.NullPointerException: null (updateLux)" bug squashed. I have been running with no error on both this version and the NON-PWS version. Please report any further errors you may get.

Thanks.

[UPDATED]
V4.4.3
02/26/2020

Changes:

Logging
Reduced default logging to display only warnings and errors (no polling events) and a few other infrequent events (switching between Daytime and Nighttime scheduling). You may turn on 'Extended Logging' to see more details (like polling event details). Extended logging will automatically turn itself off after 30 minutes. The driver's Current States or dashboard items for attributes 'myTile' and 'weatherSummary' show the last update times as an easy reference to when the data was updated, although if you poll at different frequencies between your Weather-Display and Dark Sky you will not be able to distinquish which one last updated. In that case you may also turn 'on' the optional 'Observation Time' attribute to update and show the poll times in the Current States listing so you may see the individual polling update times.

Refresh
The 'refresh' capability/command will no longer force a poll of either Weather-Display or Dark Sky data, unless there is a change required for the Daytime/Nighttime scheduling. If you want to force a poll of Weather-Display and Dark Sky data use the 'pollData' command. If you are currently forcing a poll by using a Rule Machine custom action on the 'refresh' command, you should switch that to a custom action on 'pollData' to force a Weather-Display and Dark Sky poll.

Various code cleanups and minor bug fixes.

[UPDATED]
V4.4.4
02/27/2020

Changes:

  • Changed the forecast temperature polled from Dark Sky from 'temperatureHigh' and 'temperatureLow' to 'temperatureMax' and 'temperatureMin'. This change now allows the values to match what Dark Sky shows on their website for the same location. This should not require any user changes as the Dark Sky API variable names are not used in the driver other than to pull in those values. The new Dark Sky variable values continue to be pulled into the same driver attributes names so no changes will be required by the users of this driver. This change was recommend by @arnb .... Thanks.

  • Added the update time to the bottom of the 'threedayfcstTile'.

[UPDATED]
V4.4.5
02/28/2020

Changes: (inspired by @arnb)

Lots of 'behind the scences' changes to myTile and some that will be noticable:

  • Greatly reduced the html coding used for formatting the tile. This freed up space for some enhancements.
  • The location name at the top on 'myTile' is now a hyperlink that will take you to you hub location's weather details on Dark Sky's website.
  • If there is a weather alert, it will show in red italics. That weather alert will also be a hyperlink to the weather.gov alert details page. Those weather.gov links can be quite long, but the reduced formatting mentioned above should prevent exceeding the 1,024 character limit in most cases. If it does exceed the limit, the hyperlink will first revert to the Hub location's weather details page on Darsky.net where you can get details on the alert, and if it still exceeds the character limit, the hyperlink will be omitted.
  • Added a new 'alertTile' (second image below) that will just list weather alerts (or 'No current weather alerts for this area.'). Hyperlinks will take you to the hub location's weather details page on Darksky.net for no alerts, or the weather.gov alert details page if there is an alert.
  • Added a hyperlink to the 'threedayfcstTile' on the 'Today' text that will take you to the hub location's weather detail page on Darksky.net

Black circled text is a hyperlink to the hub location's weather detail page.
Red circled text is a hyperlink to weather.gov's alert detail page.
image
image
image

1 Like

Is there anyway to create a rule that will trigger TTS if it shows weather alert ?

Re-posting this here as this is relevant to this driver too.

[UPDATED]
V4.4.6
03/01/2020

First update since last month! :rofl:

Changes:

  • All hyperlinks added in the last update will now open in a new tab/window instead of replacing the current tab/window.
  • Removed some spacing in the alertTile to make it easier to fit in a 1x1 tile. Removed the 'green' color for no alerts. At least on my displays/screens it has blurry and hard to read.
  • Some minor tweaking to further reduce the code size and therefore reduce the likelihood of exceeding the dashboard tile character limitation and any mitigation required in that event (removing icons & links).
1 Like

Seeing this error:

2020-03-01 06:31:57.393 pm errorjava.util.IllegalFormatConversionException: f != java.lang.Integer on line 519 (pollWDHandler)

[NOTICE]

I made a small change in the code to correct the error that @CurtisZM was seeing at around 6:15 PM EDT. If you copied the code before then, please refresh your code to get this change.

[UPDATE]
V4.4.7
03/20/2020

Changes

  • Added the ability to override the Hub's location coordinates.
  • Corrected the data type for forecastHigh/Low from "string" to "number"

To override the Hub's location coordinates first select:
image
then click "Save Preferences"
then after the screen refreshes input your desired latitude and logitude:
image
image
then click "Save Preferences" again.

To revert back to the Hub's location coordinates de-select:
image
then click "Save Preferences"

[UPDATED]
V4.4.8
03/22/2020

Changes:

  • Added some additional logging messaging to show the full URL sent to Darksky if the data pull is not sucessful. This should make it easier to identify errors.
  • Added code to remove any 'spaces' typed or copied into the latitude or longitude corrdinate fields. Any spaces in these fields will cause an error in the Darksky data pull.

[UPDATED]
V4.4.9
03/26/2020

Changes:

  • Add more logic to prevent location coordinates being null or provide better logging when that cannot be prevented (hub's location coordinates are null).

Summary:
At some point they will stop issuing API Keys and the API will only continue to work through 2021.

Balls!

Yeah, that's not good news.
All the free Weather API's are drying up.

I found one that allows up to 150 calls a day (~every 10 mins) that looks like it will work pretty well for current conditions and daily forecasts at least. It's weatherbit.io. I got a key and gave it a whirl in less than 5 mins. And they don't require a credit card to sign up for a free account. I'm sure they just shut down your access after your 150 calls.

Here's the docs on their api:
https://www.weatherbit.io/api

UPDATE: Actually, I found that it allows 500 calls a day for a free account. So, you could do a call every 3 minutes if you really wanted.

1 Like

[UPDATE] ( not really ... but kinda?)

No code update ....but the driver is now compatible with the Hubitat Package Manager in the 'Integrations' category.

[UPDATED]
V4.5.1
04/22/2020

Changes:

  • Bug fixes from refactored coding.

the driver is now compatible with the Hubitat Package Manager in the 'Integrations' category.

FYI to everyone using this driver:

I have created a version of this driver that replaces DarkSky.net as the forecast source with OpenWeatherMap.org and the (National Weather Service (weather.gov) for weather alerts).
Just about everything works the same, it just changes the forecast source. That driver is in a new thread here:

Does this one pull for Canadian areas? Does it also include the lux readings?