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

Found the temps used by the darksky website in the API fields
temperatureMin
temperatureMax

Kind of confusing, my preference is to match the website info and use those fields vs
temperatureLow
temperatureHigh

Are you up for another option or changing the low and high source fields? :innocent:

I'll consider it, but I don't have time right now (today) to research or commit to that. Is the difference the time of day (4AM - 4AM vs midnight to midnight)? A lot of others use this driver too so, I'd like to make sure there isn't a significant objection to this change. It makes sense to me .... but I don't know if there may be any down-sides I have not considered.

If anyone has strong opinions (either way), please share them. Thanks.

I don’t have a strong opinion on this but I really love what you’ve provided here and it does seem logical to have the website data matching the 3 day forecast.
With them being different, I can see the question coming up again and again.

2 Likes

[UPDATED]
V1.3.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'.

  • Corrected one decimal formatting in the 'weatherSummary' that was missed in the recent update (thanks @arnb) .

3 Likes

Hi Matthew,
I noticed this on the driver page after I updated to the latest release....
image

Thanks. I have updated my version checking file. Open the driver click the 'Save preferences' button and it should update.

1 Like

[UPDATED]
V1.3.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 details 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

2 Likes

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

Probably. If you create a rule in rule machine with a custom attribute trigger, what do you see listed when you select your darksky weather device?

Would this work ?

Here is mine ....

2 Likes

Thanks this is helpful.

I’m not using a global variable.

Would running an event below work?

Weather Alert: %alert%

Did you try it?

My guess is that it will not work because %alert% is a global variable ... so if you are not using a global variable and did not set %alert%'s value then it will not work.

Yeah didn’t work.

So I setup a local variable like your example.

It’s now working. Thanks for the help!

Do you have any examples for upcoming rain ?

Nothing for Rule Machine. I look at the tiles (below) You could set up a rule that if the PoP is greater than x%, speak a rule. Lots of issue with that, like if it exceeds your threshold it will never stop triggering...... I am sure there is a way to limit that in Rule Machne, but I have never done it.

image
image
image

Okay fair enough.

Stupid question but where are you pulling that display info from? Dashboard ?

Reading is your friend. This has been discussed several times in this thread. Those three images are 'tile' attributes in the driver. They are 'myTile', 'threedayfcstTile' and 'weatherSummary'. You can show those on any dashboard, like any other attribute, by selecting driver, then the template 'Attribute', then the attribute you want in that dashboard tile. Several examples showing how this is done are in this thread.

4 Likes

Should your dashboard be short of screen real estate and the mytile, 3day, or summary tile is truncated, it can be made to scoll as follows;

  1. get the tile id for the element
    In windows an easy way to do this using Chrome, place the cursor over tile element, right click, select Inspect. HtML source displays, get tile element id.

  2. Display the dashboard page, Click gear on tile's dashboard.
    Click advanced
    Click CSS
    add the following
    #tile-n {overflow: auto !important;}
    replace 'n' above with your tile number Won't work without important
    Click Save

  3. (update) You also probably want to get rid of the fixed position device id on the bottom of the tile by adding the following CSS
    #tile-n>.tile-title {visibility: hidden;}

  4. Shows scroll bars on non-touch screens as needed. Smooth scrolls on touch screens

Sample Html to look for
<div id="tile-2" class="tile attribute h-full" style="grid-area: 1 / 1 / 3 / 4; font-size: 9px; border-radius: 4px; background-position: center center; background-repeat: no-repeat; background-size: cover; overflow: hidden;"><div class="tile-contents"><div class="tile-secondary"> myTile </div><div class="tile-primary" style="font-size: 13.5px;"><span style="display:inline;"><a href="https://darksky.net/forecast/4x.xxxx,-7x.xxxx">Someplace, NJ</a><br>Clear | <span><a style="font-style:italic;color:red;" href="https://alerts.weather.gov/cap/wwacapget.php?x=NJ125F3FC63F94.SpecialWeatherStatement.125F3FC77D8CNJ.PHISPSPHI.92450720d95b4d609c891a38178d76ea">Special Weather Statement</a></span><br> 41°F<img src="https://tinyurl.com/y6xrbhpf/32.png" style="height:1.5em;display:inline;"> Feels like 36°F<br></span><span style="font-size:.9em;"><img src="https://tinyurl.com/y6xrbhpf/wb3.png">North-Northwest @ 9 MPH, gusts @ 18 MPH<br><img src="https://tinyurl.com/y6xrbhpf/wb.png">30.11 inHg <img src="https://tinyurl.com/y6xrbhpf/wh.png">43% <img src="https://tinyurl.com/y6xrbhpf/wu.png">8%<br><img src="https://tinyurl.com/y6xrbhpf/wsr.png">06:29 <img src="https://tinyurl.com/y6xrbhpf/wss.png">17:50 Updated: 16:57<br></span></div></div><!----></div>

4 Likes

[UPDATED]
V1.3.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