JGLI Posted March 24, 2017 Share Posted March 24, 2017 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 More sharing options...
Matt Lowe Posted March 26, 2017 Share Posted March 26, 2017 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. Link to comment Share on other sites More sharing options...
alanchow Posted March 26, 2017 Share Posted March 26, 2017 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. Link to comment Share on other sites More sharing options...
Matt Lowe Posted March 26, 2017 Share Posted March 26, 2017 @alanchow would it be able to announce the sunset time? Link to comment Share on other sites More sharing options...
alanchow Posted March 26, 2017 Share Posted March 26, 2017 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 More sharing options...
VINCELdUB Posted March 27, 2017 Share Posted March 27, 2017 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 More sharing options...
alanchow Posted March 27, 2017 Share Posted March 27, 2017 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 Link to comment Share on other sites More sharing options...
JGLI Posted March 27, 2017 Author Share Posted March 27, 2017 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 More sharing options...
alanchow Posted March 27, 2017 Share Posted March 27, 2017 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 More sharing options...
JGLI Posted August 9, 2017 Author Share Posted August 9, 2017 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 More sharing options...
dcovach Posted August 9, 2017 Share Posted August 9, 2017 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. Link to comment Share on other sites More sharing options...
msgreenf Posted August 9, 2017 Share Posted August 9, 2017 I think @alanchow has a driver to do this Link to comment Share on other sites More sharing options...
JGLI Posted August 9, 2017 Author Share Posted August 9, 2017 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.