Jump to content

Chris Jahn

Administrators
  • Posts

    1745
  • Joined

Everything posted by Chris Jahn

  1. By standard programming definitions, 'while' is actually less accurate than 'if' because it implies that it will loop until the condition becomes false. The problem here is we don't have an existing accurate term for the behaviour. When has been suggested and we may go with that.
  2. Yes, this means run the following actions a total of two times. Yes, this means run the following actions once. You wouldn't bother doing that, it was really just to illustrate that even if you did, the program would be syntactically correct, but if we had said 'Repeat End', it would not be. Yes, it means do not run any actions. This would be used when you are writing and debugging your programs and you want to temporarily prevent a few actions from running.
  3. Frank, People may use 'Repeat 1' (and 'Repeat 0' for that matter) when writing their programs and testing them. The GUI ensures that your program is syntactically correct at all times. The only way to do this with 'Repeat End', is to add it as a 'Repeat X Times/Repeat End' pair, like parentheses. This is what will be added if nested Repeats are supported. Its not just as simple as replacing 'Repeat 1 times' with 'Repeat End', as the following examples show: The point is, there is no trivial change that will fix this, therefore if we make any change it makes sense to just include nested repeats as part of that change. Example #1 : Syntax is correct Then Repeat 1 Times Set 'Light' Brighten Repeat 3 Times Set 'Light' Dim Repeat 2 Times Set 'Light' Brighten Repeat 1 Times Set 'Light' Dim Repeat 1 Times Set 'Light' Brighten Example #2: Replacing 'Repeat 1 Times' with 'Repeat End' Syntax is incorrect Then Repeat End Set 'Light' Brighten Repeat 3 Times Set 'Light' Dim Repeat 2 Times Set 'Light' Brighten Repeat End Set 'Light' Dim Repeat End Set 'Light' Brighten
  4. Frank, I had thought about adding 'Repeat End' as well, but its not as simple as it first sounds ... Basically, to do this right, 'Repeat End' would have to be added at the same time as the 'Repeat X times' entry (like the parens for the [Add And (..)] button). But without nested Repeats, adding 'Repeat End' will only add confusion and frustration as people try to nest Repeats but cannot. If we simple add 'Repeat End' as an option alone, syntactically incorrect programs could be written: i.e. Would need to prevent this scenario Then Repeat End Repeat 3 Times Repeat 2 Times Repeat End Repeat End If support for nested Repeats is added in a future release then using 'Repeat End' or parentheses makes a lot of sense, but until then I think it is best to leave it as-is .
  5. We may change the terms in the GUI at some point, but the best way to think of it is as follows: Think of Then as Becomes True. Think of Else as Becomes False. In other words, when the IF condition changes: 1) If the program is currently running it is stopped, 2) either the Then or the Else will start from the beginning depending on whether the condition is True or False
  6. If the TO is earlier than the FROM then it will never change TRUE or FALSE, and will not run either the THEN or ELSE path. In the normal case where the TO is later than the FROM, the schedule evaluates TRUE when the FROM time is reached (Runs THEN path), and FALSE when the TO time is reached (Runs the ELSE path).
  7. Chris Jahn

    after power fail

    Correct, the Then path is unconditionally run for all programs that are enabled and are set to "Run at Reboot". Correct, the ISY runs what it assumes are missed schedules for the current day. In a future version, we will likely make a flag available to control this. I'm not sure what your question is; I would assume that they are being changed by programs that are running when the ISY restarts.
  8. For the simple case of turning a light on at 6:50AM, and off at Sunrise: Turn Light On/Off: If On Mon, Tue, Wed, Thu From 6:50:00AM To Sunrise (same day) Then Set 'My Light' On Else Set 'My Light' Off In your case, you do not want the light to come on if its only going to be on for 20 minutes or less. You need two programs for this: Turn Light On: If On Mon, Tue, Wed, Thu From 6:50:00AM To Sunrise - 20 minutes (same day) Then Set 'My Light' On Else - No Actions - (To add one, press 'Action') Turn Light Off: If On Mon, Tue, Wed, Thu Time is Sunrise And Status 'My Light' > Off Then Set 'My Light' Off Else - No Actions - (To add one, press 'Action')
  9. Hi Frank, Yes, this is the correct and only way to break the repeat sequence.
  10. Just to be clear, programs consider 12:00:00AM on Monday as 12:00:00AM that morning (i.e. Late Sunday night). A truly earlier TO time will not get evaluted as the next day, instead it will never be true. Original example: If On Mon, Tue, Wed, Thu, Fri From 12:00:00AM To 12:00:00AM (2 days later) Then - No Actions - (To add one, press 'Action') Else - No Actions - (To add one, press 'Action') In the original example, the TO had the (2 days later) option, thus for a FROM on Friday the TO is really 12:00:00AM Sunday. If you change the TO to (same day) then it would have been false as 12:00:01 on Friday. This actually brings up another point you should be aware of. If the next FROM time is earlier than the current TO time, then the program will cut short the current FROM/TO, and begin the next FROM/TO as scheduled, thus evaluating TRUE at the new FROM time. This occurs in the original example. For example, on Thursday at 12:00:00AM, the schedule is still in the 2 day FROM/TO starting Wednesday, it now changes to a 2 day FROM/TO starting on Thursday. Again, depends on the (same day), (next day), (2 days later) etc. option specified.
  11. Your usage of Repeat and Repeat 1 times is correct; repeats are processed sequentially and are not nested. If we support nested Repeat in the future, we will more than likely use parentheses, much like the way the Add And (...) and Add Or (...) buttons work.
  12. GPG, This will evaluate True at 12:00AM Mon/Tue/Wed/Thu/Fri Morning This will evaluate False at 11:59:00PM on Mon/Tue/Wed/Thu/Fri If On Mon, Tue, Wed, Thu, Fri From 12:00:00AM To 11:59:00PM Then - No Actions - (To add one, press 'Action') Else - No Actions - (To add one, press 'Action') In this example, the program would be true from 9:30PM Friday until 2:00AM Saturday If On Fri From 9:30:00PM To 2:00:00AM (next day) Then - No Actions - (To add one, press 'Action') Else - No Actions - (To add one, press 'Action')
  13. You are correct, option A) is how it works. The selected day applies only to the 'From'.
  14. In your example, when sunset comes after 9:00PM the ISY will not turn on the lights. In general, a time range will never turn something on/off if the From date/time is greater than the To date/time.
  15. A program always has a state of either True or False. This state can be used as a condition in a program (ie. if 'Program X' is True then ...). A program becomes True only when its 'Then' path is run. A program becomes False only when its 'Else' path is run. Nothing else changes the True/False state of a program. When a program is run (either Then or Else) then it is an event for any program referencing it, thus causing the program referencing it to run (either Then or Else depending on that programs conditions). By having a True/False state, you can have a complex set of conditions for one program, and reference it from another program. For example, you may want to have programs that only do things during, (or some not during) office hours. eg. Program Office Hours: If On Mon, Tue, Wed, Thu, Fri From 9:00:00AM To 5:30:00PM (same day) Or On Sat, Sun From 10:00:00AM To 2:00:00PM (same day) Then - No Actions - (To add one, press 'Action') Else - No Actions - (To add one, press 'Action') Turn the lobby lights on during office hours (off otherwise): If Program 'Office Hours' is True Then Set 'Lobby ' On Else Set 'Lobby' Off keep the conference room light off outside office hours, and only allow the conference room switch to work during office hours: If Program 'Office Hours' is True And Control 'Conference Room' is switched On Then Set 'Conference Lights' On Else Set 'Conference Lights' Off
  16. I think this is the best method for what you want to do. Yes, that is a good way to change the program back to False, although it should be used on an as needed basis. For example, you wouldn't do that if your condition was a From/To (or From/For) time range because the program would automatically become True when entering the time range and False when leaving it. I should have also mentioned that you can use the 'And (...)'/'Or (...)' buttons as well to further nest conditions within a program.
  17. The ISY and the the Admin Console maintain the current time independently. The times you see in the Program Summary are based on the time on the ISY itself.
  18. Yes, give it a try because this should work. For debugging your programs, you can log the keypresses and other events as they happen in the Java Console, as shown in this thread: http://forum.universal-devices.com/viewtopic.php?t=346
  19. As Michel mentioned, we are in the process of prioritizing, so I'm not sure when this will be implemented. Having said that, this looks quite good and I imagine the final product will look a lot like this. Just Another Joe, I appreciate the effort, Thank you! Have you considered how extended X10 commands would be represented here? I was thinking of having a sub-tab under X10 where you could enter extended commands and name them. The commands could then be used anywhere the standard commands are (eg. in the popup menu, in programs etc.). I guess they could even be scoped to specific addresses you don't see a huge list everytime for everything.
  20. Not sure if you are joking, but that should work. For example, you could write a program such that the light is set to 20% when pressing Off when it is already off.
  21. Yes, the programs within it can still be run.
  22. The problem you are having is that you want an event that affects only the Folder conditions to also cause the programs within the folder to run. For example: Folder Conditions for 'New Folder' Add conditions to limit when programs in this folder are allowed to run. If X10 'A6/On (3)' is Received Then Allow the programs in this folder to run. Program A within the folder: If Status 'Light1 ' is Off Then Set 'Light1 ' On Else - No Actions - (To add one, press 'Action') In this case, when 'A6/On' is received, the Folder Condition becomes True, but Program A will not run because the 'A6/On' is not an event relevant to that program. To get this type of nested condtion, you have to do it in a reverse sort of way: Program: Condition1 If X10 'A6/On (3)' is Received Then - No Actions - (To add one, press 'Action') Else - No Actions - (To add one, press 'Action') If Program 'Condition1' is True And Status 'Light1' is Off Then Set 'Light1' On Else - No Actions - (To add one, press 'Action')
  23. You can do this with a simple program: If Control 'My Light Switch' is switched On Or Control 'My Light Switch' is switched Fast On Then Send Notification to All Else - No Actions - (To add one, press 'Action')
  24. MikeB, You are absolutely right, when entering a time range that time range becomes True, when leaving a time range it becomes False. Entering and leaving a time range are events that cause the program to run (either Then or Else path depending on all the If conditions). Check out this post if you want to keep something on (or off) during a time range: http://forum.universal-devices.com/viewtopic.php?t=394
  25. If you set your ramp rate for 'Exit Lights' at 5 minutes just so you would get a delay for the program, you could instead set it back to 1 or 2 seconds, and use the Wait action to wait 5 minutes. Both have their advantages; by using Wait, the light will remain at the same level for the whole 5 minutes, by using ramp rate, the lowering light level gives you some indication as to when it will shut off totally. If Control 'Floor 1 Control' is switched Off Then Set Scene 'Floor 1 Off' Off Set Scene 'Exit Lights' On Wait 5 minutes Set Scene 'Exit Lights' Off Else - No Actions - (To add one, press 'Action') You could also use a combination of the two, say set the Ramp Rate for 'Exit Lights' to 1 minute. This would keep the full light level for 4 minutes, then slowly ramp down for one minute ... If Control 'Floor 1 Control' is switched Off Then Set Scene 'Floor 1 Off' Off Set Scene 'Exit Lights' Fast On Wait 4 minutes Set Scene 'Exit Lights' Off Else - No Actions - (To add one, press 'Action')
×
×
  • Create New...