Scan your whole stack
Are you using @avantics/node-red-home-automation?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v2.3.0
@avantics/node-red-home-automation was last scanned on 23 Nov 2026 at version 2.3.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 2.3.0 LATEST | 23 Nov 2026 | No rules fired |
| 2.2.1 | 23 Nov 2026 | No rules fired |
| 2.2.0 | 22 Nov 2026 | No rules fired |
| 2.1.0 | 22 Nov 2026 | Not shown |
| 2.0.3 | 22 Nov 2026 | Not shown |
Findings for v2.3.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 2.3.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
State-aware Node-RED controllers for reliable lighting and home-theatre automation.
View the smart-home programme and completed project records →
Most home automations translate an event directly into a command. This package adds a deterministic control layer between them: it tracks desired and observed state, preserves manual control, confirms outcomes, retries bounded failures, and rejects stale work.
Each controller keeps the desired and the observed state, sends semantic commands, and reports done only when fresh observations confirm them.
The nodes come in three groups. Each group has an importable example flow (Import → Examples in the Node-RED editor).
Motion, presence, illuminance and wall switches drive one room's lights, with
circadian styling and manual ownership. Wire occupancy fusion into the motion
policy, and the motion and switch policies into the room controller. Circadian
levels follow the room controller's wake and bed times (default 07:00 and
23:00): they rise over the hour after waking, stay bright and cool through the
day, and wind down to the sleep settings over the three hours before bed. Times
are the Node-RED host's local time.
Example: Room lighting.json.
| Node | Purpose |
|---|---|
home-occupancy-fusion |
Combines PIR motion with optional presence sensing. |
home-motion-lighting-policy |
Converts occupancy and illuminance into lighting intent with observable wall-input baselines. |
home-switch-lighting-policy |
Converts raw edges or pre-classified button actions into lighting intent while exposing input freshness and availability. |
home-room-lighting-controller |
Owns the room's light commands, adaptive styling, manual and held lights, and lighting state. |
Each controller owns one kind of device. It accepts a generation-scoped intent,
sends commands for your device transport on output 1, and reports target state
on output 2. Example: Home theatre equipment.json.
| Node | Purpose |
|---|---|
home-avr-controller |
Owns AVR power, zones, source selection and bounded absolute or relative volume from observed state. |
home-display-mode-controller |
Coordinates TV, projector, and screen transitions. |
home-source-capability-controller |
Gates source readiness on fresh availability, active-device, application or playback evidence. |
home-backlighting-controller |
Owns TV-backlight power with observation-gated confirmation. |
One request, such as "tv" or "off", drives every target. The state contract
turns MQTT requests into activity intents and publishes retained state; the
activity controller plans each target and sends msg.theatreCommand messages.
Your flow routes each command by its target (avr, display, source,
lighting, backlighting) to the matching controller's input
(msg.avr, msg.display, msg.sourceCapability, msg.activityLighting,
msg.backlighting); the example does this with one switch node and a change
node per target. Every controller reports its progress on output 2 as
msg.theatre = {kind: "target_state", target, requestId, generation, status, observedAt}, alongside its own events: wire each controller's output 2 straight
back to the activity controller. The activity controller refreshes settled
targets, and each controller answers a refresh from fresh readings. Activity
lighting feeds the room lighting controller.
Example: Home theatre activity.json.
| Node | Purpose |
|---|---|
home-theatre-state-contract |
Bridges non-retained activity requests to retained MQTT truth and HA discovery. |
home-theatre-activity-controller |
Owns latest-request-wins activity state and aggregates target evidence. |
home-activity-lighting-controller |
Applies activity styles to room lights and holds them while the activity is active. |
Pure TypeScript policy modules live in lib/; thin Node-RED runtime and editor adapters live in nodes/.
Importable example flows for the Node-RED editor live in examples/ (Import → Examples). Executable, deployment-neutral contract examples live in contract-examples/ and exercise the same reducers as the runtime adapters.
In Node-RED, open Manage palette → Install and search for
@avantics/node-red-home-automation. Or install it from your Node-RED user
directory (usually ~/.node-red) and restart Node-RED:
npm install @avantics/node-red-home-automation
Each GitHub Release also attaches the package tarball and its SHA-256 checksum. Install a downloaded tarball through Manage palette → Install → Upload module, or with:
npm install /path/to/avantics-node-red-home-automation-2.3.0.tgz
Add the installed nodes from the home automation section of the Node-RED palette, then configure the room, device hosts, MQTT topics, source mappings, and timing limits for your deployment.
The whole-theatre MQTT contract uses non-retained requests at
home/<area>/theatre/request; every request supplies a unique requestId and an
explicit configured activity. Controller output is retained under desired,
current, phase, failure, availability, metrics, slo, and
health/<target>. Metrics expose transition latency and outcome counts plus
per-target retry, fallback, confirmation-latency, failure, manual-override, and
availability evidence. The SLO evaluator keeps a bounded outcome window,
publishes success rate plus p50/p95 transition latency, and exposes an
actionable Home Assistant problem sensor. Defaults are a 60-second transition
budget, 95% success objective, 20 outcomes and five samples before normal
evaluation; active timeouts and explicit failures breach immediately. Expected
waiting_for_source and physical manual ownership do not create false
operational failures. Retained request messages are deliberately inert.
MQTT state topics may be retained so controllers can rebuild observed state
after a restart. Command and request topics must not be retained. Raw wall-input
reducers preserve a persisted baseline but report it as unconfirmed until this
runtime receives an observation. Retained observations and messages marked
msg.baseline = true establish an inert baseline; duplicate observations
refresh freshness without replaying commands. When no baseline exists, a live
non-retained state change remains an actionable edge for event-only inputs.
Send source switch-availability to invalidate a disconnected input baseline;
the first recovered observation then re-baselines without a gesture. An
observation timestamp may be supplied as msg.observedAt or
msg.payload.observedAt; otherwise only live, non-retained observations receive
the current timestamp. Across all controllers, an observation time more than one
second ahead of Node-RED's clock is treated as observed on receipt and traced as
clock-skew, so one device with a wrong clock cannot hold back later reports.
Unsolicited display, AVR, source, and backlighting changes latch manual ownership instead of issuing corrective commands. A newer explicit activity request resumes automation. Recovery adopts physical state only when fresh display, AVR, source, and backlighting evidence matches exactly one configured profile; missing or ambiguous startup evidence invokes the configured Off activity.
The room lighting controller gives each target one control state:
in-control: circadian lighting may style and refresh the light (the default).overridden: another owner, such as an activity or a scene, holds the light;
refresh and circadian changes leave it alone until it is released.manual: a person changed the light.Add owner to an intent to override the targets it switches on. With
preserveManual: true, manual lights are skipped:
msg.lighting = {
kind: "intent",
targets: ["wall", "lamp"],
state: "ON",
source: "activity",
owner: "theatre",
values: {brightness: 64, color_temp: 400},
preserveManual: true
};
home-activity-lighting-controller does this itself: while a profile is active
it overrides that profile's lights under its configured owner (default
activity), and when a new profile drops a light, including an off profile
with no targets, it releases it. Give each activity-lighting node that feeds the
same room controller its own Owner; with a shared name, one node's release
hands back lights the other still holds. A flow that sets its own owner must
set it on every lighting message from the node, releases included, or leave it
to the node's Owner setting.
Release overridden targets (default: all; with owner, only that owner's
lights). Released lights that are on are restyled as a refresh would:
msg.lighting = {kind: "release", targets: ["wall", "lamp"], owner: "theatre"};
A held (overridden) light changes only for an intent with an owner (its own,
or a newer owner who takes it over), a person (manual: true, an external
command on the command topic, or a change seen at the light), or a release.
Other intents, such as motion ON or OFF and owner-less values, leave it alone
and are traced as ignored held-by; their other targets are still handled.
The package's wall-switch policies mark presses with person: true. Owner-less
intents, with or without values, reach a held light only with manual: true or
person: true; a flow acting for a person, such as a dashboard, sets one.
Switching a light off by its owner or a person returns it to in-control. On startup
and whenever a target's state changes, the controller sends a retained message
on its command output:
{topic: "home/<area>/lighting/<target>/control", payload: {state: "overridden", owner: "theatre"}, retain: true}
Flows that filter that output by topic must pass the /control topics through.
Send semantic requests to the AVR controller rather than publishing protocol commands directly:
msg.avr = {
kind: "volume",
requestId: "volume-control-1",
mode: "relative",
value: 1
};
mode may be absolute or relative. The controller resolves relative input
from fresh observed volume, accumulates rapid requests against the pending
target, applies configured half-step bounds, retries through the existing
bounded transport path, and confirms completion from fresh receiver evidence.
Once confirmed, it releases the volume target; a later physical or external
adjustment becomes the new baseline instead of being corrected. A request still pending when Node-RED restarts is reported as
volume_failed with reason restart, not replayed.
Build and run all seven public contracts:
npm run examples
| Example | Boundary demonstrated |
|---|---|
occupancy-fusion.mjs |
Motion establishes occupancy; optional presence can hold it. |
motion-lighting.mjs |
Occupancy and illuminance produce semantic lighting intent. |
switch-gestures.mjs |
Wall actions produce toggle or explicit manual-brightness intent. |
room-lighting.mjs |
The room owner converts semantic intent into a transport command. |
source-readiness.mjs |
Fresh application evidence confirms source readiness. |
volume-ownership.mjs |
Bounded relative requests accumulate and release ownership after fresh confirmation. |
theatre-activity.mjs |
Coordinated activity waits for fresh target-owner evidence. |
Each example uses synthetic identifiers and configuration, asserts its central invariant, and prints the complete input/output contract as JSON.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.