Jump to content

Long Running Randomness


CoolToys

Recommended Posts

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.

 

Link to comment

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

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.

Link to comment

@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.

Screenshot 2024-10-18 at 7.28.03 AM.png

Screenshot 2024-10-18 at 7.34.29 AM.png

Screenshot 2024-10-18 at 7.36.12 AM.png

Link to comment

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? 

  • Like 2
Link to comment
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)

image.png

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.

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

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...