matter-controller
The high-level Matter controller API — the single crate a consumer depends on
to commission and control Matter devices from pure Rust. It wraps every other
matter-* crate behind a small, async (Tokio) surface.
Part of matter-rust. Milestone 8
(the v1.0 release).
Status: pre-release (
0.0.0). M8.1–M8.5 implemented: persistence + stable commissioner identity, transparent CASE, commissioning + attestation trust, typed read/write/invoke (rawValue, wildcard reads), and live subscriptions.
What it does
- Fabric & identity —
create_fabricmints and persists the controller's stable operational identity once per fabric, through a pluggableControllerStore(a defaultFileStoreships). - Commissioning —
commission("MT:…" | "<manual-code>")brings a device onto the fabric, verifying device attestation against anAttestationTrust(bundled CSA test roots, or production PAA/CD roots loadedfrom_dirs). - Interaction —
Node::read/write/invokeover rawmatter_codec::Value, including wildcard reads (ReadPath::cluster,ReadPath::all) for reading every attribute off a device. - Subscriptions —
Node::subscribereturns aSubscriptionstream ofAttributeReports (next().await+cancel()).
The operational CASE session is established, cached, and reused transparently — callers address a device by node id and never manage sessions.
Quickstart
use Arc;
use ;
let store = new;
let controller = builder
.attestation_trust
.build
.await?;
let _fabric = controller.create_fabric.await?;
let node_id = controller.commission.await?;
let node = controller.node;
// Read all OnOff attributes; subscribe to changes.
let report = node.read.await?;
let mut sub = node.subscribe.await?;
while let Some = sub.next.await
See examples/controller_quickstart.rs for an end-to-end run, and
docs/matter-js-migration-guide.md
if you're coming from matter.js.
Known limitations (v1.0)
Subscription hardening is a tracked follow-up: liveness-driven auto-resubscribe on staleness/session-loss is not yet implemented, and a steady-state report that arrives while a concurrent round-trip on the same node owns the socket is acked but not delivered to the consumer (a pure subscription stream loses nothing).
License
Apache-2.0.