-
-
Notifications
You must be signed in to change notification settings - Fork 0
Heartbeat
An optional fixed-cadence status snapshot on output 3 (Query),
identical in shape to a query response but with
msg.source: "internal". It exists for watchdogs and dashboards: a
flow that wants to notice silence can't rely on event-driven
outputs, because a dying system stops producing events.
Heartbeat Interval plus units; 0 (the default) disables it.
-
Runs continuously from deploy. Unlike this node's timer
siblings — where the heartbeat is scoped to an active run — this
node has no bounded "run," and its idle problems are exactly what
a watchdog needs to see: stuck in
waiting, sources gone stale, quorum lost. The very first ticks, before any reading arrives, showconsensusState: "waiting"with anullaggregate — that's a feature. - Nothing disturbs the schedule. Readings, commands, disable, staleness, quorum changes — the heartbeat ticks through all of it on its own fixed wall-clock interval.
- Stops only when the node closes (redeploy or Node-RED shutdown). After a persisted restore it restarts fresh rather than resuming its original schedule — see Persistence.
- Ticks clone the most recent accepted reading's message (there is no live triggering message), so your payload/topic context rides along; before any reading, the base is empty.
A downstream trigger node (or similar watchdog pattern) set to fire
if no message arrives within a couple of heartbeat intervals gives you
dead-man's-switch monitoring of the whole sensor group; the snapshot's
msg.freshCount, msg.quorum, and msg.sources breakdown tell a
dashboard which sensor is the problem.
The heartbeat never appears on output 4, and query events never
appear anywhere but output 3 — see Output Messages.
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