Logic blocks
The four blocks that combine and test conditions. They have no settings worth speaking of — the interesting part is how they remember values between events.
1.AND and OR
Two inputs, one output. AND is true when both are true; OR is true when either is.
| Detail | |
|---|---|
| Inputs | Two pins, labelled A and B. |
| Output | True or false. |
| Parameters | None. |
How they remember
This is the part that trips people up. The block does not wait for both inputs to arrive together. It stores the last value seen on each pin and re-evaluates every time either one changes.
- A pin that has never received a value counts as false. So an AND whose second input has not fired yet is false, not "waiting".
- Only pins that are actually wired are counted. An unwired pin is not treated as a permanent false that blocks the gate.
- The output is re-sent on every input event, even when the answer has not changed.
2.NOT
Inverts whatever arrives.
| Detail | |
|---|---|
| Input | One pin. |
| Output | The opposite: true becomes false, false becomes true. |
| Parameters | None. |
It keeps no state at all — each value that arrives is inverted and sent straight on. Until something arrives it has never run and has no output.
3.Compare
Turns a number into a true or false — the block that makes a temperature or a lux reading usable as a condition.
| Detail | |
|---|---|
| Input | One pin — the value to test. |
| Output | True or false. |
| Parameters | Operator and Value — the fixed number to compare against. |
| Operator | True when |
|---|---|
| equals | The input equals the value. |
| not equals | The input differs from the value. |
| > | The input is greater. |
| ≥ | The input is greater or equal. |
| < | The input is less. |
| ≤ | The input is less or equal. |
- The comparison value is fixed in the block — it cannot be wired from another block. To compare two live values, subtract them upstream or use separate gates.
- Values are compared as numbers. A reading that is not a number will not satisfy a greater-than or less-than test.
- It evaluates and emits on every value that arrives.
4.What counts as true
Every logic block converts whatever arrives into true or false the same way.
| Value | Treated as |
|---|---|
| true, 1 | True |
| false, 0 | False |
| "true", "1", "on", "yes" | True |
| "false", "0", "off", "no" | False |
A number is measured against zero, whether it arrives as a number or as text: 0, "0" and "0.0" are all false, and any other value is true. A dimmer at 0 % therefore reads as off, as you would expect.
"closed" will satisfy a gate. Where a device reports words rather than a clean on/off, put a Compare block in front of the logic rather than feeding it in raw.