Mark Sanctuary Posted March 27, 2008 Posted March 27, 2008 Post the programs here so we can see whats up. Don't forget to use code quotes, easier to read then. [/code ]
mcrean Posted March 27, 2008 Author Posted March 27, 2008 Ok, these are the 3 programs: All in non-conditional folders. Like I stated, these worked 2 nights in a row. Desk Spots Turns Off Night If Control 'KeypadLinc A (Deck Spots)' is switched Off And From 10:00:00PM To Sunrise (next day) Then Wait 1 hour Set 'Malibu Lights' On Wait 4 minutes Set 'Malibu Lights' Off Wait 1 minute Set Scene 'Deck Spots Button' On Else - No Actions - (To add one, press 'Action') Deck Spots Turns On Night: If Control 'KeypadLinc A (Deck Spots)' is switched On And From 10:00:00PM To Sunrise (next day) Then Stop program 'Deck Spots Turns Off Night' Else - No Actions - (To add one, press 'Action') Deck Spots Status: If Time is 10:01:00PM And Status 'Deck Spots' is not On Then Run Program 'Deck Spots Turns Off Night' Else - No Actions - (To add one, press 'Action')
Mark Sanctuary Posted March 27, 2008 Posted March 27, 2008 Programs look normal. So your finding that when the scheduled part is in the program it works at 10:00pm, and when its in a condition folder it works at 10:01pm? Sounds like some offset between folders and programs in the event loop, not sure if this is done on propose or not.
mcrean Posted March 27, 2008 Author Posted March 27, 2008 Programs look normal. So your finding that when the scheduled part is in the program it works at 10:00pm, and when its in a condition folder it works at 10:01pm? These recent programs are working normally so far. No issues there. The issue is when they are in a time conditional folder, they execute the first night, but not the second. I feel this needs looking into because I think there is a bug that need working out. When the program 'Deck Spots Status' is in a folder that enables at 10:00PM, it runs on schedule at 10:01PM. I have always had it that way. Folder opens at 10:00 and program set to run at 10:01. It executes properly the first night, leaving the status as true. If I do nothing to the programming and just turn off the deck spots sometime before 10:00 PM the next night, the 'Deck Spots Status' program says last run time is tonight at 10:01, but never goes to true, therefore never running the Then line. I am thinking that there is a bug with the conditional folder. Maybe over a sunrise or day lapse or something. I would request anyone who is trying to duplicate the problem to do it exactly as I had. Use the earlier code, put them in folders with the conditions the same as mine (10:00 to Sunrise (Next Day)). Use the programs posted by IndyMike on March 25 at 3:24 PM. Obviously use your own test modules, but leave the core of the program as is.
IndyMike Posted March 27, 2008 Posted March 27, 2008 Michael, I've changed the folder time conditional to match your 10:00 PM to Sunrise. I'll be on a "winter camp out" tomorrow night. It'll be late Saturday before I can get back with you. IM
IndyMike Posted March 27, 2008 Posted March 27, 2008 Micheal, I checked your latest code post again and noticed something different from what I was testing. You are using a "Control" trigger whereas I'm using a "status". Sorry, this was a big miss on my part. Here's what I ran - Folder Conditions Folder Conditions for 'Test Program mcrean' Add conditions to limit when programs in this folder are allowed to run. If From 4:45:00PM For 15 minutes Then Allow the programs in this folder to run. Trigger Program 1 (control trigger) - Program shows being run at 4:46 but does not call "mcrean2" If Control 'Entry Patio' is Switched Off And Time is 4:46:00PM Then Run Program 'mcrean2' Else - No Actions - (To add one, press 'Action') Trigger Program 2 Program runs properly (status trigger) If Status 'Entry Patio' is Off And From 4:50:00PM For 1 minute Then Run Program 'mcrean4' Else - No Actions - (To add one, press 'Action') Trigger Program 3 (Control trigger) - Program status shows being run at proper time, but does not call mcrean6. If Control 'Entry Patio' is Switched off And Time is 4:48:00PM Then Run Program 'mcrean6' Run Program 'mcrean5' (Else Path) Else - No Actions - (To add one, press 'Action') Called program (3 programs - same code) If Control 'Master Fan' is switched Off Then Send X10 'E1/On (3)' Wait 10 seconds Send X10 'E1/Off (11)' Else - No Actions - (To add one, press 'Action') This really has nothing to do with the folder conditions. It's the usage of the control trigger. Consider the following code (no folder constraints): If Control 'Entry Patio' is switched Off And From 5:40:00PM For 5 minutes Then Run Program 'mcrean2 Copy' Else - No Actions - (To add one, press 'Action') 1) If I turn off the 'entry patio' at 4:00, the program status will reflect a run but it will not execute the "then". It received a "control trigger" but the time was false. 2) When 5:40 occurs, the program again shows a "run" status but not execute the "then". It receive the time trigger, but the control status has not been executed. 3) If I turn off the 'entry patio' between 5:40 and 5:45 the program will return 'true' and call the 'then'. Of the above, the only thing that I might call "odd" is the fact that the program shows a run time with only one trigger present (then not executed). This can be confusing until you consider the fact that the program is indeed running, it's just running the else path. For your purposes, I really think you want to use a 'status' trigger. IM
mcrean Posted March 28, 2008 Author Posted March 28, 2008 Of the above, the only thing that I might call "odd" is the fact that the program shows a run time with only one trigger present (then not executed). I think a run time at the triggered time or at the trigger state is normal. The time or trigger caused the program to evaluate the ifs and decide if it is true or false. I am seeing that in all my programs. What I was doing was calling a status 1 minute after the folder opened to determine by the newly privileged program to evaluate the Spots status. If it evaluates an OFF, then run the Then portion of the delayed malibu light program. The If part of the Switched off portion of the Off at night was for if I switched them off AFTER 10 PM. I guess I could have moved the status program outside the 10PM folder and left the Deck Spots On/Off in the folder. Might work that way. For your purposes, I really think you want to use a 'status' trigger. My Status program does use a Status trigger, but my Off at Night uses a control trigger.
IndyMike Posted March 28, 2008 Posted March 28, 2008 I think a run time at the triggered time or at the trigger state is normal. The time or trigger caused the program to evaluate the ifs and decide if it is true or false. I am seeing that in all my programs. What I was doing was calling a status 1 minute after the folder opened to determine by the newly privileged program to evaluate the Spots status. If it evaluates an OFF, then run the Then portion of the delayed malibu light program. The If part of the Switched off portion of the Off at night was for if I switched them off AFTER 10 PM. I guess I could have moved the status program outside the 10PM folder and left the Deck Spots On/Off in the folder. Might work that way. For starters, I stand corrected. I went back to your original post and saw where you correctly had a status trigger in the "10:01 deck spots status" program. I'll try the 10:00 PM to sunrise routines again. In the meantime, do you have a backup where you could check where the status program was located? IM
mcrean Posted March 30, 2008 Author Posted March 30, 2008 In the meantime, do you have a backup where you could check where the status program was located? It was located in the folder that was open from 10:00 PM to Sunrise(Next Day). Are you asking me to verify this? I am trying another test and the problem is NOT happening. This is in a Folder with conditions of 10:00 PM to Sunrise(Next Day): If Time is 10:01:00PM And Status 'Icon 2' is On Then Send Notification to All Else - No Actions - (To add one, press 'Action') I am getting the notification each night. Go figure. This is not any different than the other "Status" Program, well except it is not calling another program. I will try that next.
mcrean Posted March 30, 2008 Author Posted March 30, 2008 You know, I just went back and read Chris Jahn's first reply to my first post. I totally missed the part where he tells me to move the Status program out of the folder. Sorry Chris! IndyMike, Let me know if you duplicate it, but I am satisfied now that my programs are functioning. I just put time conditions in the programs and eliminated the folders. Thank you again for all your help. If anything, I learned A LOT about programming the ISY.
IndyMike Posted March 30, 2008 Posted March 30, 2008 You know, I just went back and read Chris Jahn's first reply to my first post. I totally missed the part where he tells me to move the Status program out of the folder. Sorry Chris! IndyMike, Let me know if you duplicate it, but I am satisfied now that my programs are functioning. I just put time conditions in the programs and eliminated the folders. Thank you again for all your help. If anything, I learned A LOT about programming the ISY. Michael, When Chris speaks (or any of the UDI people) we should definitely listen. Having said that, I view Chris's post as more of a suggestion. Your program trigger "At 10:01PM and Status XXX" is already completely constrained. As such it doesn't have to be in a time constrained folder. That's very different from saying that it can't be in a timed folder. To check this, I set a timed folder containing a program with a 1 second differential: Folder: From 10:00 AM to Sunrise (next day) Sub Program: If time is 10:00:01 AM and status XXX is off. The above properly evaluated the status condition 1 second after the folder was enabled. There should be not problem with a one minute differential. It may be more efficient (execution timing) for the program to be outside the timed folder, but I believe your program should function either way (Chris - please let me know if I'm mis-speaking here). Test Status I've run my folders for the past two nights with a "10:00 PM to Sunrise" folder time constraint. The programs executed properly each night. To date I have not found a way to "trip up" the status routines. While I'm happy that your programs are now functioning properly, I'm a bit bothered by the fact that we haven't resolved the original problem. Others have reported similar problems with time constrained folders as well (Frank in this thread). I have a feeling we may be coming back to this at a lated date. To that end, the following is my attempt to summarize your saga: Summary 1) Your problems appear to revolve around an incorrect interpretation of the status condition "If time is 10:01 and Status XXX off" when this program is included in a time constrained folder (10:00 PM to Sunrise). Program appears to execute properly on the 1st day, only to fail (intermittently?) on successive days. 2) If the status program is moved to a folder without time constrains, it runs normally. 3) On 3/24 you reported the following: Interesting. I turned on the Deck Spots via the KeypadLinc (after 10:00 PM) and now 'Deck Spots Turns On Night' program is showing 'Running Then', although there is no delay in the Then statement. It does show a last completed time at the same time it was started. Maybe it is a clue? This function of this program is to stop your 'Deck Spots Turns Off Night' program. No way should this have 'stuck' in the running then state. I did notice (in another thread) that you were using a windows mobile device to access your ISY and having some problems with lockups. It's possible that this is what caused your stuck then. I can't simulate this. 4) We've gone through a couple of ISY updates during the course of this thread (started at 2.6.1 - now 2.6.3). Although unlikely, I suppose it's possible that something was corrected along the way. IM
mcrean Posted March 30, 2008 Author Posted March 30, 2008 Thank you Indy Mike. My test program I mentioned earlier is working, however after posting I went and looked and the program state was false, having last run at 10:01. There is no reason it should say False. I got the notification though (Then routine). I now have the Test program call another program to send the notification. Both are in the time constrained folder. We will see. New code posted below. Folder Conditions for 'Test Folder' Add conditions to limit when programs in this folder are allowed to run. If From 10:00:00PM To Sunrise (next day) Then Allow the programs in this folder to run. Status Trigger Test: If Time is 10:01:00PM And Status 'Icon 2' is On Then Run Program 'Test 2 Pager' Else - No Actions - (To add one, press 'Action') For complete posting here is the pager program: If Control 'KeypadLinc C' is switched On Then Send Notification to All Else - No Actions - (To add one, press 'Action')
IndyMike Posted March 30, 2008 Posted March 30, 2008 My test program I mentioned earlier is working, however after posting I went and looked and the program state was false, having last run at 10:01. There is no reason it should say False. I got the notification though (Then routine). I now have the Test program call another program to send the notification. Both are in the time constrained folder. We will see. New code posted below. Folder Conditions for 'Test Folder' Add conditions to limit when programs in this folder are allowed to run. If From 10:00:00PM To Sunrise (next day) Then Allow the programs in this folder to run. Status Trigger Test: If Time is 10:01:00PM And Status 'Icon 2' is On Then Send Notification to All Else - No Actions - (To add one, press 'Action') Michael, Once again, I'm a bit confused (don't worry, it happens a lot). I'm assuming you were running the above code - please confirm. Allow me to re-state what may be obvious to you: 1) Your program status can only become true if at 10:01 PM your ICON 2 status = 0n. Last run time would be 10:01 PM 2) If can become false at any other time (within the folder time constraint) that the Icon 2 status changes. This would cause the program to re-execute, due to a status change in the Icon 2 unit, and evaluate to false (since the 10:01 time constraint is false). This would also update the "last run time" for the program. The constant in the above is that any time a program is triggered, it updates it's run time. Are you indicating that your "status trigger test" program indicated a False with a run time of 10:01? Please Confirm This would indeed be odd since you indicated that you received the "notification". The notification would have required a "true" status at 10:01 PM. Obviously, you can't have both a true and a false evaluation at 10:01. IM
mcrean Posted March 31, 2008 Author Posted March 31, 2008 You know, it is funny. A lot of times I think my post gets too explanatory and seems very windy to me, so I end up taking out half of it, thinking I am over explaining it. As a result, I take out crucial information. The code I posted, that you quoted, I am confirming it is the one that showed false even though I got the notification. It is a test program. Icon 2 never changes state, there are no other links to it, no timers or triggers. It remains on. Your statements 1 and 2 are understood by me. The Icon never changes state. I am trying to get a solid 'Trip Up' as you would say, so we can give UD something to work with. Tonight the Status Trigger Test showed True after running at 10:01PM, but in my experience, the program works fine the first night after a modification to programming (programming which I show on my second post stating I call another program to notify me). We will see tomorrow night. I am posting my progress in testing just to share with all.
mcrean Posted April 6, 2008 Author Posted April 6, 2008 It appears I have experienced Frank's problem. I went on a quick vacation Friday night. I have a KeypadLinc that I use Button D for Vacation Mode. I have two folders; One for Vacation Mode On, and the other for Vacation Mode Off. I have instructions in both folders. I checked the ISY log and verified it saw me turn on the Vacation button. *KEEP IN MIND THIS ARRANGEMENT WORKED FINE A MONTH AGO FOR A WEEK AND NO CHANGES HAVE BEEN MADE TO IT* The problem: The instructions in the 'Vacation Mode On' folder did not execute when Vacation Mode was on. The program summary shows no execution time/dates. (I have reset the ISY since the vacation a month ago). I came home yesterday and turned off 'Vacation Mode'. Again I verified the ISY saw it. The instructions in the 'Vacation Mode Off' folder failed to execute last night. Programs showing have last run 2 nights ago. There is a problem with the folders operating correctly. I am going to re-write the programs to not use the folders.
Chris Jahn Posted April 8, 2008 Posted April 8, 2008 Thanks for the detailed explanations and examples, it may help in finding the bug or misunderstanding (I'm not sure which one it is yet!) Assuming its a bug, I'm not sure if we'll have a fix for it in this release.
Recommended Posts