J to the D Posted October 15, 2020 Share Posted October 15, 2020 I'm looking for some advice on how to configure wake up alarms. I currently have it set up that when the wake up alarm is triggered, if sunrise has taken place the blinds open. If sunrise has not happened there is a delay of 20 minutes before the blinds then open. What I would really like to do is have it set so the blinds open when sunrise takes place. This is how I'm thinking about it: If sunrise is true --> all blinds open If sunrise is false --> activate lighting scene, when sunrise becomes true --> all blinds open Is anyone able to share ideas on how I might do this? I did think of using the scheduler but I don't want the blinds opening at sunrise unless the alarm has gone off. Quote Link to comment Share on other sites More sharing options...
DLite Posted October 15, 2020 Share Posted October 15, 2020 If I'm understanding you correctly, you could achieve this as follows. First, define a boolean variable called, e.g., "SunriseBlinds" Next, define a scheduler event executing at midnight that sets SunriseBlinds equal to zero. Third, I would execute the following code in your wakeup alarm: 1. If sunrise is true, then open blinds; 2. If sunrise is false, then set the value of SunriseBlinds equal to one. Finally, set up a scheduler event that executes at Sunrise. In this event, run the statement, "If SunriseBlinds=1, then open blinds." Quote Link to comment Share on other sites More sharing options...
J to the D Posted October 15, 2020 Author Share Posted October 15, 2020 33 minutes ago, DLite said: If I'm understanding you correctly, you could achieve this as follows. First, define a boolean variable called, e.g., "SunriseBlinds" Next, define a scheduler event executing at midnight that sets SunriseBlinds equal to zero. Third, I would execute the following code in your wakeup alarm: 1. If sunrise is true, then open blinds; 2. If sunrise is false, then set the value of SunriseBlinds equal to one. Finally, set up a scheduler event that executes at Sunrise. In this event, run the statement, "If SunriseBlinds=1, then open blinds." This sounds like it would work, however I thought a boolean only allowed a true or false so how would you set a value? Am I missing something? Quote Link to comment Share on other sites More sharing options...
zaphod Posted October 15, 2020 Share Posted October 15, 2020 One useful tip I learned on here is to create a variable called IsDark. This gets set to True on Sunset and False on Sunrise. You can then use this to program around lighting, blinds, etc Quote Link to comment Share on other sites More sharing options...
South Africa C4 user Posted October 15, 2020 Share Posted October 15, 2020 11 minutes ago, zaphod said: One useful tip I learned on here is to create a variable called IsDark. This gets set to True on Sunset and False on Sunrise. You can then use this to program around lighting, blinds, etc Why not simply use the native scheduler condition, “if nighttime then...”? I use “if nighttime then” and have also used your method to create a variable called extended-nighttime which is set to true an hour before sunset and false an hour after sunrise and use “if extended-nighttime” even more than I use “if nighttime”. Quote Link to comment Share on other sites More sharing options...
zaphod Posted October 15, 2020 Share Posted October 15, 2020 I didn't know that "nighttime" existed. Quote Link to comment Share on other sites More sharing options...
DLite Posted October 15, 2020 Share Posted October 15, 2020 1 hour ago, J to the D said: This sounds like it would work, however I thought a boolean only allowed a true or false so how would you set a value? Am I missing something? Sorry for the lack of clarity. I assume 1=True and 0=False. Quote Link to comment Share on other sites More sharing options...
South Africa C4 user Posted October 16, 2020 Share Posted October 16, 2020 7 hours ago, DLite said: Sorry for the lack of clarity. I assume 1=True and 0=False. That would be correct. Quote Link to comment Share on other sites More sharing options...
South Africa C4 user Posted October 16, 2020 Share Posted October 16, 2020 8 hours ago, zaphod said: I didn't know that "nighttime" existed. It (and other useful conditionals) is (are) available by clicking on the schedule item under actions in programming. Quote Link to comment Share on other sites More sharing options...
zaphod Posted October 16, 2020 Share Posted October 16, 2020 4 minutes ago, South Africa C4 user said: It (and other useful conditionals) is (are) available by clicking on the schedule item under actions in programming. Got it, thanks. So it looks like Day time and Night time are the two that exist. And then you can program around Sunrise and Sunset for time. Then there are othe similar concepts when it comes to Day, Date, Month, etc. South Africa C4 user 1 Quote Link to comment Share on other sites More sharing options...
J to the D Posted October 16, 2020 Author Share Posted October 16, 2020 11 hours ago, DLite said: Sorry for the lack of clarity. I assume 1=True and 0=False. Ahh, that's what I thought. I have put this in so will test it out. Thanks for the guidance. Quote Link to comment Share on other sites More sharing options...
Neo1738 Posted October 17, 2020 Share Posted October 17, 2020 Don't even need a variable. Use ? If daytime open and else start a 20 min timer. only Else is that it's night time. For C4 daytime is sunrise to sunset and nighttime is sunset to sunrise. I would create a 20 min timer that will open blinds when it stops. Then programming would look like this. When alarm executes ? If daytime open blinds Else Start morning blinds timer Quote Link to comment Share on other sites More sharing options...
J to the D Posted October 17, 2020 Author Share Posted October 17, 2020 6 hours ago, Neo1738 said: Don't even need a variable. Use ? If daytime open and else start a 20 min timer. only Else is that it's night time. For C4 daytime is sunrise to sunset and nighttime is sunset to sunrise. I would create a 20 min timer that will open blinds when it stops. Then programming would look like this. When alarm executes ? If daytime open blinds Else Start morning blinds timer I had a timer originally but it didn't work very well because the curtains would sometimes open in complete darkness as we are getting into winter. This way the blinds will only open when sunrise has taken place. Quote Link to comment Share on other sites More sharing options...
Neo1738 Posted October 17, 2020 Share Posted October 17, 2020 9 hours ago, J to the D said: I had a timer originally but it didn't work very well because the curtains would sometimes open in complete darkness as we are getting into winter. This way the blinds will only open when sunrise has taken place. So instead of Else start morning blinds timer why not add a scheduler for sunrise daily to open blinds if alarm has executed? That could be created w a variable when alarm executes set to true at midnight every night set to false like was mentioned previously. When alarm executes ? If daytime Open blinds On scheduler Agent set to Sunrise daily then programming add ? If alarm variable is true Open blinds Quote Link to comment Share on other sites More sharing options...
J to the D Posted October 18, 2020 Author Share Posted October 18, 2020 7 hours ago, Neo1738 said: So instead of Else start morning blinds timer why not add a scheduler for sunrise daily to open blinds if alarm has executed? That could be created w a variable when alarm executes set to true at midnight every night set to false like was mentioned previously. When alarm executes ? If daytime Open blinds On scheduler Agent set to Sunrise daily then programming add ? If alarm variable is true Open blinds Yes, this is what I have done which seems to be working very well. Quote Link to comment Share on other sites More sharing options...
Home Theater Advisors Posted October 18, 2020 Share Posted October 18, 2020 I know you solved this, but another option is to set a long timer (like 2 hours)- when wake up executes? If daytime open blinds? If nighttime start timer- at sunrise? If timer is running - open blinds - stop timerSent from my iPhone using Tapatalk Quote Link to comment Share on other sites More sharing options...
malelan Posted October 19, 2020 Share Posted October 19, 2020 i don't want to hijack this, but is there a way to set blinds with lighting scenes? or any type of scene? in situations where you have multiple blinds and you want them to open and close in sync? Quote Link to comment Share on other sites More sharing options...
Neo1738 Posted October 19, 2020 Share Posted October 19, 2020 2 hours ago, malelan said: i don't want to hijack this, but is there a way to set blinds with lighting scenes? or any type of scene? in situations where you have multiple blinds and you want them to open and close in sync? Sure create advanced lighting seen then program when that scene is either active or invoked to open/close shades. Quote Link to comment Share on other sites More sharing options...
Cyknight Posted October 19, 2020 Share Posted October 19, 2020 2 hours ago, malelan said: i don't want to hijack this, but is there a way to set blinds with lighting scenes? or any type of scene? in situations where you have multiple blinds and you want them to open and close in sync? There's a Blind Group driver for this very purpose. General C4 driver than can combine most if not all blinds into groups for single control. Note that 'sync' is dependent on the drivers and devices themselves, the driver just gives singular control, but cannot control exact sync timing due to different response times etc. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.