
dnl
Members-
Posts
75 -
Joined
-
Last visited
Everything posted by dnl
-
Thank you kingwr for the reply. I expect as the complexity of my programs increase, I will begin to see the wisdom in what you describe. I also value what you appear to value, which is a program that is easier to understand and that does what you think it does (without an inordinate amount of thinking?).
-
Hi All, I think I have only one more comment on this. The ISY programming model is what it is and we either learn how to use it or we move onto something else. I am new but I like what I have seen in the ISY and look forward to learning how to use it more intelligently. This particular condition is a disappointment, however, because it is not what it could have been. Had it provided what many thought it did, there would have been a variety of immediate applications that many (all?) could have understood and used. The only way I believe we can do what we thought this condition might do is to use several conditions -- not the end of the world of course but disappointing. As it is, however, this condition provides a function that is difficult to understand and, to me at least, is misleading. I think that is born out by the length and content of this thread. There is a certain intellectual enjoyment in discovering how things work but ultimately I want to use the ISY for practical applications. My opinion may change but as of this moment I would not use this particular condition because it I am likely to forget how it really works and I will not use it correctly. If others can find good uses or have the ability to use it well, more power to them. Is there any chance UD will provide a condition that provides what we thought this one did? which is to signal False or True when a device command is received that is or is not, respectively, what is specified in the condition. If so, I think the world of ISY programming will have improved.
-
oberkc, thank you for the program example. It shows very clearly why I would never want to use this particular condition in a program. I did some testing with the code you posted and, unless I made a mistake, the code behaves the same regardless whether you use AND or OR between the two conditions. I do not understand why this particular condition would be designed to work this way. apostolakisl, I agree the "Is Not" condition could be very useful if it evaluated to True when any command other than the specified one was used. Thanks so much for starting this thread. It might have taken days to debug a program that used such as statement. EDIT: Ah, I see you asked the same question while I was doing my testing. No difference between AND and OR. SECOND EDIT: Yes, I think oberkc is correct -- there would be a difference in the situation where the ON command is received at the specified time. There may be a use for this but I believe code should be readily understandable if at all possible. This particular condition does not seem readily understandable -- at least not to me.
-
Hi oberkc, If I understand the results of my tests correctly, then the two ANDed conditions ... if time is 0900 am and control "XXX" is not switched on always evaluate to False because the "control ... is not switched on' never evaluates to True. Please let me know if you find anything that causes this condition to evaluate to True. On the other hand ... if control "XXX" is switched on will evaluate either to True or to False depending on what control is sent. Chris indicated there is no bug but there sure seems to be. Write down the Boolean truth tables for both "Is" and "Is Not". The "Is Not" condition does not seem to be a true Boolean converse to "Is", which is what I would expect. What is the intended purpose of a condition that can only evaluate to False?
-
This thread may be almost dead. The issue regarding ELSE is still not resolved for me but it may be with more experience. I wanted to add what may be the last entry to point out a potential problem with the last proposed solution. If two different programs are used to turn on and turn off the lights, and if the occupancy detector changed its state to 'unoccupied' at exactly 10:30 pm, both the ON and the OFF programs would run their THEN clauses but either program might ran last. If the ON program ran last, the lights would be left on for 24 hours. The event is very unlikely but I would rather ensure the event could not cause a problem. I believe this problem can be avoided by setting the off time in the ON program to an earlier time (one minute earlier would suffice) but it would require me to remember this and change both programs if the shutoff time was to be changed. One program with both THEN and ELSE clauses avoids the problem. For that reason, I decided to return to that approach -- at least until the day I understand why it is better to avoid ELSE clauses. Thanks again for all who posted comments. They were very helpful to me.
-
I hope no one minds if I (a new person to the forum) jumps into this issue when I clearly do not yet fully understand ISY programming. I refer back to a question asked by oberkc and answered by Chris. Chris said this was correct. Not according to tests I have done. The expression never evaluates as True. I wrote an IF-THEN-ELSE with this single condition and have not been able to find anything that causes the THEN clause to execute. An 'ON' command will of course trigger the ELSE clause. Is this the way it is supposed to work? If so, did anyone have any thoughts how this conditional test might be used? EDIT: I mean to ask, did the designers of the "Is Not" logic for this particular condition have any thoughts about how this conditional test might be used that is superior (or more easily understood) than using "Is"?
-
Hi kingwr, Thank you for the detailed reply. Your first example illustrates the difference between Status and Control. I believe I understand how these two conditions differ. Your second example answers the question about separation. I note Chris Jahn's answer. Could you not also achieve what you describe by putting programs in a folder and specifying the conditions for the folder? In any case, I still do not understand what is the problem (or disadvantage) of the ELSE statements I had in my programs. I do not understand what is the advantage of dividing the IF-THEN-ELSE structure I had into two programs that have only IF-THEN. It still seems that we end up with the same conditions in two programs to monitor rather than those conditions in just one program.
-
Thanks to kingwr, oberkc and apostolakisl for comments and suggestions. Kingwr, I have modified my programs as you suggested. Will you explain these statements a bit more? I have seen other posts advise not to use the ELSE clause but with no explanation why. I am intrigued by what you wrote. I would have thought there is no additional processing needed to evaluate IF conditions when the ELSE clause is used. If for example we have one program of the form ... IF condition1 AND condition2 THEN do this ELSE do that I would have thought the two conditions are evaluated only when there is a state change and the use of ELSE statements would not affect that evaluation. On the other hand, if we have two programs like ... IF condition1 and condition2 THEN do this ELSE IF not-condition1 or not-condition2 THEN do that ELSE I would think this causes the two conditions to be evaluated twice, once for each program. (Note that the "not-condition1 or" expression ... is the Boolean inverse of the "and" expression.) Also, please excuse more bonehead questions, when you wrote "you cannot separate trigger events and IF conditions," what is meant by "separate" and what is the consequence of not being able to do it?
-
Hi oberkc, If the motion sensor is operating properly (as well as RF communications, which I think is my problem -- I should know later today), a change to OFF occurs at a specific time after motion stops. In my case, I set the sensor for 30 seconds. So technically you are correct, OFF does not mean motion but it should mean motion recently occurred. I can safely ignore OFF if everything is operating properly. The question that I cannot answer with certainty is what should be done if the motion sensor or communications do not operate properly. I am willing to assume motion recently occurred if the motion sensor transitions to OFF. The only example I can give is the ISY thinks the motion sensor is stuck ON even though I think the sensor itself is operating correctly and then the ISY sees a change to OFF. This an interesting question that I cannot easily test at this moment because the ISY thinks the sensor is stuck ON. I expect that there are no changes in control status because the motion sensor is not controlled like a switch is controlled. A change in control status for the switch changes in response to a manual push on the switch rather than an actual change in its status. For example, if the switch is pushed upward, the IF condition for status ON triggers regardless whether the switch is already ON or is OFF. (For my situation, this is exactly what I want.) Yes, me too. And thank you for your interest and comments.
-
Hi oberkc, The most recent code you suggest seems to be almost identical in effect to the last one I mentioned. The only difference I see is that a change in motion sensor to OFF or a manual switch to OFF does not disable the Night Lighting program. Assuming there is no subsequent change in motion sensor or switch, if the NL program is already disabled, there is no difference in effect because both code would have NL disabled for 24 hours before enabling and running it. If the NL program is enabled when the change to OFF occurs, then it would remain enabled and running for 24 hours; then the enable and run commands would not have any effect because it would already be enabled and running according to schedule. I do not think this is the better logic. If motion sensor or switch control changes to OFF, I would interpret that as someone being present. The NL program should be disabled immediately. So, I think your first suggestion is the better one -- test for any change in motion sensor status or switch control and if it occurs, start a fresh 24 hour period in which the NL program is disabled. Manual control of the switch is handled the same as motion sensing. I like it. Of course, this assumes I understand correctly how the program works.
-
Hi oberkc, I did some testing along the lines you suggested when I first tried my programs. The results of that testing were the basis of my conclusions. I was thinking it would be nice if someone who knows with certainty could confirm. Michel K. did confirm in a reply to one of your messages about Is Not Switched On. I believe it was you who also wrote in another thread that 'Control' depends on physical/manual actions but 'Status' does not; that the results of a 'Status' condition is not affected by what/how a switched is turned on/off. Your comment in that thread confirms what I observed in my tests. As others have written, the program logic of IF statements in ISY programs is a bit different than many other programming languages. For example, the logic of this statement ... If Status 'XXX' Is On Or Status 'XXX' Is Off Then in many languages would be true at all times (hence pointless to test for both conditions). Not the case for ISY. I think I am beginning to understand -- I hope I am. As for the enable/run question, I will assume both are needed until someone tells me otherwise. I assume 'enable' is needed to allow the program to run and the 'run' command is needed to actually cause its execution.
-
Thank you for the replies and suggestions. Oberkc, your comment is in line with what I originally thought might happen. The problem does not seem to occur. My testing indicates the statement IF Control 'XXX' is Switched On does not detect 'On' commands sent by a program but detects only a manual turning on. It would be great if someone could confirm this is true. Apostolakisl, thank you for the suggestion. This simplifies the logic and with a small change can also handle the situation where the motion detector is stuck "OFF". I believe simpler programs are less likely to something unintended. With your suggested changes, the 'Occpuancy Detector' program becomes ... If Status 'Motion Sensor' is On Or Status 'Motion Sensor' is Off Or Control 'Living Room Light' is switched On Or Control 'Living Room Light' is switched Off Then Disable Program 'Night Lighting' Wait 24 hours Enable Program 'Night Lighting' Run Program 'Night Lighting' (If) Else - No Actions - (To add one, press 'Action') Do you know if it is necessary to both enable and run the 'Night Lighting' program?
-
I am new to ISY programming. I wrote a couple programs to turn a light on when a house is not occupied but I am not sure if the programs will always work the way I want. I would appreciate some comments and suggestions if there are better ways to do it. I have a motion sensor and one light to control. If there has been no motion for 24 hours, I want to start controlling the light by schedule. When there is motion, I want to keep the light on if already on but immediately stop automatic control. That is simple enough but I would like one additional feature. The motion sensor sometimes get stuck "ON" even when there has been no motion for a long time. I am working to solve this problem but in the meantime I want a failsafe for this situation by monitoring the light being turned on manually. If the light has not been turned on for 24 hours, I want to begin controlling the light by schedule just as if there has been no motion for 24 hours. I wrote two programs to do this: Program 1: Occupancy Detector If Status 'Motion Sensor' is On Or Control 'Living Room Light' is switched On Then Disable Program 'Night Lighting' Else Wait 24 hours Enable Program 'Night Lighting' Run Program 'Night Lighting' (If) Program 2: Night Lighting If From Sunset - 15 minutes To 10:30:00PM (same day) Then Set 'Living Room Light' On Else Wait 60 minutes (Random) Set 'Living Room Light' Off Will these programs work as intended? Are there situations where they will not work as intended? In the else clause of program 1, should program 2 be enabled and executed or just enabled? Will these programs continue to work the same when this one light in program 2 is replaced by a scene? In other words, program 1 continues to monitor the one light for manual operation but multiple devices are controlled in program 2. Thanks for any help you can give me.