Jump to content
C4 Forums | Control4

C4 cloud cover driver


net_tech

Recommended Posts

Hi,

I have a beta version of a C4 driver to obtain cloud cover for any location on the map. If you want to trigger an event on a cloudy day and don't have a light sensor, this could be a solution. Since this is a first release I don't recommend adding this driver to your customer controllers at this time. I still have a few minor issues to work out and also need to write documentation. 

The driver uses https://www.tomorrow.io/ API to retrieve the current cloud cover for the latitude and longitude obtained from the project, however values can be manually changed. 

You must register with https://app.tomorrow.io/signup to get an API Key which you will need add to the driver. The Free plan is good for 500 API calls per day / 25 calls per hour / 3 calls per second. If you are paranoid and need to make more API calls, a paid plan is available. I have no affiliation with tomorrow.io, just found their service to be the most reliable.

The driver was only tested on 3.2.2 and is not guaranteed not work on anything older.

Please don't share your API Key (The key shown below is for illustration only, don't try to use it in your system as it's invalid.)

drv.jpg.2f87762471d3d189a5ff09b5bc4203bf.jpg

HTTP GET is a required command before you set up any conditions. If configured correctly HTTP GET will update the CloudCover field in the driver when driver is called. 

drv1.jpg.62ea39773ef94b3fc85ea2d86179accd.jpg

When you set up a condition for the driver, Cloud cover value will not display in the Actions, PARAM2 will show instead. (I am still working on this problem)
At this time you can only see the selected value if you enable the debug on the driver. 

cond.jpg.ea20b457b03d648d5c979e95de7d1823.jpg

Feel free to post your results here or email us directly if you have any problems with the driver.

 

 

Link to comment
Share on other sites


Well, u are attachig the programing of the Cloud Cover to the blind, I get that, but its a bit odd, right? I need to turn off the Outdoor Plugs when its going to rain, so, How do I do that?  Its not that easy with your current setup and I have to repeate the same with every plug out there, or am I missing something?

Link to comment
Share on other sites

@Amr can you please share a snippet of your programming so I have better understanding of how you have it set up, but in my case I was gonna create a schedule for every hour and update the cloud cover value. In your case getting precipitation value may be a better option as it does not always rain on a cloudy day. I will publish an updated version of the driver this week, but not sure if it's a best option for you. Either way give it a shot and let me know what you think would make it work for your application. 

Link to comment
Share on other sites

15 minutes ago, net_tech said:

@Amr can you please share a snippet of your programming so I have better understanding of how you have it set up, but in my case I was gonna create a schedule for every hour and update the cloud cover value. In your case getting precipitation value may be a better option as it does not always rain on a cloudy day. I will publish an updated version of the driver this week, but not sure if it's a best option for you. Either way give it a shot and let me know what you think would make it work for your application. 

This is what I did, but will have to wait and see if it will actually work

Schedule.PNG

Get Cloud.PNG

Program.PNG

Condition.PNG

Link to comment
Share on other sites

It's available in their API  https://www.tomorrow.io/data-catalog/core/.  Obviously each value will have its own field, which one would make more sense for your implementation ?

Precipitation Intensity
The amount of precipitation that falls over time, covering the ground in a period of time

Precipitation Type (not available with all plans)
The various types of precipitation often include the character or phase of the precipitation which is falling to ground level

Precipitation Probability
The chance of precipitation that at least some minimum quantity of precipitation will occur within a specified forecast period and location

Precipitation Accumulation (not available with all plan)
The amount of liquid precipitation accumulated over a specified time period over a specified area

Link to comment
Share on other sites

1 hour ago, net_tech said:

@Amr your Outdoor will turn off if the cloud over is over 50% at sunset. Is the 0 correct for your location currently ? 

This what I get after I pulled the data after I but the API, so I got it now, I have to define my parameter not ☁️, I can see they have webhooks as well

Link to comment
Share on other sites

1 hour ago, net_tech said:

It's available in their API  https://www.tomorrow.io/data-catalog/core/.  Obviously each value will have its own field, which one would make more sense for your implementation ?

Precipitation Intensity
The amount of precipitation that falls over time, covering the ground in a period of time

Precipitation Type (not available with all plans)
The various types of precipitation often include the character or phase of the precipitation which is falling to ground level

Precipitation Probability
The chance of precipitation that at least some minimum quantity of precipitation will occur within a specified forecast period and location

Precipitation Accumulation (not available with all plan)
The amount of liquid precipitation accumulated over a specified time period over a specified area

Probability l Believe 

Link to comment
Share on other sites

On 9/29/2021 at 6:10 AM, Neo1738 said:

Chowmains Openweather agent has cloud cover, wind, hi/low temperature, humidity, precipitation, and expected for all of those. It is a paid driver but I use it for many things like blinds up in the morning, wind over x amount turn off the fountain, etc. 

 

Yes this is what am using now, they also comes with DarkSky which is RIP now after Apple’s acquisition

Link to comment
Share on other sites

  • 3 weeks later...

Version 105 is out. 

Resolved logic problems and added retrieval time to the driver to show when weather info was obtained. 

In our tests we found that a 10 sec delay is enough to allow the driver to update the fields.

get-act.jpg

 

Edited by net_tech
removed old driver build
Link to comment
Share on other sites

fwiw, if this isn't working for you, double check the lat and long values in the Properties screen. Also, the tomorrow.io api had a bug with cloud cover which got fixed today - so if this didn’t work prior, try again!

Edited by cjh
Updated cause of error being returned
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.