Jump to content

Does ISY check "schedule" in a program continuously?


ISY Newbie

Recommended Posts

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.

Link to comment
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
Link to comment
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.

Link to comment
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
Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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?

Link to comment

 

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.

Link to comment
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

Link to comment
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?

Link to comment
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

 

Link to comment
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?

Link to comment
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 ?

Link to comment
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.

Link to comment
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
Link to comment
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
Link to comment
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
Link to comment

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

 

Link to comment
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.

Link to comment
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?

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...