JGLI Posted November 7, 2017 Share Posted November 7, 2017 So I'm trying to set the status of something based on when Sunset is. If we are in Standard Time, I'd like one of my macros to set a time for 10:30PM, but if we are in DST time, I want it to run at 11:30PM. I could even based it on Sunset - if Sunset is greater than 6PM then 11:30PM = true, else 10:30 PM is true. This should be easy but I can't figure out how to do it. Link to comment Share on other sites More sharing options...
C4 User Posted November 7, 2017 Share Posted November 7, 2017 1.Set up schedule to run each day at Sunset and set “winter” variable to true if Sunset is earlier than 6pm and false if Sunset is 6pm or Later 2. Set up schedule to run each day at 10:30pm, and if “winter” is true, then... 3. Set up schedule to run each day at 11:30pm, and if “winter” is false, then... Link to comment Share on other sites More sharing options...
JGLI Posted November 7, 2017 Author Share Posted November 7, 2017 thanks. Link to comment Share on other sites More sharing options...
JGLI Posted November 7, 2017 Author Share Posted November 7, 2017 OK, I already have the event that runs at sunset (this is for Sabbath programming). How does one implement "set “winter” variable to true if Sunset is earlier than 6pm and false if Sunset is 6pm or Later". Where/how do you say "current time < 6PM". Link to comment Share on other sites More sharing options...
JGLI Posted November 7, 2017 Author Share Posted November 7, 2017 C4 User, how does one test whether Sunset is before or after a time? Link to comment Share on other sites More sharing options...
eddy.trochez Posted November 7, 2017 Share Posted November 7, 2017 You can accomplish what you want, have a variable change to True or False depending on what time sunset is. Just curious, why does it matter? Sunset is sunset. Link to comment Share on other sites More sharing options...
Cyknight Posted November 7, 2017 Share Posted November 7, 2017 WHEN schedule - sunset executes IF time <= 18:00 set variable to true IF time > 18:00 set variable to false {now add any other programming after this} But if you're doing Sabbath programming, I'd look here : https://www.drivercentral.io/platforms/control4-drivers/hebcal-jewish-calendar-control4-driver-chowmain/ Link to comment Share on other sites More sharing options...
JGLI Posted November 8, 2017 Author Share Posted November 8, 2017 6 minutes ago, Cyknight said: WHEN schedule - sunset executes IF time <= 18:00 set variable to true IF time > 18:00 set variable to false {now add any other programming after this} But if you're doing Sabbath programming, I'd look here : https://www.drivercentral.io/platforms/control4-drivers/hebcal-jewish-calendar-control4-driver-chowmain/ Thanks. I'm the guy who asked Alan to write the driver. Where/how does one find the IF time functions? I can't seem to locate them.... Link to comment Share on other sites More sharing options...
Cyknight Posted November 8, 2017 Share Posted November 8, 2017 4 minutes ago, JGLI said: Thanks. I'm the guy who asked Alan to write the driver. Where/how does one find the IF time functions? I can't seem to locate them.... Oh I've no doubt there's MORE than one who asked that. IF (time) is found under scheduling. Link to comment Share on other sites More sharing options...
JGLI Posted November 8, 2017 Author Share Posted November 8, 2017 Ugh, thanks. Link to comment Share on other sites More sharing options...
JGLI Posted November 8, 2017 Author Share Posted November 8, 2017 Here's my code, can't believe how easy that was. This code is what runs if forget to set the house before candle lighting (I usually set it in the pantry with a keypad before I leave for shul, but sometimes I'm in a rush and my wife is still getting the meal ready and doesn't want to have to think about any of this stuff). My long term goal is to have this completely automated with another set of switches in my basement office with default times. Alan and I had a lot of back and forth to get the driver working and found out that my time zone wasn't set properly, so I wasn't able to use this driver with all of this autumn's holidays. The next batch is Passover. The goal would be for the system to automatically enter to Sabbath mode and be able to handle any of our multiple day events. The challenge is to make sure the system doesn't "leave" the Sabbath mode early if another holiday is coming right after the one you are in. The other challenge is to be able to set different time events for each of the possible days (day 1, 2 or 3). I've already have variables for holidays where odd things happens (Sukkhot - outdoor lights going on and off- Shavuot to handle the all nighter on the first evening). When I get this all ironed out I'll write up and post a white paper. Many of the guys who right the code aren't actually using/living with it, so my experiences should help a non-observant person create a system for someone who is. Many people but not aware of what can be done with the various technologies that are out there that can make the keeping of the holidays and Sabbath easier. Thanks again for the help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.