TJF1960 Posted March 27, 2010 Posted March 27, 2010 The motion detector has a dusk/dawn detector that can be set as well. However, as you know, this may not work if the light is in the room with the motion detector, because the dusk dawn sensor may reset after the light is on for about 4 minutes (in my case). This was the problem I had on my driveway sensor. For what its worth it, the newest MS with the adjustment pot.'s for d/d and timeout (v2.0 or 2.1 can’t remember which) do not evaluate the d/d now until after the no motion / timeout period, which is nice.
Goose66 Posted March 27, 2010 Posted March 27, 2010 I wish they had offered an upgrade for those, similar to the V2 thermostat adapter.
Goose66 Posted March 29, 2010 Posted March 29, 2010 In furtherance of the OP's original question: Since, as discussed above, the motion program gets evaluated at both an ON from the sensor AND at Sunset and Sunrise, why not put an OFF command in the Else brach of the program to handle the boundary condition. If From Sunset To Sunrise (next day) And Control 'Outdoor / Driveway Motion-Sensor' is switched On Then Set Scene 'Outdoor / Driveway Floods on Motion' On Wait 8 minutes Set Scene 'Outdoor / Driveway Floods on Motion' Off Else Set Scene 'Outdoor / Driveway Floods on Motion' Off This way, unless there is a motion sensor ON sent precisely at Sunrise, the flood light will be turned off at Sunrise and subsequent ONs from the motion sensor will be ignored. This seems to handle the boundary condition without the need for another program. Thus you have 1 program to respond to your motion sensor instead of 3, and no need for folder conditions.
Goose66 Posted March 29, 2010 Posted March 29, 2010 Here is another example of where I need to be able to specify trigger conditions seperately from IF conditions: I want to setup a program that triggers at 6:50 AM every morning and turns on a scene with a 8 minute ramp up of lights in my bedroom (an alarm clock). I don't want to do it if its at least 30 minutes after sunrise, however, because I will presumeably already be awaken by the light from outside. So what I want is: Trigger: Time is 6:50 AM IF: > 30 Minutes after sunrise Then: Turn on Wakeup Scene Here is what I got: If On Mon, Tue, Wed, Thu, Fri From 6:50:00AM To Sunrise + 30 minutes (same day) Then Set Scene 'Master Suite / Wakeup' On Else - No Actions - (To add one, press 'Action') I have no idea what the outcome of this will be? If Sunrise +30 occurs before 6:50:00AM, will the IF statement become True and turn-on the scene? This may be a good one for a folder with a Sunrise + 30 condition. But, then I would have to have a folder for every different status time I might want to check. If I could split this into a trigger (time is 6:50) and a status check in the IF statement (Time is < Sunrise + 30 min, that would be ideal.
oberkc Posted March 29, 2010 Posted March 29, 2010 I want to setup a program that triggers at 6:50 AM every morning and turns on a scene with a 8 minute ramp up of lights in my bedroom (an alarm clock). I don't want to do it if its at least 30 minutes after sunrise, however, because I will presumeably already be awaken by the light from outside. As I understand "from/to", the program will execute the "then" condition at the from time, and the else condition at the to time. Given this, I don't think you need to use the from/to condition. How to you turn off your scene? Manually? If you are not going to use this program to turn off the scene, then I think you can achieve your stated goals by: if On Mon, Tue, Wed, Thu, Fri Time = 6:50:00AM and Time before sunrise + 30 minutes (same day) Alternatively, you could create a program folder that is active from some early time (say 0300) until sunrise + 30 (same day) and put the following program in it if On Mon, Tue, Wed, Thu, Fri Time = 6:50:00AM I hope I am not missing something.
Goose66 Posted March 29, 2010 Posted March 29, 2010 If don't think you can specify "Time Before Sunrise + 30 minutes (same day)." You could say: On Mon, Tue, Wed, Thu, Fri Time is 6:50:00AM AND Time is Sunrise - 30 minutes but that condition would never be true unless Sunrise - 30 minutes occured exactly at 6:50 AM. The folder option could be done, but that is a layer of complexity not desired. What I wound up with was: If On Mon, Tue, Wed, Thu, Fri Time is 6:50:00AM And From 12:00:00AM To Sunrise + 30 minutes (same day) Then Set Scene 'Master Suite / Wakeup' On Else - No Actions - (To add one, press 'Action') The drawback to this solution is that the program runs at 6:50 AM (as intended) but also runs at 12:00 AM and Sunrise + 30, setting the last program result to false. If I wanted to determine if the scene was actually turned on at 6:50 at some later time in the day, I would be out of luck. Again, just trying to document for everyone the virtues of being able to seperate trigger conditions from IF statements.
Sub-Routine Posted March 29, 2010 Posted March 29, 2010 I would use the folder (say 0300) until sunrise + 30 (same day) as oberkc suggests. Within the folder you could have programs based on days and/or dates (or device statuses, etc.) to use different times. Or within that folder, folders with date constraints containing programs with days or vice-versa. So you have IF: > 30 Minutes after sunrise Trigger: Time is 6:50 AM Then: Turn on Wakeup Scene instead of Trigger: Time is 6:50 AM IF: > 30 Minutes after sunrise Then: Turn on Wakeup Scene placing the schedule condition before the trigger to limit when the trigger is active. So the schedule cocks the hammer and the trigger fires the action. Rand Alternatively, you could create a program folder that is active from some early time (say 0300) until sunrise + 30 (same day) and put the following program in it if On Mon, Tue, Wed, Thu, Fri Time = 6:50:00AM I hope I am not missing something.
Goose66 Posted March 29, 2010 Posted March 29, 2010 I probably could experiment with this, but I will just ask instead: If a program is in a folder with a condition, and the program is triggered while the folder condition is true, then the folder condition subsequently becomes false, does the program status of True or False get preserved from the last time it was executed? Or will the program status be changed to false when the folder condition becomes false?
Sub-Routine Posted March 29, 2010 Posted March 29, 2010 The program will retain it's status no matter the state of the folder. I probably could experiment with this, but I will just ask instead: If a program is in a folder with a condition, and the program is triggered while the folder condition is true, then the folder condition subsequently becomes false, does the program status of True or False get preserved from the last time it was executed? Or will the program status be changed to false when the folder condition becomes false?
TJF1960 Posted March 29, 2010 Posted March 29, 2010 Hi kingwr, It has been my experience that the program would remain true when viewed in the program summary page when the folder turns false. Tim
oberkc Posted March 29, 2010 Posted March 29, 2010 If don't think you can specify "Time Before Sunrise + 30 minutes (same day). Perhaps you are correct. I was not at my ISY to confirm. Instead, if you prefer to avoid the folder approach: On Mon, Tue, Wed, Thu, Fri Time is 6:50:00AM AND Time is from 0001 to sunrise+30minutes (same day) It sounds like this is going to get solved.
dansmith Posted March 29, 2010 Posted March 29, 2010 I have a similar application, but in the opposite direction. I only want to turn my kitchen table light on if it is one hour before sunset and if that occurs in a half hour window. The program that I set up as a flag for Sunset Window was: If From Sunset - 1 hour To 7:25:00PM (same day) Then - No Actions - (To add one, press 'Action') Else - No Actions - (To add one, press 'Action') If Sunset - 1 Hour is greater than 7:25 pm then this program will remain false when the time reaches one hour before sunset. It is only when Sunset - 1 hour is less than 7:25 pm that the program will be true.
dansmith Posted March 30, 2010 Posted March 30, 2010 If On Mon, Tue, Wed, Thu, Fri From 6:50:00AM To Sunrise + 30 minutes (same day) Then Set Scene 'Master Suite / Wakeup' On Else - No Actions - (To add one, press 'Action') I have no idea what the outcome of this will be? If Sunrise +30 occurs before 6:50:00AM, will the IF statement become True and turn-on the scene? Kingwr got me curious. In my post above I showed the code that worked for me for a sunset condition. I assumed that this would be the same, but ran a test anyways. If Sunrise+30 occurs before 6:50 AM the IF will not become true and the THEN statement will not execute. So this example should work just fine.
Goose66 Posted March 31, 2010 Posted March 31, 2010 As to my suggestion to seperate program trigger conditions from IF statement conditions made on page 2 of this thread, I had a further idea of how it may be implemented while minimally impacting existing libraries of programs: What if, down in the "Add to Program" section of the program detail screen there were a checkbox that read "Triggers Program." The state of this checkbox would be stored in the XML with each condition. Those conditions that had "Triggers Program" checked would be both trigger conditions for the program and be evaluated in the IF statement. Those conditions that did not have "Triggers Program" checked would only be evaluated in the IF statement but would not trigger the program to run. The default for Triggers Program would be true, and all existing programs would work in the new model just as they do now. Just another thought.
Recommended Posts