Jump to content

Status/Control program help


Kentinada

Recommended Posts

Posted

I'm not sure I am totally getting the Status vs Control state checking first of all.  Here's what I want:

  • When the garage door is opened, I get a text telling me it's open, the garage lights are turned on for 2 minutes, and then turn the lights out
  • When the garage door closes, get a text telling me the door is closed and turn the lights out

My issues with the program below are:

  • It mostly works but I am getting 2 texts telling me the door is closed, not one.  No clue why.
  • I'm wondering if these should be split into 2 different programs: 1 for open and 1 for close?
  • By using a Control check on Garage Door-Sensor, this code only executes when the door is physically opened or closed. Sounds funny saying it but if I were checking the Status, the Then or Else clause would always be running depending on the door being up or down I think.  So am I right in using Control?
  • When the door is shut, the lights may already be off.  Can I somehow check that before I set them to Off or just not care? 

Thanks for any help/suggestions on making this better. 

1192556241_ScreenShot2019-12-09at7_14_13PM.thumb.jpg.b25f65c4e1a33a23b1d87b0c3a56c10d.jpg

Posted

Control, for most devices means someone physically pushed the button.  It is what a device sends out when it is the originator of the event.  For a motion detector or any other sort of sensor, the device is the originator of the command upon it sensing whatever it senses (instead of a person pressing it).  I assume you are using an I/O sensor on your garage.  When the input closes, it sends out a closed command (off I guess).  Unlike many other devices, an I/O sensor can not send out multiples of the same command in a row, because, by its nature, a closed input can't close again until it first opens.  But a light switch could have the "on" paddle pushed bunches of times in a row and would output a "Command on" each time.  

In contrast, a "status" is what the device status is.  Any CHANGE in status results in the device reporting and triggering your program.  Your assumption above about the program running constantly is incorrect.  The program would only run at the instant of CHANGE.  It would execute once and stop until another CHANGE occurred.  Unlike command, pressing "on" twice in a row does not produce two status commands since the switch wouldn't CHANGE from on when it was already on.  A status command is output regardless of what the origination was.  It does not need to be someone pressing the button (though it could).  A light switch changes status when a different switch commands it to as well as when you directly push it.  With an I/O sensor it is a little different since command and status are tied together by the nature of the device.

Now, I can't explain why you would get double texts on closing.  This would mean the program triggered false twice in a row.  I can't see how that could happen.  In input can't become off without becoming on first.  You could try using "status" here.  In this case, status changing is going to coincide with the command on/off event.  I don't have any I/O sensor's myself to play with to help more.  I have my Elk alarm panel synch'd up with ISY and use those states to trigger ISY.

 

Posted

I do use an IOlinc on the garage door for status information.  Can someone answer this: When the garage door is opened, the Then clause in my program executes.  This notifies me the door is open, turns on the light and starts the 2 minute timer. Here's the question. If the door is closed BEFORE the 2 minutes is up and the Else clause executes, does this stop the 2 minute timer?  I assume it does.  Correct?

Posted
5 hours ago, Kentinada said:

I do use an IOlinc on the garage door for status information.  Can someone answer this: When the garage door is opened, the Then clause in my program executes.  This notifies me the door is open, turns on the light and starts the 2 minute timer. Here's the question. If the door is closed BEFORE the 2 minutes is up and the Else clause executes, does this stop the 2 minute timer?  I assume it does.  Correct?

I don't know your exact setup but here is my Garage Door program.  I wrote it about 10 yrs ago and has never failed...

Garage Door Status Monitor

If
        'IOGarage Sensor' Status is On
 
Then
        Send Notification to 'Default' content 'Garage Door Notification Closing'
 
Else
        Send Notification to 'Default' content 'Garage Door Notification Opening'
        Set 'Main Hall Lights' On
        Wait  5 minutes
        Set 'Main Hall Lights' Off
 

 

Posted
I do use an IOlinc on the garage door for status information.  Can someone answer this: When the garage door is opened, the Then clause in my program executes.  This notifies me the door is open, turns on the light and starts the 2 minute timer. Here's the question. If the door is closed BEFORE the 2 minutes is up and the Else clause executes, does this stop the 2 minute timer?  I assume it does.  Correct?
As per oberkc above..yes.

Sent using Tapatalk

Guest
This topic is now closed to further replies.

×
×
  • Create New...