Posted March 24, 20178 yr 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"?
March 26, 20178 yr you can likely just have the announcement just tell you the time for things. I believe @alanchow his advanced announcements drivers can handle that easy.
March 26, 20178 yr Just now, Matt Lowe said: you can likely just have the announcement just tell you the time for things. I believe @alanchow his advanced announcements drivers can handle that easy. the driver will only tell you the current time.
March 26, 20178 yr 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.
March 27, 20178 yr 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!
March 27, 20178 yr 1 hour ago, VINCELdUB said: Could this not be accomplished with your variable manipulator driver? Happy Automating! Probably but it would be a long function. Heres the algorithm https://gist.github.com/Tafkas/4742250
March 27, 20178 yr Author 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?
March 27, 20178 yr 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.
August 9, 20177 yr Author 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.
August 9, 20177 yr 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.
August 9, 20177 yr Author 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).
Archived
This topic is now archived and is closed to further replies.