matter

A complete Crystal lang implementation of the Matter protocol specification (https://buildwithmatter.com). Includes full support for controller, device, commissioning, secure communications, device types, and cluster definitions.

Matter

CI

A Matter 1.6 library in Crystal for building devices and controllers.

Install

Add to shard.yml, then run shards install:

dependencies:
  matter:
    github: Crystal-Matter/matter

Start here

Run the switch example; it prints a setup code for commissioning:

crystal run examples/matter_switch_device.cr
Task Entry point Next step
Build a device require "matter" Device guide and examples
Commission or control devices require "matter/controller" Controller guide and chip-tool CLI
Share fabrics across administrators Device and controller Joint Fabric APIs Matter 1.6 Joint Fabric guide
Persist state YAML, JSON, or memory by default; SQLite and PostgreSQL opt in Storage guide

Scope

The library includes PASE and CASE sessions, discovery, commissioning, Interaction Model, subscriptions, and device and controller runtimes. It declares all 135 standard Matter 1.6 clusters in the pinned XML audit. Declaration coverage does not establish complete behavior or certification; consult the cluster audit and command and event audit before using a feature.

Area Details
Devices Declarative endpoints and clusters, fabric-aware access, events, and durable state
Controllers Discovery, pairing, commissioning, reads, writes, invokes, and subscriptions
Joint Fabrics Administrator and Datastore roles, shared controller identities, migration, and interop fixtures
Transport UDP by default; experimental BlueZ BTP central adapter
Storage YAML, JSON, memory; explicit SQLite or PostgreSQL adapters with shared SQL schema

Documentation

Guide Covers
Detailed usage Device DSL, controller APIs, shared fabrics, storage, examples, and testing
Architecture How messages move through the stack
Joint Fabric Matter 1.6 behavior, interoperability evidence, and remaining deployment requirements
Cluster coverage Declarations, revisions, and limits of the audit
Command and event coverage Mandatory ID comparison and its limits

The full end-to-end suite runs with ./test; see testing options. Contributions are welcome through pull requests.

MIT licensed. Created and maintained by Stephen von Takach.

Repository

matter

Owner
Statistic
  • 11
  • 0
  • 2
  • 5
  • 10
  • about 2 hours ago
  • October 30, 2023
License

MIT License

Links
Synced at

Sun, 15 Nov 2026 09:11:48 GMT

Languages