Matter::Device::Base
Inherits Reference < Object
Base class for Matter device applications.
Provides:
- Persistent storage + FabricTable
- UDP transport + Protocol MessageHandler
- Default Root Node clusters (including OperationalCredentials)
- DescriptorCluster injection and auto-population
- mDNS responder + lifecycle management (commissioning <-> operational)
Subclasses typically implement:
build_storage_managerdevice_clusters(endpoint-specific clusters)- device identity getters (name/vendor/product/pin/discriminator)
- optional hooks like
started_commissioning_mode
Constructors
Instance methods
Adds a new endpoint with the given clusters at runtime. This is primarily used by bridge devices to add bridged endpoints dynamically.
The clusters should already be configured with the correct endpoint_id. A DescriptorCluster will be automatically injected if not provided.
Set notify_subscribers to false when restoring endpoints from storage
to avoid sending spurious subscription updates on startup.
Returns true if the endpoint was added successfully, false if it already exists.
Blocks until shutdown! is called. Optional - use when you need the main
fiber to wait for shutdown (e.g., in a daemon or CLI application).
Multiple fibers can safely wait on this.
Returns the next available endpoint ID for dynamic endpoints Starts from 1 and finds the first unused ID
Removes an endpoint and all its clusters at runtime. This is primarily used by bridge devices to remove bridged endpoints dynamically.
Returns true if the endpoint was removed, false if it didn't exist.
Signals shutdown, stops all services, and unblocks all await_shutdown waiters.
Safe to call from signal handlers or other fibers.
Starts mDNS and UDP transport and syncs advertisements for the current fabric set.
Returns immediately after starting - use await_shutdown to block until shutdown.
Updates the default commissioning target hostname used for mDNS advertisements. This is useful for platforms that rotate link-layer identifiers or for hosting multiple virtual devices in one executable.