Jump to content

Trying to understand how programs are processed.


salex319

Recommended Posts

Posted

New to ISY transitioning from Houselinc. Had most everything working fine in HouseLinc but struggling with ISY. I just added my Open/Close sensor (2843-222/2421) on my garage door to ISY. It shows up as two devices -Opened and -Closed each with an arrow in front of it pointing to the right. Regardless of the state of the garage door the current state of both of these is "on."

 

For testing I added the following program which didn't seem to do anything. Then I figured out to change the "Status ... is On" to "Control ... is switched on." This worked - when the door opened the light flashed and stayed on but when it closed the light stayed on. So I added a second program to turn off the light which worked fine. I realized that the "Status" approach wouldn't make sense because the Status condition would remain set as long as the door is open and I wanted to flash the light upon the "event" of the door opening. But that made me wonder when the Status condition would make sense.

 

So several questions:

1) Is two programs the proper way to do this (flash a light when door opens and turn light off when it closes) or is there some clearer more logical way?

2) what is an example of when you would use the "Status" condition?

3) How are programs processed in the ISY? Is the program list polled as fast as possible? Some polled(status conditions) some driven by events(Control .. switched on)?

 

If
       Status  'Garage Door-Opened' is On

Then
       Set 'Test Light' On
       Wait  1 second
       Set 'Test Light' Off
       Wait  1 second
       Set 'Test Light' On
       Wait  1 second
       Set 'Test Light' Off
       Wait  1 second
       Set 'Test Light' On

Else
       Set 'Test Light' Off

Posted

Try this:

If
       Control  'Garage Door-Opened' is switched On
   and Control  'Garage Door-Closed' is NOT switched On

Then
       Set 'Test Light' On
       Wait  1 second
       Set 'Test Light' Off
       Wait  1 second
       Set 'Test Light' On
       Wait  1 second
       Set 'Test Light' Off
       Wait  1 second
       Set 'Test Light' On

Else
       Set 'Test Light' Off

 

This will flash the light when the door opens and turn the light off when the door closes.

 

I vaguely recall that there are two modes to the open/close sensor. In one mode, it only sends on commands (Open on when open and Closed On when closed) and in the other mode it will send On and Off commands. Consllt the manual for the Open/Close sensor.

 

-Xathros

 

EDIT: From the manual:

Jumper

When jumper is installed (default), Open/Close Sensor

will send an INSTEON “on†command when it opens and an

“off†command when it closes. When jumper is uninstalled

(as in Multi-Scene Mode), Open/Close Sensor will activate

scene 1 when it opens and activate scene 2 when it closes.

NOTE: When installing or uninstalling jumper, remove and replace

battery for new jumper setting to take effect.

Posted

1) The reason to have multiple programs is to prevent a re-trigger of a program when it is running wait or repeat commands. Mostly this is an issue when using "status" since any status change will re-trigger and stop any further wait. To prevent this, the first program calls a "then" or "else" clause on the second program. In the event of using "control", there won't be any benefit to doing that. In your program above, I don't see value in using 2 programs.

 

2) Status is used if you want the program to trigger on any change. Also status is how you check the status of a device as a secondary condition. For example, if the time is 9pm and status of a device is off, then do something. You could not use a "control" statement here. Control statement only are true when the actual control command is sent (ie when you push the button on a switch)

 

3) ISY reacts to all incoming Insteon commands and checks them against all the programs to see if any action should be taken. It does not poll devices for the sake of a program. If a device changes status, then the device sends an Insteon message out and ISY picks that up and reacts to it. If ISY has an internal trigger (like time is 9pm), and a program that triggers needs to know the status of a device, it does not poll the device. It uses its internal records to know what its current state is.

Guest
This topic is now closed to further replies.

×
×
  • Create New...