Jump to content

Question about using "Last Run"


TJF1960

Recommended Posts

Hello All,

 

Forgive me if this has been asked / answered before, I have searched but didn’t find much on the subject.

 

I am relatively new to the ISY-99i, and have learned so much from all of the posts on this forum.

 

I recently became aware of and have been playing with the “Last Run†feature in Scheduling for programs. That is a nice feature. I have used it in more than a few programs. It seems to me that it would be very advantageous to include a “>†or “>=†variable to it. For example Time is Last Run + 4 hours > . This way the event would occur if the conditions were met anytime after the 4 hours since the last run time. The “From Last run To Last run†could be used but in a couple of my programs but the time could be 6 months to a year since the last run time and I don’t think the variable can stretch out that far. It seems to me that this addition could eliminate a quite a few extra support programs.

 

Anyway I thought I would throw that out there and see what comes of it. I am always open to suggestions. Please keep up the good work and Thank You!

 

Tim

Link to comment
sorry to hijack your thread, but I've never used "last run". how is it used? can you give a good example?

 

thanks.

 

I would be glad to, I just hope I don’t embarrass myself with my newbie programming capabilities. So please just keep in mind I am still learning as you all review these.

 

This is the main program and is titled "Fmly Rm Attic Fan"

 

If
       Folder  'Vacation' is False
   And Program 'Fmly Rm Attic Fan Temp' is True
   And Program 'Fmly Rm Attic Fan Timer' is False

Then
       Set Scene 'Fmly Rm Attic Fan Scene' On
       Wait  10 minutes 
       Set Scene 'Fmly Rm Attic Fan Scene' Off
       Run Program 'Fmly Rm Attic Fan' (If)

Else
  - No Actions - (To add one, press 'Action')


This next program is titled "Fmly Rm Attic Fan Temp" and is used as a true / false statement. If the temperature is 80 degrees or hotter and the wind speed is 11 mph or less then the statement is true.

[code]If
       Module 'Climate' Temperature >= 80 °F
   And Module 'Climate' Wind Speed Average <= 11 mph

Then
  - No Actions - (To add one, press 'Action')

Else
  - No Actions - (To add one, press 'Action')


And the last program is titled "Fmly Rm Attic Timer" and is the Last Time Run which is also used as a true / false statement. If the last run time for the fan is between 5 seconds to 45 minutes then this statement is true.

If

From Last Run Time for 'Fmly Rm Attic Fan' + 5 seconds

To Last Run Time for 'Fmly Rm Attic Fan' + 45 minutes (same day)

 

Then

- No Actions - (To add one, press 'Action')

 

Else

- No Actions - (To add one, press 'Action')

 

Basically I want the fan to operate, when the temperature is in range for 10 minutes, then shut down for 45 minutes, then restart and continue this until the temperature is out of range. I know I could accomplish this using Wait and Repeat but I wanted to stay away from long Wait timers etc. and I thought this could be a nice clean way to go.

 

I believe I can combine the “Fmly Rm Attic Fan Temp†program into the main program. I just haven’t done it yet. I likewise believe I could combine the “Fmly Rm Attic Fan Timer†into the main program as well, if it contained the variables (I believe this is the word to describe the < > = etc.) like the “Fmly Rm Attic Fan Temp†has.

If my assumptions are correct, then these three programs could be combined into 1 simple little program.

 

I have used the Last Run in several programs and it works really nicely as it is. But I have a few more that would benefit from the variables.

 

Tim

Link to comment

Tim. that is a great example!

 

I don't have any suggestions on using Last Run for you, but I do have a couple of comments.

 

Don't try to combine the programs. You can think of each program as a routine that can be globally shared; like a procedure or a sub-routine. Keeping the programs as simple as possible is the best way to use the ISY. Grouping them in Folders is a great way to keep programs organized.

 

Don't be afraid to use Wait actions. As far as I know, these simply calculate a 'Next Run Time' with a pointer to resume the program and are not consuming processor cycles while 'Running'. This should work fine for your 10 minutes On/45 minutes Off procedure.

 

Rand

Link to comment
Is Last Run a new feature? I can't find it as an option under SCHEDULE?? I'm running 2.7.2.

 

It is in the schedule section after the time selector drop down menus. It is the drop down selector for Time/Sunrise/Sunset/Last Run.

Link to comment

Rand, Thank you for your valuable suggestions. I will try to keep it simple with programs. I do have many folders to try and keep programs organized. It can get overwhelming in the Program Summary tab though!

 

 

Don't be afraid to use Wait actions. As far as I know, these simply calculate a 'Next Run Time' with a pointer to resume the program and are not consuming processor cycles while 'Running'. This should work fine for your 10 minutes On/45 minutes Off procedure.

 

That’s good to know. I thought the Wait action did consume processor cycles.

 

One thing I liked about using the Last Run was my concern during a power outage, once power was restored the Last Run time was set in stone. How would a Wait action be handled once power is restored. In other words if the program is:

(If conditions are met) turn on fan, Wait 10 minutes, Turn off fan, Wait 45 minutes, Run If.

Will the ISY calculate the difference between the time the power went out to when power was back on and act based on that? Or will it run the program once the If statement is correct?

 

Also if the fan was on during the power outage and an hour elapsed during the downtime, once power was restored will the ISY see that it should have shut the fan off during the outage and then shut the fan off, and then resume the program?

 

Thanks,

Tim

Link to comment

 

One thing I liked about using the Last Run was my concern during a power outage, once power was restored the Last Run time was set in stone. How would a Wait action be handled once power is restored. In other words if the program is:

(If conditions are met) turn on fan, Wait 10 minutes, Turn off fan, Wait 45 minutes, Run If.

Will the ISY calculate the difference between the time the power went out to when power was back on and act based on that? Or will it run the program once the If statement is correct?

 

Also if the fan was on during the power outage and an hour elapsed during the downtime, once power was restored will the ISY see that it should have shut the fan off during the outage and then shut the fan off, and then resume the program?

 

Thanks,

Tim

 

Ah, you are right. I did not consider a power outage.

 

I think to allow for that you could set the program to Run at Startup and add some lines to the Else. This will turn off the fan until the Temp is evaluated again.

 

If
Folder 'Vacation' is False
And Program 'Fmly Rm Attic Fan Temp' is True
And Program 'Fmly Rm Attic Fan Timer' is False

Then
Set Scene 'Fmly Rm Attic Fan Scene' On
Wait 10 minutes
Set Scene 'Fmly Rm Attic Fan Scene' Off
Run Program 'Fmly Rm Attic Fan' (If)

Else
Set Scene 'Fmly Rm Attic Fan Scene' Off
Run Program 'Fmly Rm Attic Fan Timer' (Else)

 

Rand

Link to comment

Archived

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


×
×
  • Create New...