[OBSOLETE] [BETA MILESTONE 1] CoRE (Community's own Rules Engine)

@Jnick Pistons subscribe to events. An event is usually generated when a device attribute changes value (though it does not always necessarily change the value - you can get multiple temperature events for the same device and the same value). Pistons only evaluate the condition set(s) whenever such an event occurs that the piston is listening for. To determine which events the piston is looking for, it takes all the unique device/attribute pairs from the list of used devices. If you say “presence is active” you will get events for present as well as not present. The difference between a condition (empty circle) and a trigger (full circle) is that a condition simply checks a state: door is open. When you combine multiple device events into a single piston, it may happen that another condition makes the piston evaluates. Door is open is true as long as the door is currently open. If you were to use a trigger, changes to open, then that trigger would be true only when the door actually opened. A second evaluation while the door is still open would result in a false - the door did not just change to open, it is open, but it did not just open. So triggers add a sense of momentary action to the mix. Also, if you mix triggers with conditions, the piston will only subscribe to the triggered device/attributes. That is, if you say : door is open and presence changes to present, you’ll only subscribe to presence events (either present or not present). The door won’t be subscribed to because any door event would ALWAYS return a false overall evaluation (the trigger will always be false on events not generated by the device it listens to). Another aspect is that “door is open and presence is present” will be true (and therefore execute actions) when either the door opens while you are present, or when you come home while the door is open. The “door is open and presence changes to present” will only execute your actions when you arrive home and the door was already open. It won’t run if the door opens while you’re home…

Hope I didn’t confuse you more.