ISY Newbie Posted April 11, 2021 Posted April 11, 2021 Let's say you have a program that turns on night lights with a schedule in the IF section. If you manually turn off those night lights after the schedule triggered the then routine, will the program continuously check the schedule and turn the lights back on at some point? I think it should, but a program that I have written is not turning back on lights that have been manually turned off.
TrojanHorse Posted April 11, 2021 Posted April 11, 2021 Let's say you have a program that turns on night lights with a schedule in the IF section. If you manually turn off those night lights after the schedule triggered the then routine, will the program continuously check the schedule and turn the lights back on at some point? I think it should, but a program that I have written is not turning back on lights that have been manually turned off.In general I’d say no (although the word choice may be confusing here but keep in mind the ISY is event based). The time events will only trigger when true. But the behavior depends on the exact program and what triggers you have. Please paste the program for better advice. For example an “at sunset” program will only evaluate at sunset. But if you have “from sunset to sunrise next day” and another trigger then, well, the program details are important. Sent from my iPhone using Tapatalk
ISY Newbie Posted April 11, 2021 Author Posted April 11, 2021 8 minutes ago, TrojanHorse said: In general I’d say no (although the word choice may be confusing here but keep in mind the ISY is event based). The time events will only trigger when true. But the behavior depends on the exact program and what triggers you have. Please paste the program for better advice. It's along these lines: If From Sunset To Sunrise (next day) Then Set Scene 'External Night Lights' on Else Set Scene 'External Night Lights' off I manually turned off one off the light in the 'External Night Lights' scene, and ISY is not turning it back on.
TrojanHorse Posted April 11, 2021 Posted April 11, 2021 It's along these lines:IfFrom SunsetTo Sunrise (next day)ThenSet Scene 'External Night Lights' onElse Set Scene 'External Night Lights' off I manually turned off one off the light in the 'External Night Lights' scene, and ISY is not turning it back on.Please explain what you are trying to accomplish. You could add to the IF “external night lights are off” BUT then also add a wait 5 seconds or so to the THEN. Test that and then think about and explain what you want to do. Edit: make sure the second IF clause is AND. Sent from my iPhone using Tapatalk
larryllix Posted April 11, 2021 Posted April 11, 2021 12 minutes ago, ISY Newbie said: It's along these lines: If From Sunset To Sunrise (next day) Then Set Scene 'External Night Lights' on Else Set Scene 'External Night Lights' off I manually turned off one off the light in the 'External Night Lights' scene, and ISY is not turning it back on. You have nothing that detects the light turning off therefore the program will not turn the light back on. ISY does not continuously monitor anything. ISY only does things when it is told to do it by an initiating device. Your only initiating things are sunset and sunrise. 1
ISY Newbie Posted April 11, 2021 Author Posted April 11, 2021 1 hour ago, larryllix said: ISY only does things when it is told to do it by an initiating device. Your only initiating things are sunset and sunrise. That was what I wanted to know. So, although the conditional phrase "from A to B" sounds like ISY will check continuously between A and B, ISY actually checks at A and B, then. I'll revise the program to account for that.
larryllix Posted April 11, 2021 Posted April 11, 2021 (edited) 6 hours ago, ISY Newbie said: That was what I wanted to know. So, although the conditional phrase "from A to B" sounds like ISY will check continuously between A and B, ISY actually checks at A and B, then. I'll revise the program to account for that. Yes. Also...Your lines are only about times, not any devices. Device statuses or conditions would have to be in the "If" section to monitor signals from them. Edited April 11, 2021 by larryllix
ISY Newbie Posted April 11, 2021 Author Posted April 11, 2021 6 hours ago, larryllix said: Yes. Also...Your lines are only about times, not any devices. Device statuses or conditions would have to be in the "If" section to monitor signals from them. I'm confused again. Why do I need to check the status of the device? I want to turn on the lights at sunset whether or not the lights have been already turned on (manually by a user) or not. Likewise, I want to turn off the lights at sunrise whether or not the lights have been already turned off (manually by a user) or not. What does checking the status of the device achieve if my intention is to do something regardless of the status of the device?
jfai Posted April 11, 2021 Posted April 11, 2021 52 minutes ago, ISY Newbie said: Iwant to turn on the lights at sunset whether or not the lights have been already turned on (manually by a user) or not. Likewise, I want to turn off the lights at sunrise whether or not the lights have been already turned off (manually by a user) or not. Your program already does what you want. No other checks needed.
lilyoyo1 Posted April 11, 2021 Posted April 11, 2021 1 hour ago, ISY Newbie said: I'm confused again. Why do I need to check the status of the device? I want to turn on the lights at sunset whether or not the lights have been already turned on (manually by a user) or not. Likewise, I want to turn off the lights at sunrise whether or not the lights have been already turned off (manually by a user) or not. What does checking the status of the device achieve if my intention is to do something regardless of the status of the device? You're original question is completely different than what you are saying now! Your original question requires the device status (along with programming) in order to work. What you are saying you want now is a simple timer which does not require device status. If the lights are on, then bring on the lights is irrelevant (you wouldn't notice) when its time to turn on. The same applies for if they are already off. The isy sending an off signal is irrelevant since they would stay off. The more information you provide about what you're trying to accomplish will lessen confusion and help you solve the problems you're having
ISY Newbie Posted April 11, 2021 Author Posted April 11, 2021 1 hour ago, lilyoyo1 said: You're original question is completely different than what you are saying now! Your original question requires the device status (along with programming) in order to work. What you are saying you want now is a simple timer which does not require device status. If the lights are on, then bring on the lights is irrelevant (you wouldn't notice) when its time to turn on. The same applies for if they are already off. The isy sending an off signal is irrelevant since they would stay off. The more information you provide about what you're trying to accomplish will lessen confusion and help you solve the problems you're having I think you're right. My two questions are different, come to think of it. Now, if I build a If phrase that checks on the status of lights, how often does ISY check them?
lilyoyo1 Posted April 11, 2021 Posted April 11, 2021 1 hour ago, ISY Newbie said: I think you're right. My two questions are different, come to think of it. Now, if I build a If phrase that checks on the status of lights, how often does ISY check them? When the conditions are met. The isy is event driven
asbril Posted April 11, 2021 Posted April 11, 2021 (edited) 2 hours ago, ISY Newbie said: I think you're right. My two questions are different, come to think of it. Now, if I build a If phrase that checks on the status of lights, how often does ISY check them? Maybe you try to achieve something like this ? It means that if Light X is switched OFF manually any time between sunset and next day sunrise , then it is set ON after 2 minutes. IF From sunset to sunrise (next day) And Light X is switched OFF THEN WAIT 2 minutes Set Light X to ON Edited April 11, 2021 by asbril
ISY Newbie Posted April 11, 2021 Author Posted April 11, 2021 22 minutes ago, asbril said: Maybe you try to achieve something like this ? It means that if Light X is switched OFF manually any time between sunset and next day sunrise , then it is set ON after 2 minutes. IF From sunset to sunrise (next day) And Light X is switched OFF THEN WAIT 2 minutes Set Light X to ON Thanks. I'll give it a try and see if it works tonight. Why the 2-minute wait though?
smacbride Posted April 11, 2021 Posted April 11, 2021 I think the problem is that if you have a lot of lights, the programming gets messy. It would be nice if you could check the status of a scene, but I don't think you can, only the devices.
asbril Posted April 11, 2021 Posted April 11, 2021 1 minute ago, ISY Newbie said: Why the 2-minute wait though? Just a suggestion and it could be any time. If someone in your home chooses to switch Light X OFF, for whatever reason, then why would you want it to go ON immediately, rather than wait a set time ?
larryllix Posted April 11, 2021 Posted April 11, 2021 6 hours ago, ISY Newbie said: I'm confused again. Why do I need to check the status of the device? I want to turn on the lights at sunset whether or not the lights have been already turned on (manually by a user) or not. Likewise, I want to turn off the lights at sunrise whether or not the lights have been already turned off (manually by a user) or not. What does checking the status of the device achieve if my intention is to do something regardless of the status of the device? Try this. Be the ISY program You will turn the light on when sunrise or sunset taps you on the shoulder. If somebody turns the light off, you are not watching it and do nothing because you do not know it. If you want to know if somebody turned off the light, you have to tell ISY to watch the light. Computer programs are stupid. You have to tell them everything, what to do and when.
TrojanHorse Posted April 12, 2021 Posted April 12, 2021 Try this. Be the ISY program You will turn the light on when sunrise or sunset taps you on the shoulder. If somebody turns the light off, you are not watching it and do nothing because you do not know it. If you want to know if somebody turned off the light, you have to tell ISY to watch the light. Computer programs are stupid. You have to tell them everything, what to do and when.Be one with the ISY. I like it. In a similar Zen-like or Taoist approach - the ISY is scanning your nodes always and never Sent from my iPhone using Tapatalk 1
TrojanHorse Posted April 12, 2021 Posted April 12, 2021 Try this. Be the ISY program You will turn the light on when sunrise or sunset taps you on the shoulder. If somebody turns the light off, you are not watching it and do nothing because you do not know it. If you want to know if somebody turned off the light, you have to tell ISY to watch the light. Computer programs are stupid. You have to tell them everything, what to do and when.Be one with the ISY. I like it. In a similar Zen-like or Taoist approach - the ISY is scanning your nodes always and never Sent from my iPhone using Tapatalk
kclenden Posted April 12, 2021 Posted April 12, 2021 23 hours ago, ISY Newbie said: If you manually turn off those night lights after the schedule triggered the then routine, will the program continuously check the schedule and turn the lights back on at some point? When they are evaluated, ISY IF statements function just like IF statements in other languages. If they evaluate TRUE then the THEN section is run. If they evaluate FALSE then the ELSE section is run. Where the confusion begins is in understanding what causes the ISY IF statement to be evaluated. ISY programming is event based. What that means is that IF statements are only evaluated when certain events happen. Those events can include you right-clicking on the program and selecting "Run IF", a statement in a program that runs the IF of another program, an event that is included within the IF occurs, and more. When you use "From sunset to sunrise (next day)", there are two events included within the IF (sunset and sunrise). The only times you're guaranteed that program will run is a sunrise, when it will evaluate TRUE, and sunset(next day), when it will evaluate FALSE. If you want it to run at any other time, without you manually running it, you'll need to add another event to the IF. What are other events? Well usually they are devices doing something and informing the ISY. So, for example, when your light switch is turned OFF, it sends a message to the ISY telling it that it has been turned OFF. The ISY interprets that as an event. So you could add "Light is switched OFF" to your IF and now the IF will be evaluated whenever the light is turned OFF. Whenever you create a new program that has statements in the IF, you need to evaluate the IF two ways: First, will the IF correctly evaluate to TRUE or FALSE when it is evaluated Second, have the appropriate events been included in the IF so that the IF will be evaluated at the correct times 2
TrojanHorse Posted April 12, 2021 Posted April 12, 2021 So, for someone that doesn’t want to read 20 posts, what’s wrong with post #2? Sent from my iPhone using Tapatalk
Ross Posted April 12, 2021 Posted April 12, 2021 ISY Newbie, Since I am a newbie myself, I will talk "Newbie" to you as that is the only language I know... You are absolutely right - the From/To phrase makes you think that it will check continuously. I thought the same thing myself. However, it doesn't (thank you MrBill for explaining it to me). The program evaluates only at those 2 times (sunset and next day's sunrise). When lilyoyo1 said the ISY is event driven, he means that something has to happen (a certain time, light-on, light-off or, really, any condition that the ISY knows about) has to occur which then triggers the ISY to go through its programs to see if any program should be evaluated because something (an event) happened. Your original question was about the ISY checking continuously throughout the night and turning a light back on "at some point" if it's turned off. Since the ISY won't check continuously but, with a tweak, can evaluate its programs when the light is turned off (this is considered an event), we need to incorporate that info into the program. Asbril's first post has the appropriate program. He just used "Wait 2 minutes" because you said "at some point". However, you can use any interval you want with a minimum of 1 second. TrojanHorse - post #2 is completely accurate; however, it's written above newbie level. I understand what you said there, but I don't think it would have sunk in during my first few weeks of programming. I hope this is helpful, Ross 1
larryllix Posted April 12, 2021 Posted April 12, 2021 We still haven't seen any program attempt to help with. That is usually the basic starting point with people wanting help, using a starting model. Anybody else?
ISY Newbie Posted April 12, 2021 Author Posted April 12, 2021 1 hour ago, larryllix said: We still haven't seen any program attempt to help with. That is usually the basic starting point with people wanting help, using a starting model. Anybody else? NightLights If From Sunset To Surrise (next day) And ( Status 'Exterior / Lights1' is Off Or Status 'Exterior / Lights2' is Off Or Status 'Exterior / Lights3' is Off ) Then Wait 2 minutes Set 'Exterior / Lights 1' 40% Set 'Exterior / Lights 2' 40% Set 'Exterior / Lights 3' 40% Else - No Actions - (To add one, press 'Action') This is what I have. Like I mentioned in another thread, sometimes Lights 2 or 3 won't come on. I'm thinking of adding a "wait 5 seconds" between the Then lines.
ISY Newbie Posted April 12, 2021 Author Posted April 12, 2021 1 hour ago, Ross said: ISY Newbie, Since I am a newbie myself, I will talk "Newbie" to you as that is the only language I know... Your original question was about the ISY checking continuously throughout the night and turning a light back on "at some point" if it's turned off. Since the ISY won't check continuously but, with a tweak, can evaluate its programs when the light is turned off (this is considered an event), we need to incorporate that info into the program. Asbril's first post has the appropriate program. He just used "Wait 2 minutes" because you said "at some point". However, you can use any interval you want with a minimum of 1 second. TrojanHorse - post #2 is completely accurate; however, it's written above newbie level. I understand what you said there, but I don't think it would have sunk in during my first few weeks of programming. I hope this is helpful, Ross Thanks for your remarks. They were very helpful. A follow-up question: when you said an "event" will have ISY evaluate its programs, does ISY evaluate all its programs, regardless of whether that event might affect a particular program or not? Or does ISY evaluate those programs that refer to the device that just had an event?
Recommended Posts