Jump to content

Garage Door Opened at 3AM


Kevin N

Recommended Posts

Posted

Hello, I have an ISY994i/IR PRO running firmware 5.3.4 and I had a very concerning issue last night.    I have a garage door on a relay that's been working great for many years with no issues.  Yesterday, I wanted to fix an annoyance with Alexa and the garage door.  Sometimes my echo devices will hear me in two different rooms when I tell her to  turn on the garage door, thus opening/closing, then either stopping and reversing when heard in the second room.  My solution was to create a "Garage Door Open" program and "Garage Door Close" program to check the status of the garage door sensor to determine if the door was already open or closed.  I got that all setup and added to Alexa via the portal, though the program did not operate as I expected, it would still allow the door to trigger the open or close regardless of the status.  

This morning I was awakened by my house alarm going off because motion was detected in my garage.  When I ran outside to see what was going on, I notice the garage door was open.  I was sure I closed it before bed, so I started looking through the logs to see what happened.   There were no alexa command issued, so I ruled that out, but my ISY log shows the garage relay was turned on at 3AM.   I have no idea what caused this, though I have noticed after power outages, etc... I would get strange messages from my battery devices in the past.  Can anyone give me any hints as to what is happening?  

Screen cap image of my log file and my program, though I don't think they are related.  https://imgur.com/a/jkIZ8p3

Any help is appreciated.

Regards, Kevin

 

GkQPgIA.png

jyXDuDE.png

Posted

It was most likely triggered by the query program if you have it. I would disable the program so the only way it will run is when you run it directly from Alexa. 

Posted

As pointed out 3am is the time the default Query All program runs.  Lots of debate on whether this program is needed or annoying.  I personally use it, it does however stress the Insteon network and use a lot of a 994's processing power... especially on larger installations.

2 hours ago, Kevin N said:

Sometimes my echo devices will hear me in two different rooms when I tell her to  turn on the garage door, thus opening/closing, then either stopping and reversing when heard in the second room.

Are you using two different Amazon accounts or something?  I have echo devices all over the place, and yes sometimes multiple devices wake up on the wake word, but they manage to figure out on there own which one is hearing best and the others click off and don't execute.

image.thumb.png.c48c1ad3ce5572588e19ab175132f551.png

2 hours ago, Kevin N said:

There were no alexa command issued, so I ruled that out, but my ISY log shows the garage relay was turned on at 3AM

If the 'sensor' detects when the door is open it appears that it really opened much earlier at 9:14PM, or is the sensor  inverted?

Quote

'Garage Sensor' is Off AND 'Garage Relay' status is Off

Keep in mind that statements joined by an AND mean 'at that moment', and keep in mind that either CHANGING will trigger the possibility of the program Running.   With garage doors is somewhat problematic because the sensor status doesn't change in one direction until the door has travelled, in the other direction the sensor will change almost immediately.   The other problem here is the program itself running is causing the program to retrigger.  In other words, if the IF triggers the program and then begins to run, the very first thing in the program is to change the Garage Relay's status.. WHICH causes the program to STOP and STARTOVER.

to protect the body from the IF you can use the classic two program method...

If
             Sensor is off
    AND Relay is off
then
      Run Program 2 (then)
else
      (none)

Program 2 (disabled)
If
    (none)
then
     disable program 1
     turn on relay
     wait
     turn off relay
     enable program 1
 

Program 2 is always disabled.  Disabled program do run when run by another program or run manually.   Program 2 is also disabling program 1 while it's running to protect from being restarted by a re-trigger.

I'm not entirely sure how you have this setup so I'm having a bit of difficulty following how your program is supposed to work, but it's failing because it gets re-triggered as soon as it starts running.

 

Posted
5 minutes ago, tlightne said:

Just FYI I have my Alexa's that are close to each other with different wake names..

You're not supposed to need to do that.  The magic has always worked well for me, we have many echo's.  Apparently the feature is called Spatial Perception, it's always worked well for me, here's a thread.

Posted

MrBill,  

Thanks for the input, the garage sensor is ON when the door is closed.  Because of Alexa's listening screw ups mentioned above I was trying to prevent the relay from being triggered twice.  This does not happen a lot, but enough to be an annoyance when it does.   I had it setup so if the door was open, and I verbally told her to "Close The Garage Door", which is set to run the Garage Door Close program, it would make sure 2 conditions were met, the door was open via Garage Sensor Status = off, and the relay was off.  When the relay is turned on, the status stays on unless its instructed to turn it off.    It behaved as expected when I manually ran the program via the ISY (run if), the Garage Door Close program would not open the garage when ran while the door is shut, but when I had it setup for Alexa to run the "Garage Door Close" program it would also open the door even if it was closed (sensor would be set to ON (door in closed mode).   The 21:14 entry in the log is when I closed the door for the night, so the status is correct for closed.  It's been a while since I setup any new programs, so I'll take a look at your suggestion on how to setup the door.

Something I did not realize before I made the post, I had a "Query All" program running at 3AM.  I have no idea why that was there, I guess I did that a while back, but not sure why or what I was thinking at that time, so I deleted it.

At this point, I just set things back to how it was before I started messing with it.  Nobody likes seeing an armed half naked many running out of his house 6AM on a Sunday morning... LOL.  I'm headed out of town tomorrow for a couple days, so I'll make another attempt at this when I return.  For now, I think I'm ok by putting it back the way it was, and removing the Query All program that was running at 3AM.

Thanks for the advice,

Kevin

 

Posted
1 hour ago, Kevin N said:

Something I did not realize before I made the post, I had a "Query All" program running at 3AM.  I have no idea why that was there, I guess I did that a while back, but not sure why or what I was thinking at that time, so I deleted it.

@Kevin N Welcome to the forums!

The "Query All" program was the default/stock program in the ISY994 firmware. It was used to check status of all devices. It's not necessarily needed as long as you have good communication within your system, but it can be helpful if you have line noise or if the ISY994/PLM are missing commands or status updates. 

Since you just created the program and it was looking at the status the 3am query might have triggered if the status changed and the ISY updated and triggered the program. I don't have any of the devices you are using and would never automate my garage (for the fact I don't want something able to randomly open (or close) my garage). So I can't help with a suggestion of how to alter the logic so that doesn't happen, but deleting the 3am query all is fine...as long as you don't have other communication issues. 

You should also check if you have the setting of "query at restart" selected (on Configuration tab) as that could potentially trigger if the ISY994 reboots randomly. 

 

  • Like 1
Posted
14 hours ago, Kevin N said:

I had a "Query All" program running at 3AM.

That is a default program that was included when 994's shipped.  It's apparently no longer included, and as i mentioned above some people like having it, some people don't like it.  I've personally always used it and not had problems.  The purpose of it, if the ISY gets out of synch with the actual state of a device, the query all will bring it back in synch.

You need to study up a little on how Programs work, although I explained it above let me try again.  This program:

jyXDuDE.png

will never finish.  Here's what happens:

When the If is evaluated True because both Sensor and Relay are both OFF, the first thing that happens is the relay turns on. Because "wait" or a break in the program is next the program will stop, because the IF was re-evaluated -- the wait 20 second will never complete and the set relay off will never happen (at least from this program, you might have another program that's misfiring because you don't understand how If's are re-evaluated constantly).   To fix this program you can use the two program example I provided above.    If your intention is this program is being called from the portal you can also likely simply disable this program and it should still run from the portal (I've never tried that tho actually).  Disable only disables the auto sensing functionality of the IF statement... it doesn't prevent the program from running when run from another program, or run manually, so likewise the portal (Alexa) should still be able to run the program.

 

  • Like 1
Posted

@Kevin N   to illustrate the above here is a test situation you can create.  First create a State Variable called something like sTest and leave its value at zero.

Now create a simple program:

If
     $sTest = 1
then
      $sTest += 5
      Wait 1 minute
      $sTest += 100

Save your new program and then go back to the State Variables page (yes it must be a State Variable for this demonstration), Manually change the Value of the variable to 1.  Notice that the value immediately increments to 6 as expected, but the wait never completes and it never becomes 106.

Chapter 2: now disable the program.  Set sTest to 1 again... note that it doesn't automatically increment to 6 this time... then run it manually. it will increment immediately to 6 and after 1 minute the value will be 106.
 

 

  • Like 3
Posted

After a PM discussion with someone.... back for:

Chapter 3:  edit the program  (hint: only have one program if $test in the IF statement, multiple programs may cause unexpected results so EDIT the original program)

If
     $sTest = 1
then
      $sTest += 5
      Wait 1 minute
      $sTest += 100
else
      wait 5 seconds
      $sTest += 1000

Set the variable back to zero then re-enable the program (we left it disabled in Chapter 2)

Now manually set the variable to 1, it will change to 6 almost instantly, then about 5 seconds later it will be 1006.  What happaned? 1+5 is 6... the wait had just begun when the ISY Re-evaluated the IF statement, its now false so the current wait ends and then else begins to run.. where we wait 5 seconds just to be able to watch the variable change.

---

Chapter 3B: now disable the program again.  Set sTest to 1 again... note that it doesn't automatically increment to 6 at this time... then run it manually. it will increment immediately to 6 and after 1 minute the value will be 106. In this case Else never runs.

 

  • Like 1
Posted

I also recall a time when a setting (trigger reverse?)  on the iolinc could result in the overnight query triggering a garage door.

  • Like 1
Posted
On 7/11/2023 at 6:08 PM, MrBill said:

After a PM discussion with someone.... back for:

Chapter 3:  edit the program  (hint: only have one program if $test in the IF statement, multiple programs may cause unexpected results so EDIT the original program)

If
     $sTest = 1
then
      $sTest += 5
      Wait 1 minute
      $sTest += 100
else
      wait 5 seconds
      $sTest += 1000

Set the variable back to zero then re-enable the program (we left it disabled in Chapter 2)

Now manually set the variable to 1, it will change to 6 almost instantly, then about 5 seconds later it will be 1006.  What happaned? 1+5 is 6... the wait had just begun when the ISY Re-evaluated the IF statement, its now false so the current wait ends and then else begins to run.. where we wait 5 seconds just to be able to watch the variable change.

---

Chapter 3B: now disable the program again.  Set sTest to 1 again... note that it doesn't automatically increment to 6 at this time... then run it manually. it will increment immediately to 6 and after 1 minute the value will be 106. In this case Else never runs.

 

I think I get what you're saying here, but that is so confusing, I've coded with PERL, PHP, and several other languages over the past 25 years, and all of those would complete the "THEN/ELSE" section before being re-evaluated, if it was in a loop.   What you're saying is the IF is being re-evaluated before all the lines in the THEN are executed, unless disabled and ran manually.  <my head explodes>  LOL.

Regards, Kevin

 

 

Posted
10 hours ago, Kevin N said:

I think I get what you're saying here, but that is so confusing, I've coded with PERL, PHP, and several other languages over the past 25 years, and all of those would complete the "THEN/ELSE" section before being re-evaluated, if it was in a loop.   What you're saying is the IF is being re-evaluated before all the lines in the THEN are executed, unless disabled and ran manually.  <my head explodes>  LOL.

Regards, Kevin

 

 

Exactly, but only when the time slicing executive can get a break. This is done during any Wait, or Repeat loop, in the ISY code. Those lines are a voluntary "let somebody else have a time slice" construct.

  • Like 1
Posted
11 hours ago, Kevin N said:

What you're saying is the IF is being re-evaluated before all the lines in the THEN are executed, unless disabled and ran manually.  <my head explodes>  LOL.

Correct.  The ISY is event driven, and if an event occurs it can interrupt a program.  Wait, repeat and maybe another object I'm not thinking of at the moment in a program create a pause that gives the chance for the program to be interrupted without completing.

It catches programmers off guard, but at the same time it has it's benefits... from another current thread

If
      Motion is switched On
then
      turn on light
      wait 5 minutes
      turn off light
else
      (nothing)

will turn the light off 5 minutes after the LAST time the motion detector triggered because the wait gets restarted each time the motion is tripped.

  • Like 1
Posted

Thank you MrBill and others that commented on this thread.  I've learned a few things that should be helpful on any future programs I create in my ISY. 

Regards, Kevin

  • Like 1
Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.6k
×
×
  • Create New...