Jump to content

Issue: Garage door triggering lighting


m_theredhead

Recommended Posts

Hello, 

 

I have two garage doors - names 'Garage Door 1' and 'Garage Door 2' that are monitored. 

 

If either of these doors open and it is after dark, I would like the front port light 'Front Porch Light' and the entry way light 'Garage Entry' to come one and stay on for 5 minutes.  However, if either is on already, it should remain on after the 5 minutes.

 

I have two programs that I am running to try to achieve this:

 

I am not sure how to cut/paste from the console, so I will pseudo write it best I can.

 

Program 'Garage-Entry'

 

If (

    status 'Garage Door 1 - sensor' is On

    or 'Garage Door 2 - sensor' is On

)

and (

   From Sunset

   To Sunrise (next day)

   )

   and status 'Garage Entry' is Off

Then

   Set 'Garage Entry' on

   Wait 5 minutes

   Set 'Garage Entry' off

else 

   - no Actions

 

 

Program 'Garage-FrontDoor' is just like this one, but it reflects the Front Door Light instead.

 

The issue I am having is that the if seems to work fine and only turns on the light after dark, but it seems to exit immediately after that.  Watching it in the console, the program doesn't seem to wait the 5 minutes and the light never turns off.

 

it doesn't seem to matter if the garage door is left open or is shut again quickly, the program just seems to exit.

 

I am fairly new to doing any in depth programming on the ISY and could use some guidance.

 

Thoughts?

Edited by m_theredhead
Link to comment

That's an easy one.

 

If (

    status 'Garage Door 1 - sensor' is On

    or 'Garage Door 2 - sensor' is On

)

and (

   From Sunset

   To Sunrise (next day)

   )

   and status 'Garage Entry' is Off

Then

   Run Program 'Garage Entry' (Then Path)

else 

   - no Actions

 

 

Garage Entry- [iD 0029][Parent 0023]
 
If
 
Then

  Set 'Garage Entry' on

   Wait 5 minutes

   Set 'Garage Entry' off

 
Else
Link to comment

To elaborate on Gary Funks's response, one must understand what "events" will drive program evaluation.  Your original program would be driven by garage doors changing status (from open to close and vice versa).  In addition, it would have driven (or triggered) at sunset and at sunrise, and at change of status of the entry door.  At each triggered event, the condition is evaluated and appropriate path (then or else) taken.  If it were triggered during a 5min wait, the wait would have been halted and the new path taken.  Most likely your program was triggered during a wait, evaluated false, and executed the THEN path (which is nothing).

 

In addition to Gary Funks suggested approach, you might also consider using a CONTROL condition, rather than STATUS.  CONTROL ON condition will only trigger upon receipt of an ON command, whereas STATUS condition will trigger upon any change of state.  Another feature of CONTROL conditions is that they are only TRUE when triggered.  At all other times, they will evaluate false.  STATUS conditions evaluate false any time evaluated and the expected condition (ON or OFF) exists.  One problem you may run into with status is that your program will also trigger by sunrise and when triggered at that time with the garage door opened, it will trigger the porch light program.  I assume you do not want this to happen.

Link to comment

Sometimes, I write program to have devices set integer variables to track their state, just so I can use the integer variable as a condition in another program without having the program trigger every time the device changes state...

Edited by MWareman
Link to comment

The suggestion by oberkc to use a CONTROL condition only works on Insteon devices. If 'Garage Entry' is a Z-Wave device you can only use STATUS.

You just got hired to start a thread on the differences! :)

 

I, and others, have no Zed-wave at all so much bad advice will be given out to those poor Zed-Wave noobies in the future, here.

Link to comment

You just got hired to start a thread on the differences! :)

I, and others, have no Zed-wave at all so much bad advice will be given out to those poor Zed-Wave noobies in the future, here.

It certainly was a good reminder that we could no longer assume that everything is insteon, and that there are more ways to control a garage door than the iolinc.

Link to comment

I think, given the original requirements of the OP that he needs to track the state of the 'Front Porch Light' and 'Garage Entry' in two variables. Don't check for the status of 'Front Porch Light' or Garage Entry', he wants them on regardless of their current state, so remove that test. He will have to disable the programs that save the states of 'Front Porch Lights' and 'Garage Entry' prior to turning them ON. Then after the 5 minute wait restore the state of these lights prior to this program running.

 

Loosely described below

 

If (

    status 'Garage Door 1 - sensor' is On

    or 'Garage Door 2 - sensor' is On

)

and (

   From Sunset

   To Sunrise (next day)

   )

Then

    Disable Program Save_GarageEntryState

   Set 'Garage Entry' on

   Enable Program Save_GarageEntryState

   Wait 5 minutes

   Run Program Restore_GarageEntrySate

else 

   - no Actions

 

This is just my thinking, I haven't actually tried this. It may require tweaking. In similar programs I have found a 1 sec delay may be required before executing the Enable Program statement. YMMV.

Edited by andyf0
Link to comment

Thanks again all,

 

I do indeed now have a mixture of Insteon and Zwave devices.  I wish I could stay all Insteon, but there are just some controls that they don't have that Zwave does.  it is good to have the ability to do both from the same controller.

 

Gary's response above does everything I wanted without the need for any variables.    There is one program that turns on the lights only if they are already not on, Then it calls another to turn them off after 5 minutes.    If the light is already on, it exits and never calls the second program to turn them off.  

 

It is working great! 

Link to comment

I am glad you have it working. I did not look too hard at Gary's suggested program but, after only a quick glance, I wonder why the second program would not retrigger the first program once the 5min wait is over and the status of 'garage entry' changes from ON to OFF?

 

If all continues to work...Great. if you later find some unexpected, we can look a little harder.

Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...