Planon IoT : IoT Platform - Developer's Guide : Rules Endpoints : Instantaneous Rules, Conditions and Events
Instantaneous Rules, Conditions and Events
An instantaneous rule is a rule in which, one of the rule’s conditions is defined as an instantaneous condition (set in the condtitions/type) on an event with an instantaneous eventType code. Pressing a button is an example of an instantaneous event.
Instantaneous Rules differ from other Rules in the following ways –
An instantaneous Rule triggers every time that the instantaneous event occurs, and does not wait for a restore to be triggered another time.
A Rule that contains an instantaneous condition and an AND relationship within that Rule employs the following logic –
When the instantaneous event occurs, the Rule then checks the other conditions in that Rule to see whether they are true. If all the Rule’s other conditions are true, then the Rule is triggered. This means that the Rule is only triggered when the instantaneous event occurs AND all other conditions of the Rule are true. Note that the converse of this does not trigger the Rule.
For example, let’s say that you have a button-press event, which is an instantaneous event, and a door-open event, which is not an instantaneous event. If the button is pressed, then the Rule checks whether the door is open and if it is, triggers the Rule. However, the opposite does not trigger the rule. If the door is open, the Rule is not triggered, regardless of when the instantaneous event (button press) last occurred.