Jump to content
C4 Forums | Control4

DarkSky Weather Integration


Recommended Posts

DarkSky

This driver provides easy access to weather at any given latitude and longitude. You can have multiple instances of the driver to fetch weather at different locations. Weather information updates every 30 minutes (by default) to allow for constant monitoring.

https://www.blackwiredesigns.com/store/control4-weather-information-darksky/

FEATURES

The driver currently provides the following weather information, stored as Control4 Variables:

  • Current temperature
  • Current humidity
  • Current precipitation probability
  • Current pressure
  • Current wind speed
  • Today’s high temperature
  • Today’s low temperature
  • Today’s precipitation probability
  • Today’s summary
  • Tomorrow’s high temperature
  • Tomorrow’s low temperature
  • Tomorrow’s precipitation probability
  • Tomorrow’s summary
  • Current summary
  • Hour summary
  • Day summary
  • Week summary
  • Full summary
  • Number of Current Alerts
  • Latest Alert Title
  • Latest Alert Description
  • Latest Alert Severity
  • Latest Alert Start
  • Latest Alert End

Other features include:

  • Programmatically fetching the weather
  • A programming event for when the weather has been fetched
  • User definable interval for automatically fetching the weather

USE CASES

Why do you need this driver? Well here are a couple of use cases.

  • You can make use of the summaries with our Text to Speech driver to, for example, announce the days weather at 8am every week day
  • If rain probability is less than X% tomorrow then turn on your sprinklers
  • Automatically turn down the thermostats if it’s a hot day

INSTALLATION

This driver requires a DarkSky API Key. You can get a key for free which provides 1000 requests a day and our driver checks for weather updates every 30 minutes automatically (48 requests a day) (although you can configure this to any value between 1 and 60). Once you have registered, verified your email and logged in you will see your secret key (API Key) displayed.

You can use the Find Lat/Long action to get the longitude and latitude of a location before you enter it in the driver properties.

Link to comment
Share on other sites


  • 2 weeks later...
6 hours ago, Cartnj said:

Shivam, can you post the basic instruction to announce the weather to all audio rooms and touch panels everyday at 6:30AM:

Using your "text to speech" and "darksky weather"

Both are installed and working properly

 

You'd want to setup a scheduler for 6:30am every day and then program something like:

Screenshot-2019-07-03-at-12.15.48.jpg

1112 in that example is the Device ID of the DarkSky driver. It will be something different in your project. You can find it by hovering over the driver in system design. Lines 3, 5 & 7 use Concatenate Variable to Text to Speak programming command. The other concatenate ones are Concatenate text to Text to Speak.

Link to comment
Share on other sites

On 7/13/2019 at 6:13 PM, Omar said:
7 hours ago, Shivam Paw said:

You'd want to setup a scheduler for 6:30am every day and then program something like:

Screenshot-2019-07-03-at-12.15.48.jpg

1112 in that example is the Device ID of the DarkSky driver. It will be something different in your project. You can find it by hovering over the driver in system design. Lines 3, 5 & 7 use Concatenate Variable to Text to Speak programming command. The other concatenate ones are Concatenate text to Text to Speak.

 

Thanks for the example. I guess I am missing a step..  when I press execute, it does not make any announcements in my code below

 

 

speak_weather.jpg

Link to comment
Share on other sites

22 minutes ago, Cartnj said:

Thanks for the example. I guess I am missing a step..  when I press execute, it does not make any announcements in my code below

Can I see your TTS driver announcement updated programming?

Link to comment
Share on other sites

Just now, Cartnj said:

This is my TTS programming

Your scheduler programming is wrong. You seem to have used the Concatenate text to Text to Speak programming command for the variables. You want to use Concatenate Variable to text to speak programming command. If that doesn't fix it please PM me a teamviewer ID & password and I can look into it for you. Thanks

Link to comment
Share on other sites

OK I got it working and its wicked Cool!!

I didn't realize I had to type out the actual words "Todays High Temp" etc.. 

Cant wait to wake the whole house up with the time date and weather at 6am!

IS there anyway to round up the weather numbers? the weather results come in as 93.56 degrees.. Hoping we can just have it say 93 or 94

 

Link to comment
Share on other sites

On 7/4/2019 at 5:21 PM, Shivam Paw said:
  • Latest Alert Title
  • Latest Alert Description
  • Latest Alert Severity
  • Latest Alert Start
  • Latest Alert End

Anything in here about snow fall?  Would be great if I could automate a few things based on knowing 1-2 hours before the snow starts to fall and when it ends vs knowing exactly when it starts.  The 1-2 hour preview to the snow would be important in my use case.

Thanks

Link to comment
Share on other sites

46 minutes ago, Cartnj said:

OK I got it working and its wicked Cool!!

I didn't realize I had to type out the actual words "Todays High Temp" etc.. 

Cant wait to wake the whole house up with the time date and weather at 6am!

IS there anyway to round up the weather numbers? the weather results come in as 93.56 degrees.. Hoping we can just have it say 93 or 94

 

Not with this driver im afraid, sorry! Although I can look into rounding it in a future update maybe

Link to comment
Share on other sites

39 minutes ago, eggzlot said:

Anything in here about snow fall?  Would be great if I could automate a few things based on knowing 1-2 hours before the snow starts to fall and when it ends vs knowing exactly when it starts.  The 1-2 hour preview to the snow would be important in my use case.

Thanks

It depends on your location etc. The alert sources are shown here: 

https://darksky.net/dev/docs/sources

 

Link to comment
Share on other sites

1 hour ago, Shivam Paw said:

It depends on your location etc. The alert sources are shown here: 

https://darksky.net/dev/docs/sources

 

I am in the USA

It mentions the API includes Snowfall, so that means I can get upcoming forecasts?

https://darksky.net/dev/docs#alerts

I have a small section of my patio that has a heated floor so we can get the dog outside easy without snow/ice but to make it effective it needs to warm up the surface a good 1-2 hours prior to snow fall.  right now I have to manually turn it on, would be nice if it turned on 1-2 hours prior to the start of snow fall if its expected to be say more than 2'' and turn off once the snow is over.

Link to comment
Share on other sites

2 hours ago, eggzlot said:

I am in the USA

It mentions the API includes Snowfall, so that means I can get upcoming forecasts?

https://darksky.net/dev/docs#alerts

I have a small section of my patio that has a heated floor so we can get the dog outside easy without snow/ice but to make it effective it needs to warm up the surface a good 1-2 hours prior to snow fall.  right now I have to manually turn it on, would be nice if it turned on 1-2 hours prior to the start of snow fall if its expected to be say more than 2'' and turn off once the snow is over.

I'm not sure how it would work with alerts. What I could do is add the "icon" property as a variable to the current weather variables. e.g. a "Current Weather Icon" variable which would have a value of either clear-day, clear-night, rain, snow, sleet, wind, fog, cloudy, partly-cloudy-day, or partly-cloudy-night.

You could then program of that but it wouldn't be giving you the 1-2 hours notice you need.

Link to comment
Share on other sites

1 hour ago, Shivam Paw said:

I'm not sure how it would work with alerts. What I could do is add the "icon" property as a variable to the current weather variables. e.g. a "Current Weather Icon" variable which would have a value of either clear-day, clear-night, rain, snow, sleet, wind, fog, cloudy, partly-cloudy-day, or partly-cloudy-night.

You could then program of that but it wouldn't be giving you the 1-2 hours notice you need.

thanks - so your notice would just be if its currently raining/snowing, etc?  no way to forecast that potential precipitation?  For my need I need the predictive part.  I could say if temp is below X and % of precipitation is above Y I can base some programming on assuming snow is going to come.

Link to comment
Share on other sites

1 hour ago, eggzlot said:

thanks - so your notice would just be if its currently raining/snowing, etc?  no way to forecast that potential precipitation?  For my need I need the predictive part.  I could say if temp is below X and % of precipitation is above Y I can base some programming on assuming snow is going to come.

I could probably put in a weather next hour icon as well or something. I'll have a look tonight and get back to you.

Link to comment
Share on other sites

Version 6 (uploaded now) has 4 new variables:

Weather Now, Weather in 1 Hour, Weather in 2 Hours, Weather in 3 Hours

The possible values for these variables are clear-day, clear-night, rain, snow, sleet, wind, fog, cloudy, partly-cloudy-day, or partly-cloudy-night.

:)

Link to comment
Share on other sites

Version 6 (uploaded now) has 4 new variables:
Weather Now, Weather in 1 Hour, Weather in 2 Hours, Weather in 3 Hours
The possible values for these variables are clear-dayclear-nightrainsnowsleetwindfogcloudypartly-cloudy-day, or partly-cloudy-night.

You are on fire w releases

Sent from my Pixel 3 using Tapatalk

Link to comment
Share on other sites

1 hour ago, Shivam Paw said:

Version 6 (uploaded now) has 4 new variables:

Weather Now, Weather in 1 Hour, Weather in 2 Hours, Weather in 3 Hours

The possible values for these variables are clear-day, clear-night, rain, snow, sleet, wind, fog, cloudy, partly-cloudy-day, or partly-cloudy-night.

:)

Thanks!

Link to comment
Share on other sites

Absolutely loving playing with the TTS driver combined with weather and other drivers.  What I am finding a bit weird is that for some drivers I need to use the proxy ID and for others I need to use the Device ID when concatenating into the TTS text.  I have no idea why this is. Not am issue (but worth knowing hence this post). One or other always works. There is probably a very good reason for this.  It is simply above my pay grade.

Link to comment
Share on other sites

On 7/27/2019 at 9:10 PM, South Africa C4 user said:

Absolutely loving playing with the TTS driver combined with weather and other drivers.  What I am finding a bit weird is that for some drivers I need to use the proxy ID and for others I need to use the Device ID when concatenating into the TTS text.  I have no idea why this is. Not am issue (but worth knowing hence this post). One or other always works. There is probably a very good reason for this.  It is simply above my pay grade.

I find it weird too tbh! But as far as I can tell, with the DriverWorks SDK it'll always be one or the other and I can't figure out a way to properly support any device. As a general rule, if it has a proxy ID, use that, if it doesn't, then use the device ID.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.