CoolToys Posted October 18 Posted October 18 For a while I have been troubleshooting lights that randomly come on. Always when I need to get up early. Tonight it started so I brought a laptop into my bedroom so I could troubleshoot without setting of any motion sensors so the house didn't think I was getting up. There is a program "bedtime" which I have posted and discussed in other threads. At the end randomly some lights come on as if the alarm was being triggered. Tonight I pulled up the programs and two state variables were wrong but most importantly the "Sunset" program whose condition is "If Sunset" and nothing else was true. If I understand correctly this is only true at Sunset and should run once a day. It is 9:33 pm and Sunset is showing as true. Anyone else having issues like this? Very Random, has worked perfect for over a month and today it forgot the time and started turning on lights like it was sunset. The easy is supposed to be faster but I noticed the "sunset + 15" program didn't run until nearly an hour later. as well. Yes I rebooted. Quote
larryllix Posted October 18 Posted October 18 (edited) Maybe post your program here so that others can have a look at your logic. BTW: If Sunset would leave your program icon green after it ran the first time, until another logic triggered it False and turned it red. I am not sure what you are basing your deduction on. Edited October 18 by larryllix Quote
oberkc Posted October 18 Posted October 18 Have you looked through the program summary to see which programs, if any, ran when the lights came on or other unexpected times? Quote
CoolToys Posted October 18 Author Posted October 18 Yes, The program triggered by Sunset appears to be the bad actor. I was mistaking it for the alarm being triggered in the previous threads, both are closed so I couldn't continue the threads there. That is why I brought the laptop in the bedroom last night. Walking back to my office set off so many other programs and changed the "state" of the house. Last night I started by looking at the "state" and "Early Morning" was "1". At 4am daily I change the "sNight" variable to "0" and change "Early Morning" to "1" so that different things happen. It is the changeover from arriving late at night to leaving early in the morning for work. I want the house to do different things. I am still working on the "home feature" so it can transition based on if we are home or not. I also added "sEarly_Morning" ="0" to the Sunrise cleanup since it has remained at "1" from time to time. Last night at 9:33 when I selected "bBedTime", the "pHome-Sunset" program ran and then the cascade of events, I looked at the "states" to see why that would happen and noticed that "Sunset" was "True" which quickly reset "sNight" to "1" This error should only happen if I press bedtime exactly at or just prior to sunset. Assuming my understanding of state and condition is correct. The entire program if statement for the "pSunset" program is "If Sunset" Since the Sunset program was somehow "true" at 9:33pm all of the related variables reset and programs that light up the house started running. I have a very complex system, and use fewer "scenes" than others. I used to own a security company and scenes don't look "lived in" to pros, so the lights come on more like the old lutron "vacation mode" when no one is home. Although the eisy is much bigger and faster, I feel like the ISY ran my programs faster. I troubleshoot very simply and try to fix one bug at a time. Right now, I am trying to figure out why a program based on sunset could be true at any time other than sunset. Once in a while I think if the eisy is busy at Sunset it misses it. I have come home to a dark house from time to time as well but as soon as I open the garage door, the programs run because sNight =1 and "sOccupied" is also then 1. I haven't pursued that issue, but it may be related. 99 bugs in the code, 99 Bugs in the code Fix one now take it down 104 bugs in the code. Quote
CoolToys Posted October 18 Author Posted October 18 @larryllix, yes I understand the program is "green" on the main Programs/Details tab, and I guess that is what I don't understand is why that is "true" when it is not? If the eisy is based on "states" or "conditions", sunset is a time as defined in the header bar isn't it? So How can I make an event only occur at sunset? This is the same code that has been in the system for over 10 years, and last night when I hit bedtime, which changes sNight to 0, seconds later sNight was 1 again. Maybe I am looking at the wrong issue if Sunset true is normal all the time. If that is the case, I am back to square one, trying to see what is turning lights on after I have gone to bed. the bBedtime button/program work 80% of the time. Now the only other commonality is that it happens when I need to get up early, but the system has no way of knowing that until I get up and set off a sensor in the hallway. Last night both "sEarly_Morning" and "sNight" were "1" which should not happen. That program is here too. I manually changed them both to zero and hit bedtime. This morning they are both still zero. Quote
dbwarner5 Posted October 18 Posted October 18 I think what Larry was trying to point out that ANY program reflects the LAST state it ran in. Check any of your other programs like the 4am program. If a program got triggered true because of a time, or variable, it will run the THEN, and reflect green up UNTIL it runs false. So any sunset program, will turn true at the sunset time, run the THEN, and stay green until it runs false. It doesn't mean that it will run again, or keep running, just that the last time it was tested, it turned true. Hop;e this helps. Simple question, are you sure your time zone is correct and the sunset time reflected at the top of the AC is correct? 2 Quote
Geddy Posted October 18 Posted October 18 12 hours ago, CoolToys said: Tonight I pulled up the programs and two state variables were wrong but most importantly the "Sunset" program whose condition is "If Sunset" and nothing else was true. If I understand correctly this is only true at Sunset and should run once a day. It is 9:33 pm and Sunset is showing as true. As stated above you're probably seeing that it "last ran" the THEN statement (reference of color meanings in the wiki) Meaning the program last ran true. Nothing to worry about just from looking at the color of the program icon. Look at the program summary tab and confirm the last time the Sunset program ran. Also, for future program posting please right click on the program and select "Copy to Clipboard" (the last menu item) and then paste the program as TEXT. Pasting images of your programs aren't helpful for those trying to assist with the programs. Having the text allows those helping to edit the lines and not just suggest changes to an image. 3 hours ago, CoolToys said: both are closed so I couldn't continue the threads there What threads are you talking about? I can open them back up and merge this into those threads if you think it's an ongoing issue. Otherwise, at least linking to them might help others that are trying to help now and not having to rehash troubleshooting steps that were done months ago. Threads are typically closed after a solution has been posted and no other posts have been made for a couple of weeks. 2 Quote
oberkc Posted October 19 Posted October 19 21 hours ago, CoolToys said: Last night both "sEarly_Morning" and "sNight" were "1" which should not happen. Well, if sunrise in your case (or at least if ISY thinks it so) were bfore 4am, you might get this combination of values. Have yo checked to see that your sunrise and sunset times are accurte in the ISY? 1 Quote
IndyMike Posted October 19 Posted October 19 On 10/18/2024 at 10:37 AM, CoolToys said: @larryllix, yes I understand the program is "green" on the main Programs/Details tab, and I guess that is what I don't understand is why that is "true" when it is not? If the eisy is based on "states" or "conditions", sunset is a time as defined in the header bar isn't it? So How can I make an event only occur at sunset? This is the same code that has been in the system for over 10 years, and last night when I hit bedtime, which changes sNight to 0, seconds later sNight was 1 again. Maybe I am looking at the wrong issue if Sunset true is normal all the time. @CoolToys, as others have indicated, a program that uses ONLY the condition "Time is XXXX" will show true until it triggers false. Unfortunately, it will Never trigger false. As a result, you can't use the program status as an IF condition in another program (it will always be true). As a workaround, you could use the "From XX to XX" clause that would evaluate to a false after the time period. The following program will evaluate to false 1 minute after sunset. This becomes difficult if you have embedded "waits" within your program (which you do). You wind up with a race condition between the program and the If statement. It's far better to separate the Trigger (if statement) and program (then clause) into two separate programs so the IF statement won't terminate your running program. Outside Sunset - [ID 0015][Parent 0002] Outside Sunset - [ID 0015][Parent 0002] If From Sunset For 1 minute Then Set 'Outdoor / SC Outside Sunset' On Else - No Actions - (To add one, press 'Action') I'm not sure that's the answer to you issues as nothing that you've posted above would results in your variables both being true ("sEarly_Morning" and "sNight") Please do review your code for any programs that use a program "true" status as a condition. Quote
CoolToys Posted October 25 Author Posted October 25 Sorry for the late delay and all the ideas to check I am on the road a lot, hence the long code effort to both make the house appear lived in and save energy along the way. @dbwarner5, yes the times are all correct however, both of my #Insteon thermostats have locked up, and my system shows several short power outages and one long one recently while I was away, so there were some other things out of sync. Almost enough to think about adding batteries to the house. @IndyMike, I switched from program statuses to state variables a long time ago but there could still be one hidden in the mass of 15 years of adding to my program. I'll keep looking. @Geddy, the other thread I was referring to is this one. The problem vanished again for several weeks. Maybe I am asking questions wrong. The one thing that I know this time I didn't know last time is that the "states" are somehow either not changing, or changing back, which leads to @indymike suggestions in both the lower thread and this there is something hiding in my program. That is why I was trying to see which scenes run in a log format. After making the changes to see the status of the house via a keypad everything worked fine for almost exactly a month and then the lights started going nuts again. My solution is to press the MB Off to trigger the "Bedtime" program and then go in the other room and pull the PLM out of the outlet for the night. Not a wife friendly solution. Quote
dbwarner5 Posted October 25 Posted October 25 @CoolToys From a problem solving perspective are you familiar with the Find/Replace command in the AC? It's a great way to find a variable hidden in a program, or a program being called from another program etc. You just pick what you want to find and then hit the find button repetitively until all instances are found. It wont replace anything unless you press the replace button. This has saved me many many times. Also you said above "Last night both "sEarly_Morning" and "sNight" were "1" which should not happen. That program is here too. I manually changed them both to zero and hit bedtime. This morning they are both still zero." If I understand your programs, at 4am, sNight goes to zero, and at sunrise +4mins, sEarly_Morning also goes to zero. So unless you checked these variables BEFORE sunrise+4min, then they would both be zero as you noted. If you checked it before that then they should be 0 and 1. So I am not sure what the question is anymore.... After some more trouble shooting, if you could try again to explain what you are running into adn when posting programs, right click on the program and select the bottom option of "copy to clipboard", then when you paste it into this forum, the complete program gets inserted. Good luck! 1 Quote
CoolToys Posted October 25 Author Posted October 25 @dbwarner5, yes I did the find/replace looking for the state variables to see if I left one somewhere. No luck yet. 95% of the time when I press the MB_Door_Keypad_AllOn "Off" the "Bedtime" program runs just fine regardless of the alarm being set. Program below. I referenced this in the thread about looking for a log of programs running to try and figure out the error. On occasion the lights in our bedroom will randomly come back on. The only time this should happen is if the alarm goes off. I disabled that program and the "error" did not go away. When I say "randomly", sometimes it will be 30 seconds other times several hours later. Sometimes it won't happen for a week. I thought it could be a motion sensor triggering, however when I brought the laptop to the bedroom to see which sensor it could be, I found state variables not equal to zero when they should be zero after this runs. Last night it worked normally so I have no idea what is causing it. Yes each motion sensor can reset "sOccupied_Main" to 1, but none of the associated programs ran and sOccupied_Main remained at "0". What I did see was that two of the "states", sEarly_Morning and sNight were both "1" which should never happen. After a manual reset of the variables, the system was fine for the night. BedTime - [ID 0016][Parent 0001] If ( 'MB Window Keypad.On' is switched Off Or 'MB Door Keypad 70 9B C0All On' is switched Off ) And $sOccupied_Guest_Edit is 0 Then $sEarly_Morning = 0 $sSnack_Walk = 0 $sAlarm = 0 $sKitchen_Motion = 0 $sNightAway = 0 $sOccupied_Main = 0 $sPartyDay = 0 Set 'MB Kelly Watch Winder' Fast Off Set 'Garage Lights' Off Wait 5 seconds Set 'Kitchen Main Lights 3 way' Off Set 'House Front' Off Set 'Garage Front Porch Lite' Off Wait 5 seconds Set 'Holiday Lights' Off Set 'Back Patio' Off Wait 4 seconds Set 'Dining' Off Wait 4 seconds Set 'LR Pool Table' Off Set 'LR Dining Lamp' Fast Off Wait 5 seconds Set 'HallwayOutletCurio' Off Set 'LR Center Outlet Top' Fast Off Set 'LR Center Outlet Bot' Fast Off Set 'Dining Room Main' Fast Off Wait 5 seconds Set 'LR Lamp Scene' Off Set 'Downstairs Office Lamp' Off Set 'Downstairs Hallway' Off Wait 5 seconds Set 'Entry Art Niche' Off Wait 5 seconds Set 'Stairwell 3 Way' Off Set 'Upstairs Hallway 3 Way' Off Wait 5 seconds Set 'Kelly Office Lamp Scene' Off Wait 4 seconds Set 'Studio Fan' Off Set 'Studio Button Light' Off Wait 5 seconds Set 'Studio A' Off Set 'Studio B' Off Set 'Studio C' Off Wait 4 seconds Set 'MB Cabinets' Off Set 'Movie' Off Set 'Party Night' Off Wait 4 seconds Set 'Party Day' Off $sBedtime = 1 Else - No Actions - (To add one, press 'Action') // Puts house to "sleep" and sets sOccupied to 0. Manual activation only by buttons in Master Bedroom. Here is the only place where sNight and sEarly_Morning are referenced Night to Early Morning - [ID 0047][Parent 0001] If Time is 4:00:00AM Then $sNight = 0 $sEarly_Morning = 1 Else - No Actions - (To add one, press 'Action') // Used to define the difference between going to bed late and waking up very early. 0400 is an arbitrary number. Quote
IndyMike Posted October 25 Posted October 25 @CoolToys, the program you posted above has the variable $sOccupied_Guest_Edit is 0 as a qualifier. I'm not sure where this is controlled, but if it is altered it could cause your program to exit prior to completion. The waits in your program will allow this. Some lights could be left in the incorrect state, and the variable $sBedtime = 1 might not be set. 1 Quote
dbwarner5 Posted October 25 Posted October 25 (edited) Are your bedroom lights the only ones that are acting up? is it one Insteon switch? or several? If it's one, it may just need to be factory reset and restored from the AC? (you have probably done that, but just checking the simple things) I have one light that is through a micro module.. it has its own spirit.. comes on / off whenever and however it wants.. nothing will be running.. I have factory reset it to no avail.. luckily is a light I can live with being random. Need to buy a new micro switch for it sometime. Another trouble shooting thing you could try is: set up a new program that if the bedroom light comes on (during the night or when your bedtime variable is set), then send a notification, email, or turn some other obscure light on. Or it could just be a blank THEN and just see if the program turns true. This will test if the ISY is actually recognizing that the light is on, or if it's something "local" in the switch itself? Edited October 25 by dbwarner5 Quote
CoolToys Posted October 25 Author Posted October 25 (edited) @IndyMike, Below is where I set sOccupied_Guest_Edit and how I clear it if no one is in there for an hour. There is a recording studio and editing room we use as an emergency bedroom. When someone is in there we don't want to turn the lights off on them. In most cases, that area is off. There is a second "Bedtime" program called "Bedtime_Edit_Guest" that is a copy paste of the bedtime less the lights in the editing room and recording studio. That section hasn't been lighting back up. @dbwarner5, Good Question, the lights in our bedroom are the first thing that come on, hence the reason I wanted to see the logs of what program was running so I can try and figure out what is triggering it. The odd thing is that there are three programs that all kick on, none related and it isn't consistent. I noticed today that one of the "disabled" programs I use to test was no longer disabled. From time to time it looks like things change in the program without my input. I do back up every time I make a change so if it goes wonky I can quickly unwind it. Sometimes it is related to the alarm, other times it acts like someone arrived late after the system was put to bed. Most of the time it is the third program below that triggers and why I started checking state variables. One thing to note is that with a late arrival sOccupied is also changed to "1" until the MB_Door_AllOn is pressed off to rerun the Bedtime program and zero out the occupied status. I use "occupied" to mean someone moving around a section of the house. Some final notes. There is something going on with the mix of old and new insteon. Sometimes a program will run and all but one light will go out, and then it goes out at some random time later. I have looked at my PLM to make sure I haven't overloaded it, but yes there are a lot of devices. When I swapped to the eisy, a lot of things changed, and I haven't had time to really understand the whole Poly thing. If the internet isn't connected, is my system not going to work right because it can't communicate with the Poly? The whole reason I don't just use Alexa/Apple Home/Google Home is I want an autonomous stand alone system. I want a truly smart home not just a "connected home". Control 4 has been on my radar as have swapping all of the Insteon lights for Lutron. The PLM has been a weak link in my system since the first one. I am on the 5th PLM now. The problem with Control4/Lutron is that I no longer own an integration company and don't have the access to the pro level stuff. I don't want to be dependent on the installation company. Guest Edit Area In Use Occupied_Guest_Edit - [ID 0044][Parent 0001] If 'EditRoom.1 Motion' Status is On And $sOccupied_Guest_Edit is 0 Then $sOccupied_Guest_Edit = 1 Else - No Actions - (To add one, press 'Action') // Both the "Wakeup Mode" and "occupied test" Occupied Zero set by "Bedtime Program" . Used to turn off the energy saving modes and make the house comfortable and lit properly for people being home. Occupied Guest Check - [ID 0045][Parent 0001] If $sOccupied_Guest_Edit is 1 And Program 'Occupied_Guest_Edit' is False Then Wait 1 hour $sOccupied_Guest_Edit = 0 Else - No Actions - (To add one, press 'Action') // Not verified - idea is to set edit area to empty if no one is inside for over an hour and house is closed up. Energy Saving Strategy. Late Arrival Lights Auto Late Arrival - [ID 000D][Parent 0001] If 'ELK Alarm / Garage Big' Logical Status is Violated And 'Garage Drive Spots' Status is Off And ( $sNight is 1 Or $sEarly_Morning is 1 ) Then Set 'Garage Drive Spots' On Set 'Downstairs Office Lamp' On Set 'Kitchen Under Cabinet' On $sLate_Arrival = 1 Else - No Actions - (To add one, press 'Action') // Lights up a path to bed when arriving after house shuts down or bedtime program runs. Auto Late Arrival Auto Off - [ID 0010][Parent 0001] If $sLate_Arrival is 1 Then Wait 10 minutes $sLate_Arrival = 0 Set 'Garage Drive Spots' Off Wait 20 minutes Set 'Kitchen Under Cabinet' Off Wait 10 minutes Set 'Downstairs Office Lamp' Off Else - No Actions - (To add one, press 'Action') //shuts house back down after a late arrival if no other events are triggered. The Program That usually restarts Night Daily Home - [ID 0003][Parent 0001] If $sOccupied_Main is 1 And $sNight is 1 Then Set 'Laundry Toe Kick' On Set 'Entry Art Niche' On Wait 1 minute Set 'MB Cabinets' On 70% Wait 1 minute Set 'Kelly Office Lamp Scene' On Set 'Stairwell 3 Way' On 50% Wait 30 seconds Set 'LR Lamp Scene' On Set 'Downstairs Hallway' On 50% Set 'HallwayOutletCurio' On Wait 30 seconds Set 'Upstairs Hallway 3 Way' On 50% Wait 30 minutes Set 'House Front' On Else - No Actions - (To add one, press 'Action') Edited October 25 by CoolToys Forgot to add the third program that is usually the last one to run. Quote
IndyMike Posted October 25 Posted October 25 @CoolToys, Have a look at your motion sensor for the guest area. It can disable/interrupt your bedtime program if it fires at the wrong time. I just recently replaced batteries on two MS I sensors that were behaving badly (no low battery set). Aside from that, when programs fire without a trigger or re-enable themselves I start thinking about SDcards and the like. A program should Never spontaneously enable itself (you can enable a program with another program). I have no experience with the Eisy, so I will bow to others who do. 1 Quote
dbwarner5 Posted October 26 Posted October 26 @CoolToys Not sure about the bedroom yet, but a couple of points about your programing that yo may need to watch out for: Occupied_Guest_Edit and Occupied Guest Check - looks like they should work together. Auto Late Arrival Auto Off - [ID 0010][Parent 0001] If $sLate_Arrival is 1 Then Wait 10 minutes $sLate_Arrival = 0 Set 'Garage Drive Spots' Off Wait 20 minutes Set 'Kitchen Under Cabinet' Off Wait 10 minutes Set 'Downstairs Office Lamp' Off --I would move this line $sLate_Arrival = 0 to the last line. Each time a WAIT completes, it rechecks the IF statement, so this program will never complete. After the second wait, it will evaluate as false. The last program looks solid. 1 Quote
CoolToys Posted October 29 Author Posted October 29 (edited) @dbwarner5, I use the same method for lots of temporary lighting like "snack walk" or "garage lights", and all work fine. Actually, I don't understand why the logic would "recheck the wait", once a state is valid to start a program shouldn't it finish? And isn't the reverse true that if it rechecks should it start at the top and get stuck in an infinite loop on the first wait line? I'll have to go back and look at the ISY programming manual before I make that change. Still no idea what I did wrong on the bedroom lights. They have been normal for a week, and I haven't changed anything. Edited October 29 by CoolToys Logic change. Quote
larryllix Posted October 30 Posted October 30 5 hours ago, CoolToys said: @dbwarner5, I use the same method for lots of temporary lighting like "snack walk" or "garage lights", and all work fine. Actually, I don't understand why the logic would "recheck the wait", once a state is valid to start a program shouldn't it finish? And isn't the reverse true that if it rechecks should it start at the top and get stuck in an infinite loop on the first wait line? I'll have to go back and look at the ISY programming manual before I make that change. Still no idea what I did wrong on the bedroom lights. They have been normal for a week, and I haven't changed anything. Any time a program executes a Wait or Repeat it allows the system engine to re-evaluate things and do I/O processes etc. When the ISY logic engine discovers your state variable has changed, it re-evaluates every program that contains that state variable. If it finds that variable in your If section has changed, it cancels any action already taking place in that program, and executes (starts over) the Then or Else section, depending on the outcome of that If logic. IOW You have created a monostable multivibrator oscillator that will never get past the next Wait 20 minutes line. Quote
CoolToys Posted October 30 Author Posted October 30 @larryllix, @dbwarner5, I have set up two programs with the exact same event results as above, one with the state variable reset to zero at the top and one at the bottom. Each setting three lights with 10 minutes in each wait statement. Both work which as a programmer makes no sense. Back to my first question, once a program starts, it should complete. The wait should have no effect. If it did then the program for the garage light should not work but it does. The same program for the stairwell light likewise should go into an infinite loop if that is the case and never solve, yet it too turns off and the state goes to "0" in 10 minutes. I don't get why one of them doesn't fail and I don't get why they both work. The re-evaluation thing is an odd "feature" that doesn't follow standard logic but if that is how the eisy is supposed to work, then why does the program with the variable reset at line 2 work? The only thing I can conclude is that the "reevaluation" isn't happening and once the execution of the "then" statement starts, it completes. I will keep testing and watching to see what it does. Quote
larryllix Posted October 30 Posted October 30 (edited) 8 hours ago, CoolToys said: @larryllix, @dbwarner5, I have set up two programs with the exact same event results as above, one with the state variable reset to zero at the top and one at the bottom. Each setting three lights with 10 minutes in each wait statement. Both work which as a programmer makes no sense. Back to my first question, once a program starts, it should complete. The wait should have no effect. If it did then the program for the garage light should not work but it does. The same program for the stairwell light likewise should go into an infinite loop if that is the case and never solve, yet it too turns off and the state goes to "0" in 10 minutes. I don't get why one of them doesn't fail and I don't get why they both work. The re-evaluation thing is an odd "feature" that doesn't follow standard logic but if that is how the eisy is supposed to work, then why does the program with the variable reset at line 2 work? The only thing I can conclude is that the "reevaluation" isn't happening and once the execution of the "then" statement starts, it completes. I will keep testing and watching to see what it does. Only state variables can cause the re-evaluation of the If section. Integer variables will not. As a de facto standard, it is good practice to indicate your usage of state variables with a prefix, such as $sVariableName so that confusion, such as this is mostly avoided later. Edited October 30 by larryllix 1 Quote
dbwarner5 Posted October 30 Posted October 30 @CoolToys To larry's point, I label all my Integer variables with the letter I in front so that if am using that variable, I know it is NOT going to effect the program's IF statement. If it doesn't have an I, I know its a state variable (which are my majority). On a separate thread, I recently covered some of the Programing logic in the ISY. check this thread. Quote
CoolToys Posted October 31 Author Posted October 31 @larryllix, and @dbwarner5 I too mark all of my variables with an "s" or "i" prefix as @dbwarner5 saw in the "Auto_Late_Arrival" program that started this part of the discussion. After reading @dbwarner5 other post, about atomic and re-evaluation, I will agree like the others, with a IT degree and programming background, this is odd logic. It implies that I should remove the waits and just use other programs to delay the lights turning off like old BASIC subroutines. If UDI chose to do this "atomic" re-evaluation at each point for some reason, that is their choice. It seems like a lot of extra work for UDI to make this happen since I don't think this is a core Linux feature. The part that really throws it off is that both programs below do exactly the same thing except for when the $sLate_Arrival is changed to "0". The lights go off +-2 minutes of the program no matter where I put the state change. Either way this isn't helping find the randomness problem I have with the bedtime program that works 98% of the time. Auto Late Arrival Auto Off - [ID 0010][Parent 0001] If $sLate_Arrival is 1 Then Wait 10 minutes $sLate_Arrival = 0 Set 'Garage Drive Spots' Off Wait 20 minutes Set 'Kitchen Under Cabinet' Off Wait 10 minutes Set 'Downstairs Office Lamp' Off Auto Late Arrival Auto Off - [ID 0010][Parent 0001] If $sLate_Arrival is 1 Then Wait 10 minutes Set 'Garage Drive Spots' Off Wait 20 minutes Set 'Kitchen Under Cabinet' Off Wait 10 minutes Set 'Downstairs Office Lamp' Off $sLate_Arrival = 0 Quote
larryllix Posted October 31 Posted October 31 (edited) You have to remember that ISY did not start out on a Unix-like platform but rather on their own home-brewed platform. Multi-tasking had to be created from the ground up. UDI choose to do it just like MS did with early Windows, by using voluntary releasing of your task's time slice mechanisms. That is where the Wait and While constructs came into the picture. Today's much faster multi-tasking O/S provide cleaner ways of providing methods of multi-tasking but ISY programs are already in place and to change the logic behind so many established ISY level programs would disrupt everybody's systems. Your first program with the $sLate_Arrival = 0 in the first few lines will never execute it's following lines, according to known ISY execution rules. If you are still getting some random action, perhaps we should be considering it is coming from somewhere else. Have you done a search for that variable through all your programs, using the search option provided in ISY? I usually find some forgotten program that is fiddling with the variable, maybe re-enabled by an update or transfer of programs to my new polisy box. I don't mark my Integer variable except my constants with a $cXXXXXXX eg. $sXXXXXXXX = $cTRUE $sKitchen.mode =$cVERYDIM Edited October 31 by larryllix Quote
CoolToys Posted October 31 Author Posted October 31 @larryllix, I understand where ISY came from, I started out with a 99 when Leviton purchased HAI and made a mess of a great product before discontinuing it. That said, the program you said will never run works just fine. In both versions, I have tested each and they both work exactly the same. While I trust you have a deeper knowledge of ISY than I do, I do like to test things before I take them as gospel. That Late_Arrival program is at least 5 years old and hasn't failed once. Yes I have searched for that variable and it is in two places. "Auto_Late_Arrival" where it is set to "1" and "Auto_Late_Arrival_Off" where it is set to "0". The same methodology is used for "Late_Night_Snack" as well, basically the opposite of arriving late, it is getting up after bedtime and leaving a bedroom. It lights the same path backwards. Again with "sSnack" at the beginning of the code, the lights go out on time in order. So again I am confused by this atomic thing since the code works just like old BASIC. The only one doing random things is the Bedtime program, and it hasn't gone wonky in 10 days now. It ran very slowly last night, taking about twice as long as normal. The place I am watching to see if I have a code error is if it is "Night" and the house isn't occupied and it becomes occupied. The value of "sOccupied", "sGuest" and "sNight" changes the lighting in the house. If no one is home, only the lights which are visible through windows on the outside of the house come on. If there are guests, a couple more lights in that section. When we come home and the house was empty a couple more lights come on and the states all adjust. Last night we came home late, logged in from the driveway and verified the house was in Night Empty mode, and I watched it changed to Occupied mode when I opened the garage door. Bedtime worked fine, so I am still stuck as to why on occasion it acts like the alarm is set or someone is moving around the house downstairs. Disabling or Removing the ELK poly may be the next step. The other thing I want to dig deeper into is the autonomy of the eisy with Poly's. Is the eisy dependent on an internet connection? Once I pay for a poly is the eisy autonomous or connected? If it is connected, why not just use Alexa or Siri which both control my Matter blinds just fine as well? I started with HAI and moved to the ISY because I wanted to build an "Autonomous" smart house, not a "Connected" house dependent on an outside service. One other possibility is that the internet connection was not working when the "bedtime" program went wonky. All of this goes back to my original thread about wanting the logs to see what programs run when. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.