Jump to content

Garage door check & close if open


David_Gilbert

Recommended Posts

I wrote this and it appears to do the job.  However, I was wondering if it could be improved?

 

 

1: Check to see if the garage door was left open

 
Garage Bay2 Security Check - [iD 000B][Parent 0001]
If
        From    11:00:00PM
        To       6:00:00AM (next day)
    And Status  'Garage Doors / Garage Bay2-Sensor' is Off
 
2: If it was left open send me a notification and wait 5 minutes; this is in case I opened it manually during this time frame... like to take the trash out.  After 5 minutes, close the garage door, give it 30 seconds to close and loop back to the If statement so it continues to monitor the door until 6am.
 
Then
        Send Notification to 'Default' content 'GarageBay2'
        Wait  5 minutes 
        Set 'Garage Doors / Garage Bay2-Relay' On
        Wait  30 seconds
        Run Program 'Garage Bay2 Security Check' (If)
 
Else
   - No Actions - (To add one, press 'Action')
 

** I would like it to check it again after the initial 5 minutes wait and if it remains open, only then close it, if it is closed already, then continue monitoring for the next event.  Maybe a variable is in order?

Link to comment
Garage Bay2 Security Check - [iD 000B][Parent 0001]

 

If

        From    11:00:00PM

        To       6:00:00AM (next day)

    And Status  'Garage Doors / Garage Bay2-Sensor' is Off

 

Then

        Send Notification to 'Default' content 'GarageBay2'

        Wait  5 minutes 

 

Else

        Set 'Garage Doors / Garage Bay2-Relay' On

        Wait  30 seconds

 

Improved with the help of @mattavila.

Link to comment

 

Garage Bay2 Security Check - [iD 000B][Parent 0001]
 
If
        From    11:00:00PM
        To       6:00:00AM (next day)
    And Status  'Garage Doors / Garage Bay2-Sensor' is Off
 
Then
        Send Notification to 'Default' content 'GarageBay2'
        Wait  5 minutes 
 
Else
        Set 'Garage Doors / Garage Bay2-Relay' On
        Wait  30 seconds
 
Improved with the help of @mattavila.

 

Are you missing lines in your posting?

 

You have a Wait line is each Then, Else section, that wait for nothing following??

Link to comment

The WAIT at the end of the THEN or ELSE clauses will accomplish nothing, I suspect. I dont believe it will delay the running of the other clauses. I understand WAIT statements can be interrupted by a program trigger and will not cause any further delay, once a program is triggered during a wait period.

Link to comment

Since it's a garage door, I added a wait to the Else in order to give the door time to close before it takes another action. The wait at the then gives me time to muck around if I manually opened the door during this time frame - like to take the trash out.

ISY is a trigger (event) based engine.

 

If another program has a trigger, in a true logic condition, it will operate, no matter what your program is doing (short of disabling the one mentioned)

 

Wait is a statement that will allow other programs to run, as it causes the program, it is found in, to "give up" it's time slice or control of the ISY engine, temporarily duing the Wait time specified, so others can run.

Link to comment

I had a feeling that the wait command is important since you can order which command you run at a time; like bash scripting.  It turns out that I was correct, I modified the command as below; the wait 30 seconds pauses this program in place for 30 seconds before moving on.

 

Garage Bay2 - [iD 000B][Parent 0007]
 
If
        Status  'Garage Doors / Garage Bay2-Sensor' is Off
 
Then
        Send Notification to 'Default' content 'GarageBay2'
        Wait  30 seconds
        Set 'Garage Doors / Garage Bay2-Relay' On
        Send Notification to 'Default' content 'GarageBayClosed'
 
Else
   - No Actions - (To add one, press 'Action')
Link to comment

This is the simplified version that I tested an it works as expected... none of the security features of the door have been modified, if something is breaking the security beam the door wont close... if the door hit something on the way down it'll retract.  Under each use case, it will try to shut the door 5 minutes later.  Next I will try a 'repeat' statement to see if I can have it fail to close, repeat one attempt and fail the program.

 

Garage Bay2 - [iD 000B][Parent 0007][Not Enabled]
 
If
        Status  'Garage Doors / Garage Bay2-Sensor' is Off
 
Then
        Send Notification to 'Default' content 'GarageBay2'
        Wait  5 minutes 
        Set 'Garage Doors / Garage Bay2-Relay' On
        Send Notification to 'Default' content 'GarageBayClosed'
 
Else
   - No Actions - (To add one, press 'Action')
Link to comment

I use a few programs. One to do each job. My control is not connected but lines could be inserted very easily.

 

Here is the 4 hour allowance for a garage door left open calling the one below.

Garage Door Open.carHome - [ID 0107][Parent 0109]

If
        'Garage / Garage Door.closed' Status is Off
    And $sTag1.outOfRange is $cFALSE
 
Then
        Wait  4 hours 
        Run Program 'Garage Door Open.carGone' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 


Here is one for when I first get home or the above program calls to notify us.

Garage Door Open.carGone - [ID 010D][Parent 0109]

If
        'Garage / Garage Door.closed' Status is Off
    And $sTag1.outOfRange is $cTRUE
    And $sHouse.occupied is $cFALSE
 
Then
        Wait  5 minutes 
        Enable Program 'Garage Door Closed.notify'
        Send Notification to 'Text  Larry' content 'Garage Door Open'
        Send Notification to 'Text Jackie' content 'Garage Door Open'
        Wait  20 seconds
        Send Notification to 'eMail Larry' content 'Garage Door Open'
        Send Notification to 'eMail Jackie' content 'Garage Door Open'
 
Else
   - No Actions - (To add one, press 'Action')
 
Happens when first arriving home so 5 minutes are allowed 
to trigger an MS to cancel notifications.

Here is another that notifies us inside the house when the door is open.

It saves the existing lamp brightness (takes v5) flashes the bulb (red)  and then restores it to previous levels  once closed again.

Garage Door Open.home - [ID 0106][Parent 0109]

If
        'Garage / Garage Door.closed' Status is not On
    And $sHouse.occupied is $cTRUE
 
Then
        Wait  20 seconds
        $BufCornerLamp.level  = 'Gathering Room / ML2 / BufCornerLamp' Status %
        $BufCornerLamp.colour  = 'Gathering Room / ML2 / BufCornerLamp' Color 
        Set 'Gathering Room / ML2 / BufCornerLamp' to 100%, color '$cZ.RED.ML Index'
        Repeat 400 times
           Set 'Gathering Room / ML2 / BufCornerLamp' On
           Wait  2 seconds
           Set 'Gathering Room / ML2 / BufCornerLamp' Off
           Wait  8 seconds
        Repeat 1 times
           Run Program 'Garage Door Open.home' (Else Path)
 
Else
        Wait  10 seconds
        Set 'Gathering Room / ML2 / BufCornerLamp' to '$BufCornerLamp.level %', color '$BufCornerLamp.colour Index'
        $GathRm_Mode.scratchpad  = $sGathRm.colours
        $sGathRm.colours  = -1
        $sGathRm.colours  = $GathRm_Mode.scratchpad
 
Wait time must excede Just.Home lighting in GathRm using same light.

Here is one that indicates the door position on the Mudroom KPL LED.

Garage Door Open.LED - [ID 0097][Parent 0109]

If
        'Garage / Garage Door.closed' Status is Off
 
Then
        Wait  1 second
        Set Scene 'Mudroom / MudRm kpl.LED.A' On
 
Else
        Wait  1 second
        Set Scene 'Mudroom / MudRm kpl.LED.A' Off
 


I have discovered that I can let ISY do a lot of the work with it's trigger based engine. Insteon protocols are the slowdown with HA not the ISY CPU.

Link to comment

What's interesting is that it only runs once; the door opens, if it is during the "If" time frame... after a set time frame it tries to close.  If it fails for any reason; obstruction on sensor break the garage door re-opens as expended and the program ends.  I'll call this a success.  

Link to comment

Yeah, yeah, yeah. You're a broken record.

 

Best regards,

Gary Funk

 

Yes, but oddly enough the track that gets played over and over again makes a pretty reasonable point; one that most homeowners should be aware of before they make whatever decision they choose to make.

Link to comment

Yes, but oddly enough the track that gets played over and over again makes a pretty reasonable point; one that most homeowners should be aware of before they make whatever decision they choose to make.

But does he have to post this on every thread about closing a garage door?

 

I have a door that is UL approved for closing unattended and have taken extra measures to insure it won't cause harm to a human.

 

I guess he forgot the last comment he left:

I'll let Darwin sort it out from now on.

 

I'm out! ✌️

Best regards,

Gary Funk

Link to comment

But does he have to post this on every thread about closing a garage door?

 

I have a door that is UL approved for closing unattended and have taken extra measures to insure it won't cause harm to a human.

 

I guess he forgot the last comment he left:

 

Best regards,

Gary Funk

Keep doing what you are doing. One post from me will get lost in a long thread. Quoting and commenting on my post helps the cause, possibly saving a life.

 

Thanks for caring

Link to comment

No, thinking scientifically, about the Lunar Effect... as an explanation for what's happened across this forum in the past week or so.

Looney Lunar effect?  Really sorry if I mooned you!

 

Well where I am, and I am sure you weather and mine are very close, neighbour, we forget that some people still don't have air conditioning.

 

 

At work I would think back about the guys bragging "I don't need no stinkin' air conditioning" and after a week or so they would bark up a storm at everything that made a statement and everybody , with the A/C, would wonder WTF was going on.

 

  • He always seemed to be such a nice young man!. :)

I say this on probably the hottest day we have had in the last 40 years, IIRC.

Meanwhile, the wife has decided to bake four or five batches of cookies and cakes.....grrr....My poor hydro bill!   wallet.

Link to comment

...

I say this on probably the hottest day we have had in the last 40 years, IIRC.

Meanwhile, the wife has decided to bake four or five batches of cookies and cakes.....grrr....My poor hydro bill!   wallet.

 

These are the days when the BBQ grill becomes very useful, especially the side-burner.  Those little LP tanks aren't cheap, but when you figure that I have to pay TWICE for the electricity used to cook something (once to heat the stove/oven, and then again to remove that heat with the A/C unit), well, it's quite palatable.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...