Jump to content
C4 Forums | Control4
  • 0

How do I trigger Programming based on the state of multiple devices, vs a specific device triggering it?


416to305

Question

I want to do the following but am confused how I'd do this in Composer.  Here's a made up example to illustrate:

IF Garage Door 1 is CLOSED and Garage Door 2 is CLOSED and Garage Door 3 is CLOSED and Garage Door 4 is CLOSED and Garage Door 5 is CLOSED
THEN Send an Alert

I get confused as Composer wants everything to trigger off a device but there's none in this case.  Like if I wanted the above to run when I press a keypad button then that's easy, but I want it to trigger based on the state of multiple devices.  In this example, send an alert when ALL garage doors are closed, and only when all are closed. 

If I was doing this in Home Assistant the trigger would literally be:

"If the state of Garage Door 1 equals CLOSED and the state of Garage Door 2 equals CLOSED and the state of Garage Door 3 equals CLOSED and the state of Garage Door 4 equals CLOSED and the state of Garage Door 5 equals CLOSED"

The only other thought I had was doing a timer and having the timer expiry have the conditions above, but that's clunky and not instant.

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Simply create a macro with that set of conditionals, and trigger that macro on each door state changing

ie WHEN garage door 1 closes - execute macro

WHEN garage 2 closes - execute macro

etc.

 

One macro will do - no need to recreate per door (if garage door 1 closes, the IF statement for that door can just stay - it won't interfere)

 

 

Link to comment
Share on other sites


  • 0
1 hour ago, Cyknight said:

Simply create a macro with that set of conditionals, and trigger that macro on each door state changing

ie WHEN garage door 1 closes - execute macro

WHEN garage 2 closes - execute macro

etc.

 

One macro will do - no need to recreate per door (if garage door 1 closes, the IF statement for that door can just stay - it won't interfere)

 

 

Thank you!  This makes sense I'll give this a try.  

Link to comment
Share on other sites

  • 0

Another way of doing this is to use the Domosapiens Security Enhancements driver.  This allows you to combine doors (or windows or PIR sensors etc.) into groups and show the group in navigators (as open or closed) and, of course, you can trigger code of this group driver being open or closed.

Link to comment
Share on other sites

  • 0
1 hour ago, South Africa C4 user said:

Another way of doing this is to use the Domosapiens Security Enhancements driver.  This allows you to combine doors (or windows or PIR sensors etc.) into groups and show the group in navigators (as open or closed) and, of course, you can trigger code of this group driver being open or closed.

Oh amazing even better!  That's basically what I'm trying to do with the garage doors so I'll check into that as might be easier.  Thanks!

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.