Jump to content

Can multiple programs be activated/initiated by a specific event?


SteveKlos

Recommended Posts

Folks,

I've got motion detectors on my doors and would like to have multiple different things happen for each detection event.

  • One event, I'd like the ISY to do a rest call to my security system to send an image to my cell via text, then, I'd like to have a 2 minute latency before I send another pic.
     
  • The other event, if appropriate based on other conditions, I'd like to set some lights to a percentage of on and after a 5 minute timer, turn them off.

Seems pretty straight-forward and I know how I can do these two different programs - basically, I'll set a state variable for the image count-down and the light timer count down.  Pretty easy.

The question - I know that the ISY will kick off a program based on a change of state of an Insteon system or state variable.  Is there any issue with ISY having multiple programs that are initiated by the state change?  i.e. can I have two different programs that are initiated by the motion detection without issues?  The Insteon motion sensor 2 provides a "motion on" and after 5 min, a motion off (configurable).  If I can initiate multiple programs using this motion event, I can make this work well (and it'll be tons easier than trying to keep various states of the system managed.

Cheers,

SK

Link to comment
25 minutes ago, SteveKlos said:

Folks,

I've got motion detectors on my doors and would like to have multiple different things happen for each detection event.

  • One event, I'd like the ISY to do a rest call to my security system to send an image to my cell via text, then, I'd like to have a 2 minute latency before I send another pic.
     
  • The other event, if appropriate based on other conditions, I'd like to set some lights to a percentage of on and after a 5 minute timer, turn them off.

Seems pretty straight-forward and I know how I can do these two different programs - basically, I'll set a state variable for the image count-down and the light timer count down.  Pretty easy.

The question - I know that the ISY will kick off a program based on a change of state of an Insteon system or state variable.  Is there any issue with ISY having multiple programs that are initiated by the state change?  i.e. can I have two different programs that are initiated by the motion detection without issues?  The Insteon motion sensor 2 provides a "motion on" and after 5 min, a motion off (configurable).  If I can initiate multiple programs using this motion event, I can make this work well (and it'll be tons easier than trying to keep various states of the system managed.

Cheers,

SK

No. I have a few MSs that trigger 5 and 6 programs. One trigger can cause as many event as you can have programs. Processing order cannot be predicted though.

Link to comment

Thanks for the response larryllix!  I'm going through all the programs in my system now to update...  I've been using flags and variables to keep states and it seems this can be done much more efficiently by making the system easier to extend and expand.  I expected the order of execution to be non-deterministic and potentially change in the future, fortunately, from what I'm cooking up, I don't think that will matter.

Link to comment

As Larry mentioned, yes, you can have as many programs as you want have the same trigger within the "if" clause.  However, I would recommend simply putting all the "then" items into a single "then" clause rather than a bunch of programs.  The exception to that would be if you have multiple triggers/conditions and some of them apply to one "then" item and some apply to a different "then" item.  Like maybe some of the "then" items might be shut down at night.  

Link to comment

Archived

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


×
×
  • Create New...