MasterMog Posted April 28, 2009 Posted April 28, 2009 If I create the following program then the "Last Run Time" and "Last Finish Time" on the program summary updates every couple of minute as if the program is being run multiple times. In addition, the "Then" section never runs even when all the conditions are true. The "Last Run Time" is never set to 5:30am when it is suppose to run but is always some time later in the morning which should not be happening: If On Sat, Tue, Thu Time is 5:30:00AM And Status 'DR KPLC Sprinkler Off' is Off And Module 'Climate' Rain Today < 0.3 " And Module 'Climate' Temperature > 39 °F And Module 'Climate' Wind Speed > 9 mph Then Set 'EZ Rain Zone1' On Wait 15 minutes Set 'EZ Rain Zone2' On Wait 20 minutes Set 'EZ Rain Zone3' On Wait 15 minutes Set 'EZ Rain Zone4' On Wait 15 minutes Set 'EZ Rain Zone4' Off Send Notification to All Else - No Actions - (To add one, press 'Action') However, if I do the following it appears to work fine: If On Sat, Tue, Thu Time is 5:30:00AM And Status 'DR KPLC Sprinkler Off' is Off And Module 'Climate' Rain Today < 0.3 " Then Set 'EZ Rain Zone1' On Wait 15 minutes Set 'EZ Rain Zone2' On Wait 20 minutes Set 'EZ Rain Zone3' On Wait 15 minutes Set 'EZ Rain Zone4' On Wait 15 minutes Set 'EZ Rain Zone4' Off Send Notification to All Else - No Actions - (To add one, press 'Action') It appears that adding multiple weather conditions to a program breaks it some how. Any ideas what might be going on?
Michel Kohanim Posted April 28, 2009 Posted April 28, 2009 MasterMog, Apologies for the inconvenience. Few comments: 1. The last run time is the time when any of the conditions changed. So, if your polling interval is 2 minutes, AND IF within those two minutes any of the conditions change, then the program is run again (re-evaluated). That's why you see the last run time keep changing every couple of minutes 2. The last finish time is equal to the last run time + the amount of time it took to run "then" or "else". So, since you have many waits in the program, the last finish time will surely be some time later in the day Now, with all this said - and as a test - would you be kind enough to make a copy of your program and make the following modifications: 1. Remove the Time is condition 2. Remove the KPL status condition 3. Choose current climate values that you know are true and will be true from now till now + polling_interval time Please do let me know if this works. With kind regards, Michel
MasterMog Posted April 28, 2009 Author Posted April 28, 2009 Hi Michel, I guess the confusing part for me is that I expected the schedule to take precedence over the other conditions. I did not expect the other conditions to be evaluated if it was not one of the days the program was schedule to run. The last run time and last finish time are exactly the same because for some reason even if all the conditions are true it does not seem to run the "Then" section when the schedule is present. If I remove the schedule and KPL check it works correctly. In fact, it still works if I put the KPL check back in and just leave the schedule out. It does not work with the Schedule and multiple climate checks even when I choose things that I know to be true. Thanks Mack
Michel Kohanim Posted April 28, 2009 Posted April 28, 2009 Hello Mack, The conditions are evaluated based on AND/OR conjunctives. Now, if everything works except for when you add the time, would you be kind enough to: 1. Go to the configuration tab 2. Check the Schedule Grace Period If this value is very low (such as 5-10 seconds), then the schedule may not run if there are other activities which delay the evaluation of the condition. In short, the grace period gives ISY some room as far as what to consider 5:30 AM. The default is 15 minutes but you can change it to a lower value. With kind regards, Michel Hi Michel, I guess the confusing part for me is that I expected the schedule to take precedence over the other conditions. I did not expect the other conditions to be evaluated if it was not one of the days the program was schedule to run. The last run time and last finish time are exactly the same because for some reason even if all the conditions are true it does not seem to run the "Then" section when the schedule is present. If I remove the schedule and KPL check it works correctly. In fact, it still works if I put the KPL check back in and just leave the schedule out. It does not work with the Schedule and multiple climate checks even when I choose things that I know to be true. Thanks Mack
MasterMog Posted April 28, 2009 Author Posted April 28, 2009 Hi Michel, The Schedule Grace Period is set to 10 mins so I don't think that is the problem. I'm thinking that I can bypass the problem if I create a progam with just the Schedule and KPL check and have it run a second program with the climate checks. I'm assuming that the second program would not need to be enabled since it would only be activated via the first program. For example: Program "Sprinkler Cycle1" If On Sat, Tue, Thu Time is 5:30:00AM And Status 'DR KPLC Sprinkler Off' is Off Then Run Program 'Run All Zones' (If) Else - No Actions - (To add one, press 'Action') Program "Run All Zones" If And Module 'Climate' Rain Today < 0.3 " And Module 'Climate' Temperature > 45 °F And Module 'Climate' Wind Speed < 10 mph Then Set 'EZ Rain Zone1' On Wait 15 minutes Set 'EZ Rain Zone2' On Wait 20 minutes Set 'EZ Rain Zone3' On Wait 15 minutes Set 'EZ Rain Zone4' On Wait 15 minutes Set 'EZ Rain Zone4' Off Send Notification to All Else - No Actions - (To add one, press 'Action') Thanks Mack
Michel Kohanim Posted April 29, 2009 Posted April 29, 2009 Hello Mack, This is quite strange; your program should have worked as it was and without these acrobatics. I am going to test this scenario and get back to you. With kind regards, Michel
MasterMog Posted April 29, 2009 Author Posted April 29, 2009 Hi Michel, Please don't worry about researching this issue as it is probably something stupid/simple that I'm overlooking. However, I do have another question: Since I have the polling for the Weather Module set at 120 seconds and that corresponds to the last run and last finish time updates of my original programs, wouldn't having one program run the another as shown in my previous response improve performance? If I have the climate checks on the main program then it has the potential to be re-evaluated every two minutes if something in the weather has changed. If I only call the the program with the climate checks when the schedule is active and the KPL check is true then that would eliminate the extra evaluations, correct? I'm fairly new at this program stuff so I'm not sure about what the best practices should be for these type of scenarios. Thanks Mack
Michel Kohanim Posted April 29, 2009 Posted April 29, 2009 Hi Mack, You are correct. Alternatively, you can simply create a folder with those conditions and put your climate program in the folder. This way, the folder's programs will not be evaluated unless the folder condition is true. I like folders because they make things more organized. With kind regards, Michel Hi Michel, Please don't worry about researching this issue as it is probably something stupid/simple that I'm overlooking. However, I do have another question: Since I have the polling for the Weather Module set at 120 seconds and that corresponds to the last run and last finish time updates of my original programs, wouldn't having one program run the another as shown in my previous response improve performance? If I have the climate checks on the main program then it has the potential to be re-evaluated every two minutes if something in the weather has changed. If I only call the the program with the climate checks when the schedule is active and the KPL check is true then that would eliminate the extra evaluations, correct? I'm fairly new at this program stuff so I'm not sure about what the best practices should be for these type of scenarios. Thanks Mack
Recommended Posts