I currently have two Contacts (doors) which trigger on OPEN/CLOSE, and sometimes both get opened and closed at same time, so I’m thinking of consolidating this alert into a single message, to save spamming me when these events occur.
Door open event
Message: Door1: open , Door2 closed
What is the best approach here?
Do I update another item (eg door__changed=door1) when a door event is triggered?
When should this alert be generated? If one door, the other door or both are open? Then you can use a group that contains both items. Within the group you can define the logic expression
Yes I’m interested if any or both triggers, however would I see two events for the group?
Events log will show only single event, one for group state open and one for group change closed.
You can create a rule which triggers on the open state and check within the rule if both doors are open and send a message.
If not both are open, you can check them individually and send messages.
Thanks, but just to be clear, if door1 opens followed by door1 about 2 seconds later I would only see one trigger?
I assume would need to somehow flag that and handle this, as well as reverse ie doors closing asynchronously
Have a think about it.
The Group should be set up to say OPEN if either door is open.
If the Group changes to OPEN when either door opens, it won’t change again if the other door opens.
You may trigger a rule from ‘change’.
You may more selectively trigger a rule from ‘changed to OPEN’.
If both doors are open and one closes, the Group stays OPEN, no change.
Only when both doors are closed does the Group change to CLOSED.
Every event is an event… So, if one of the contacts is changing, that is an event, and if the other contact is changing, that is another event. If using a group, that change will be a third event.
Question is: which of them should create a message, and what are the conditions?
For example, do you want to get a message every time one of the contacts is closed, but not, if the second contact gets closed, too? Or is it more like: I want only one message, if the second message would happen too close to the first one, let’s say about 2 Minutes…