-
-
Notifications
You must be signed in to change notification settings - Fork 0
Type Modes
The node operates in exactly one of two modes, selected in the edit dialog — never inferred per message. One node instance = one type mode = one group of like sensors. Mixing humidity readings and door contacts in a single instance has no coherent meaning; deploy one instance per group.
Payloads are converted with Number() — real numbers and numeric
strings ("21.5") both coerce; anything else is a rejected reading
(ignored: true, with msg.rejectedValue).
The aggregate is the configured function over the fresh sources' latest values:
| Function | Behavior |
|---|---|
| Mean | Arithmetic mean |
| Median | Middle value (odd count) or average of the two middle values (even count) — a robust default for 3+ noisy sensors |
| Min / Max | Worst-case style automations |
| Trimmed Mean | Drops the single highest and single lowest fresh value, then averages the rest. Requires ≥ 3 fresh sources; below that it silently falls back to Mean — and says so honestly, reporting mean(fallback) in msg.aggregation rather than pretending. |
The aggregate is the fraction of fresh sources reporting true (0.0–1.0), and the thresholds become vote rules — see Trigger and Release.
Coercion is case-insensitive and whitespace-trimmed, against two configurable lists:
| List | Default |
|---|---|
| True Values | true, on, yes, 1 |
| False Values | false, off, no, 0 |
Native booleans true/false and the numbers 1/0 always coerce
regardless of the lists. Anything matching neither list is a rejected
reading — an unrecognized value never silently skews the vote.
Two rules that surprise people:
-
Custom lists replace the defaults. Configure
open/closedfor door contacts and a sensor sending"true"is now rejected. Include the defaults in your lists if you want both vocabularies. -
Command words always win. A payload of
reset(any case) is theresetcommand even in Boolean mode, even with a topic — so command words can never be used as sensor values. See Input Messages.
- On/off states reported as
0/1numerics can go either way: Boolean mode gives you vote rules and minority reports; Numeric mode with Mean gives you the same fraction as a plain number. - String states beyond two values (e.g.
open/closed/tilted) are not supported in this version — that enum/most-common-value mode is a recorded deferral in the design document.
See it in action: Examples Basic Numeric Averaging (numeric) and Examples Boolean Voting (boolean, with custom lists).
Getting Started
Reference
Features
Examples
- Examples Basic Numeric Averaging
- Examples Staleness and Quorum
- Examples Boolean Voting
- Examples Runtime Commands
Test Script Coverage
- Overview
- Test Suite 1 — Output routing & envelope shape
- Test Suite 2 — Aggregation functions
- Test Suite 3 — Boolean mode
- Test Suite 4 — Commands
- Test Suite 5 — Threshold set-commands & release-follows-trigger
- Test Suite 6 — Status labels
- Test Suite 7 — Staleness, quorum policies, heartbeat
- Test Suite 8 — Persistence
Support