Reusable control library

State-aware automation without hidden ownership.

Deterministic TypeScript policies and thin Node-RED adapters for lighting, occupancy and coordinated media activities. This site documents package capabilities only.

Package 2.2.0 174 tests passing 11 reusable nodes MIT licensed

Package at a glance

The public project tracks reusable behavior, test evidence and source-level milestones. It intentionally contains no installation inventory or private automation topology.

11Node-RED node types
174Behavior-focused tests
5Home-theatre target classes
7Executable contract examples

Component portfolio

Portfolio badges show whether a capability is released in the package. Roadmap badges show delivery state. Components share explicit ownership, semantic commands, observed completion and bounded recovery.

Capability milestone

Home-theatre orchestration

Released

A latest-request-wins activity controller coordinates display, receiver, source, lighting and backlighting target owners without embedding transport-specific commands.

  • Fresh observations gate completion
  • Stale generations are inert
  • Recovery and manual ownership are explicit
Read the capability reference →

Source policy

Media-player readiness

Released

Gate source completion on fresh availability, active-device, application or playback evidence without moving transport logic into orchestration.

  • Configurable readiness depth
  • Application and playback evidence
  • Honest waiting and unavailable outcomes

Receiver policy

Volume ownership

Released

One AVR controller coordinates bounded absolute and relative volume requests without fighting later physical adjustments.

  • Rapid relative input accumulates
  • Configured half-step safety bounds
  • Fresh observation confirms and releases ownership

Consumer reference

Contract examples

Released

Run deterministic, transport-neutral examples for occupancy, lighting, switch gestures, source readiness, volume ownership and coordinated activities.

  • Real reducer execution
  • Synthetic configuration
  • Asserted consumer-visible invariants
Explore the executable contracts →

Lighting policies

Room lighting control

Released

One room controller owns adaptive output while independent switch, motion, schedule and activity policies emit semantic intent.

  • Circadian brightness and colour temperature
  • Per-target manual ownership
  • Reducer-owned duplicate and retained-state handling
  • Restart baseline, freshness and availability evidence
  • Independent switch gestures and occupancy policy

Sensor policy

Occupancy fusion

Released

Combine motion triggers with optional presence hold while preserving unknown sensor states and preventing one source from clearing another.

Operational evidence

Metrics, traces and objectives

Released

Bounded traces and rolling outcome evaluation expose transition latency, retries, fallbacks, target availability and actionable failure.

Design rules

One owner

Every controlled target has one normal command owner.

Semantic intent

Policies request outcomes rather than transport operations.

Observed completion

A command acknowledgement never substitutes for target state.

Bounded recovery

Retries, timers, traces and failure paths remain finite.

Component roadmap

Milestone badges report delivery progress, independently of the release badges in the portfolio above. Candidate components keep transport, policy, observed state and recovery explicit before joining the package.

Milestone complete

Contract examples

Transport-neutral examples cover room lighting, occupancy, switch gestures, source readiness, volume ownership and coordinated activities.

Milestone complete

Volume ownership

Absolute and relative requests share one bounded command owner, confirm from fresh evidence and preserve external adjustments.

Milestone complete

Switch-state observability

Wall-input reducers preserve restart baselines, distinguish retained replay, refresh duplicate evidence and expose freshness or explicit unavailability.

Milestone complete

Package distribution

Tagged releases are staged on npm from CI with signed provenance and published only after maintainer approval, alongside a checksummed GitHub Release.

In progress

Reliability fixes

A full review of the package is being worked through in small releases. Shipped so far: lights follow their observed state, disabled motion stays disabled, pending deadlines survive a restart, power readings between thresholds no longer flood the device, and every room light reports whether it is in control, held by an owner or set by hand, with activities holding their lights until they end. Next: the remaining stuck-state and timing fixes.

Next

Device-agnostic core

Separate decision logic from devices. Policies and controllers speak a neutral vocabulary of targets, intents and observations; a translation layer maps them to specific protocols, vendors and dashboards. Each part stays usable on its own, defaults name no rooms or devices, and powered devices are modelled from observed power.

In progress

Blind and cover control

The cover controller is in the package: one observed-state owner per cover, semantic position and stop intents, bounded movement and manual ownership. Next: the Node-RED node and editor, built on the device-agnostic core, then honest group partial failure.

Planned

Scenes with restore

A scene temporarily owns a set of targets, such as lights or motion enablement, and records their observed state. Ending it, by request, a safety timer or a configured trigger, restores every target. Overlapping scenes stack: the newest owns shared targets and hands them back to the one beneath.

Queued

Grouped audio

Model membership, synchronization and partial failure without hiding which players are unavailable.

Planned

Local resilience

Define deterministic fallback behavior for temporary controller, broker or transport loss without creating a second command owner.

Public boundary

Pages and repository documentation describe source code and generalized behavior only. Credentials, addresses, coordinates, entity identifiers, flow exports, installation inventory and operational records remain outside this repository.