Jump to content
C4 Forums | Control4

Calculating Time...


JGLI

Recommended Posts

Is it possible to figure out a time in Control 4.  

If I want to do something at a certain time, and then calculate how much time is left until the next event and  use that different in an announcement, can it be done.

I.e,  If I know sunset is at 7PM, and someone pushes button at 5PM, can I play an announcement through speakers (with the Advanced Announcements Driver) that says "it is 5PM, sunset is in 2 hours at 7PM"?

Link to comment
Share on other sites


1 hour ago, Matt Lowe said:

@alanchow would it be able to announce the sunset time?

Only if you schedule it to read out the current time on a scheduled sunset event.  Ie it doesn't have the algorithm for calculating sunset built in.

Link to comment
Share on other sites

Only if you schedule it to read out the current time on a scheduled sunset event.  Ie it doesn't have the algorithm for calculating sunset built in.

Could this not be accomplished with your variable manipulator driver?

 

 

Happy Automating!

Link to comment
Share on other sites

So if I had an event each day called sunset, could I use your variable manipulator to work off that value to provide a "countdown" to sunset?

 

Alternatively could I get it from the hebcal driver?

Link to comment
Share on other sites

26 minutes ago, JGLI said:

So if I had an event each day called sunset, could I use your variable manipulator to work off that value to provide a "countdown" to sunset?

 

Alternatively could I get it from the hebcal driver?

Our hebcal driver fires events at candle lighting and havdalah. You can offset these events by x minutes as well using the driver.  Not sure if that is what you are trying to do.

Link to comment
Share on other sites

  • 4 months later...

Resurrecting this thread.  Do any of your drivers have the ability to grab the current time and then perform math on it?

i.e., assume its 1PM. hypothetical values are in []

I'd like to be able to do the following:

Time now:=Current Time [1PM]

Sunset:=Sunset [8PM]

TimeUntilSunset:= Sunset [8PM]-Current Time[1PM]

TimeUntilSunset would then be [7 Hours or 420 minutes]

Then pass TimeUntilSunset to the Advanced Announcement Driver.

Link to comment
Share on other sites

43 minutes ago, dcovach said:

There is an older driver for extracting system time and a calculator driver for doing complex math (yatun site).  I will get back to you if this does what you want.

That's what I'm looking for as well as getting other times (like Sunset).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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