60  Matter Interactions

In 60 Seconds

Matter devices communicate through five interaction primitives (Read, Write, Subscribe, Invoke, Timed), where Subscribe enables real-time updates and Timed protects against replay attacks. Commissioning follows a six-step flow (Discovery, PASE, Network Config, Certificate Install, CASE, ACL setup) and can be repeated for multi-admin fabric support.

Minimum Viable Understanding

Matter devices communicate through five interaction primitives (Read, Write, Subscribe, Invoke, and Timed), where Subscribe enables real-time updates with configurable intervals and Timed protects security-sensitive operations from replay attacks. Commissioning follows a six-step flow (Discovery, PASE session, Network Config, Certificate Installation, CASE session, ACL setup) that can be repeated to add the device to multiple ecosystems through multi-admin fabric support.

60.1 Matter Interaction Model and Commissioning Flow

15 min | Advanced | P08.C46.U03

Learning Objectives

By the end of this section, you will be able to:

  • Differentiate Matter’s five interaction primitives (Read, Write, Subscribe, Invoke, Timed) and select the appropriate one for a given scenario
  • Design subscription strategies that balance responsiveness and power consumption for different device types
  • Trace the complete six-step commissioning flow from discovery through ACL configuration
  • Configure discovery methods (BLE, Wi-Fi Soft-AP, mDNS) for different deployment scenarios
  • Diagnose common interaction failures and commissioning errors using chip-tool

“Matter devices have exactly five ways to communicate,” said Max the Microcontroller, counting on his fingers. “Read, Write, Subscribe, Invoke, and Timed. Think of them like five different types of conversations.”

Sammy the Sensor tried to understand. “Read is like asking someone a question, right? And Write is telling them something?” Max agreed. “Exactly! Read says ‘what is the temperature?’ and Write says ‘set the brightness to 50%.’ Subscribe is even cooler – it is like saying ‘tell me whenever the temperature changes.’ The device keeps sending you updates automatically.”

Lila the LED asked about the other two. “Invoke is for commands – like saying ‘toggle yourself’ or ‘start a color cycle.’ And Timed is a special secure version of Write and Invoke. It adds a countdown timer so hackers cannot record your command and replay it later.”

Bella the Battery was most excited about commissioning. “When a new device joins the network, it goes through a six-step welcome dance! Discovery, secret handshake, network setup, certificate installation, secure connection, and finally access permissions. It sounds complicated, but with Matter, you just scan a QR code and the app handles everything automatically!”

60.2 Prerequisites

Before diving into this chapter, you should be familiar with:

Architecture Deep Dives:

Device Implementation:

Transport:

60.3 For Beginners: Understanding Matter Interactions

Think of Matter interactions like ordering at a restaurant:

  • Read = “What’s on the menu?” (checking current state)
  • Write = “I’d like to change my order” (modifying settings)
  • Subscribe = “Let me know when my food is ready” (getting notifications)
  • Invoke = “Please bring the check” (requesting an action)
  • Timed = “I need this within 5 minutes” (time-sensitive actions)

When you ask your smart speaker to “turn on the kitchen light,” it: 1. Invokes the On command on the light’s On/Off cluster 2. The light reports back that it’s now on 3. If you’re subscribed, your phone app updates automatically

60.4 Matter Interaction Model

How It Works: Matter Interaction Model

Matter controllers communicate with devices using five standardized interaction primitives that form the complete interaction model:

  1. Read - Controllers query current attribute values from devices (e.g., “What’s the current temperature?”)
  2. Write - Controllers modify device settings by writing to attributes (e.g., “Set thermostat to 21°C”)
  3. Subscribe - Controllers receive automatic notifications when attributes change, avoiding constant polling
  4. Invoke - Controllers execute commands on devices (e.g., “Turn on the light” or “Lock the door”)
  5. Timed - Security-sensitive operations with time-bounded execution windows to prevent replay attacks

These primitives are the foundation of all Matter device communication. Read and Write provide request/response patterns, Subscribe enables event-driven updates, Invoke triggers actions, and Timed adds security for critical operations like unlocking doors.

Choosing Subscribe over frequent polling can reduce control-plane traffic by an order of magnitude.

\[ B = N \times f \times S \]

Where \(N\) is attributes, \(f\) is updates per hour, and \(S\) is bytes per update.

Worked example: Track 20 attributes per room.

  • Polling every 5 seconds: \(f=720\) reads/hour, \(S=90\) bytes/read response
  • Subscription events every 1 minute: \(f=60\) reports/hour, \(S=60\) bytes/report

\[ \begin{aligned} B_{poll} &= 20\times 720\times 90 = 1{,}296{,}000\text{ B/h} \approx 1.24\text{ MB/h}\\ B_{sub} &= 20\times 60\times 60 = 72{,}000\text{ B/h} \approx 70\text{ KB/h} \end{aligned} \]

Subscription traffic is about \(1{,}296{,}000/72{,}000 = 18\times\) lighter, which helps constrained Thread/Wi-Fi devices and fabric routers.

60.4.1 Interaction Types Overview

Matter defines how controllers interact with devices through five interaction primitives:

Matter Interaction Model showing Controller connecting to five interaction types: Read, Write, Subscribe, Invoke, and Timed, all targeting Device
Figure 60.1: Matter Interaction Model with five controller-to-device operation types
Interaction Purpose Use Cases
Read Get current attribute values Check light state, read temperature
Write Modify attribute values Set thermostat setpoint
Subscribe Receive automatic updates Real-time sensor monitoring
Invoke Execute commands Turn on light, lock door
Timed Time-bounded operations Security-sensitive actions

60.4.2 Read Interaction

Purpose: Retrieve current attribute values from a device

Flow:

  1. Controller sends Read Request specifying attribute paths
  2. Device responds with Report Data containing current values
Sequence diagram: Controller sends Read Request for OnOff attribute, Device responds with Report Data containing current value
Figure 60.2: Read interaction sequence with attribute request and response

Attribute Path Format:

/Endpoint/Cluster/Attribute
Example: /1/0x0006/0x0000 (Endpoint 1, On/Off Cluster, OnOff Attribute)

Wildcard Reads: | Path | Description | |——|————-| | /*/0x0006/* | All attributes of On/Off cluster on all endpoints | | /1/*/* | All attributes of all clusters on Endpoint 1 | | /*/*/0x0000 | Attribute 0x0000 of all clusters on all endpoints |

60.4.3 Write Interaction

Purpose: Modify writeable attribute values

Example: Setting Thermostat Setpoint

Write Request:
  Path: /1/0x0201/0x0012 (Thermostat, OccupiedHeatingSetpoint)
  Value: 2100 (21.00°C, scaled by 100)

Write Constraints:

  • Attribute must have Write access (RW in access field)
  • Value must be within defined constraints (min/max)
  • ACL must grant Write privilege to requesting node

60.4.4 Subscribe Interaction

Purpose: Receive automatic updates when attributes change

Subscription Parameters: | Parameter | Description | Typical Value | |———–|————-|—————| | MinInterval | Minimum seconds between reports | 0-60 | | MaxInterval | Maximum seconds before heartbeat | 60-3600 | | FabricFiltered | Filter by requesting fabric | true/false |

Subscribe lifecycle: Controller subscribes, Device sends initial report, then sends updates on attribute change and periodic heartbeats
Figure 60.3: Subscribe interaction lifecycle with initial report, change updates, and heartbeats

Subscription Strategy by Device Type:

Device Type MinInterval MaxInterval Rationale
Motion sensor 0 300 Immediate detection, 5-min heartbeat
Temperature sensor 60 900 Slow-changing, 15-min heartbeat
Door lock 0 60 Security-critical, 1-min heartbeat
Smart light 1 300 Debounce rapid changes

Subscription for Battery Devices:

Sleepy End Devices (SEDs) in Thread networks require special handling: - Parent router queues subscription reports - Device polls parent on wake interval - Configure MaxInterval to exceed sleep period

60.4.5 Invoke Interaction

Purpose: Execute commands on devices

Invoke sequence: Controller sends MoveToLevel command with parameters, Device executes dimming to 50% and responds with SUCCESS status
Figure 60.4: Invoke interaction sequence for command execution with status response

Common Invoke Scenarios:

Cluster Command Fields
On/Off Toggle (none)
Level Control MoveToLevel Level, TransitionTime
Door Lock LockDoor PINOrRFIDCode (optional)
Thermostat SetpointRaiseLower Mode, Amount

60.4.6 Timed Interaction

Purpose: Time-bounded operations for security-sensitive actions

Why Timed Interactions?

  • Prevents replay attacks (command must execute within window)
  • Required for security-critical operations (door locks)
  • Ensures atomic operation with timeout
Timed interaction sequence: Controller sends Timed Request with 500ms timeout, Device responds Ready, Controller sends UnlockDoor within window
Figure 60.5: Timed interaction for security-sensitive door unlock operation

Objective: Use the Matter chip-tool command-line controller to experiment with different interaction primitives on a Matter device.

Prerequisites:

  • Matter SDK installed (see Matter SDK Setup)
  • A commissioned Matter device (real or simulated)
  • Device node ID (obtained during commissioning)

Exercise Steps:

  1. Read Interaction - Query the current on/off state:

    chip-tool onoff read on-off 1 1
    • 1 1 = Node ID 1, Endpoint 1
    • Observe the boolean response (true/false)
  2. Invoke Interaction - Toggle the device:

    chip-tool onoff toggle 1 1
    • Watch the device state change
    • Try chip-tool onoff on 1 1 and chip-tool onoff off 1 1
  3. Subscribe Interaction - Monitor state changes:

    chip-tool onoff subscribe on-off 0 60 1 1
    • 0 60 = MinInterval 0s, MaxInterval 60s
    • Leave the subscription running
    • Toggle the device from another controller or physically
    • Observe automatic reports
  4. Write Interaction - Set a thermostat attribute:

    chip-tool thermostat write occupied-heating-setpoint 2100 1 1
    • Sets heating setpoint to 21.00 degrees C (value scaled by 100)
    • Note: Some attributes like current-level are read-only; use Invoke (MoveToLevel) to change brightness

What to Observe:

  • Read returns current state immediately
  • Invoke triggers action and returns status
  • Subscribe sends initial report, then updates on change
  • Write modifies attribute value directly

Challenge: Create a subscription with MinInterval=5s and MaxInterval=10s. Toggle the device rapidly. Does the device respect the MinInterval to avoid flooding?

60.5 Commissioning Flow

60.5.1 Complete Commissioning Sequence

Commissioning is the process of adding a new device to a Matter fabric.

Complete Matter commissioning flow: Discovery, PASE session, network configuration, certificate installation, CASE session, and ACL setup
Figure 60.6: Complete Matter commissioning flow from discovery through PASE, CASE, to ACL setup

60.5.2 Step-by-Step Commissioning

Step 1: Discovery

Device advertises availability through one of three methods:

Method Transport Range Use Case
BLE Bluetooth LE 10m Initial pairing, Thread devices
Wi-Fi Soft-AP Wi-Fi 30m Wi-Fi devices without internet
mDNS IP multicast LAN Devices already on network

BLE Advertisement Format:

Service UUID: 0xFFF6 (Matter)
Service Data:
  - Discriminator (12-bit): Device identifier
  - Vendor ID (16-bit): Manufacturer
  - Product ID (16-bit): Device type

Step 2: PASE Session

Passcode Authenticated Session Establishment using setup code from QR/NFC:

PASE commissioning sequence: Commissioner and Device exchange PBKDF parameters and perform SPAKE2+ key exchange to establish session keys
Figure 60.7: PASE commissioning sequence with SPAKE2+ key exchange

Step 3: Network Configuration

Commissioner provides network credentials:

Network Type Configuration Data
Thread Active Operational Dataset (network key, PAN ID, channel)
Wi-Fi SSID, Password, Security type

Step 4: Certificate Installation

Fabric CA issues Node Operational Certificate (NOC) to device:

Certificate Contents:
  - Subject: Node ID + Fabric ID
  - Public Key: Device's operational key
  - Issuer: Fabric CA
  - Validity: 1 year (renewable)

Step 5: CASE Session

Verify device has valid certificate and establish operational session:

CASE session establishment via Sigma protocol: three-message exchange of certificates and signatures resulting in AES-CCM encrypted session
Figure 60.8: CASE session establishment using three-message Sigma protocol exchange

Step 6: ACL Configuration

Commissioner grants appropriate privileges:

Privilege Capabilities
View Read attributes, subscribe
Operate View + invoke commands
Manage Operate + write attributes
Administer Manage + modify ACLs

60.5.3 Multi-Admin Commissioning

Adding a device to additional fabrics (ecosystems):

  1. Open commissioning window from existing admin
  2. Generate temporary setup code (or reuse original)
  3. Commission from new ecosystem using standard flow
  4. Device now belongs to multiple fabrics
Multi-admin commissioning: Apple Home opens window on Smart Lock, Google Home performs PASE and adds NOC, device responds to both fabrics
Figure 60.9: Multi-admin commissioning adding device to second ecosystem

60.6 Worked Example: Matter Multi-Fabric Device Setup

Worked Example: Setting Up Multi-Fabric Control

Scenario: You have a new Matter smart lock that you want to control from both Apple Home (used by family) and Google Home (used by your smart display). Configure the lock to work with both ecosystems simultaneously.

Given:

  • Device: Yale Assure Lock 2 (Matter-compatible, Thread transport)
  • Setup code (from QR): “34970112332”
  • Existing Thread network: Apple HomePod Mini as Border Router
  • Target fabrics: Apple Home Fabric + Google Home Fabric
  • Maximum fabrics supported by device: 5

Steps:

  1. Initial commissioning to Apple Home (Fabric 1):
    • Open Apple Home app on iPhone
    • Scan lock QR code (extracts setup code “34970112332”)
    • iPhone establishes PASE session with lock using setup code
    • Apple Home Fabric CA issues Node Operational Certificate (NOC)
    • NOC contains: Node ID 0x0001, Fabric ID 0xFABRIC_APPLE
    • Lock stores Apple fabric credentials in Fabric Index 1
  2. Configure multi-admin (open commissioning window):
    • In Apple Home app: Lock settings -> “Allow other apps to control”
    • This opens 15-minute commissioning window
    • Lock advertises availability via mDNS (Wi-Fi) and Thread MLE
    • Window timeout: 900 seconds (configurable)
  3. Commission to Google Home (Fabric 2):
    • Open Google Home app on Android phone
    • Scan same lock QR code (original setup code still valid)
    • Google Home app discovers lock via mDNS/Thread
    • Establishes PASE session (separate from Apple session)
    • Google Home Fabric CA issues separate NOC
    • NOC contains: Node ID 0x0002, Fabric ID 0xFABRIC_GOOGLE
    • Lock stores Google fabric credentials in Fabric Index 2
  4. Verify dual-fabric configuration:
    • Lock now has 2 entries in Fabric Table:
      • Fabric 1: Apple Home (NOC with Apple Root CA)
      • Fabric 2: Google Home (NOC with Google Root CA)
    • ACL grants both fabrics Operate privilege
    • Each fabric can independently: Lock/Unlock, Read status, Subscribe
  5. Operational behavior:
    • Apple Home: iPhone -> HomePod (Border Router) -> Thread mesh -> Lock (Fabric 1 session)
    • Google Home: Android -> Nest Hub (Border Router) -> Thread mesh -> Lock (Fabric 2 session)
    • Lock maintains separate CASE sessions per fabric (concurrent)

Result: Lock responds to commands from both Apple Home and Google Home. Each ecosystem has independent access through its own fabric with separate certificates and ACLs.

Key Insight: Matter’s multi-fabric architecture enables true multi-vendor control without cloud bridging. Each ecosystem operates independently with its own certificate chain and access controls.

60.7 Common Pitfalls

Pitfall: Subscription Overload on Constrained Devices

The Mistake: Controllers subscribe to many attributes with MinInterval=0 on battery-powered devices, causing excessive wake cycles and rapid battery drain. The device may also run out of subscription slots (typically limited to 3-5 concurrent subscriptions on constrained devices).

Why It Happens: Developers assume immediate updates are always desirable without considering device constraints. Each subscription requires memory for tracking and triggers reports on every change.

The Fix: Design subscriptions based on device capabilities and use case requirements:

// For battery sensors
MinInterval: 60   // Allow 1-minute batching
MaxInterval: 900  // 15-minute heartbeat sufficient
Attributes: Only essential (e.g., Occupancy, not LastMotionTime)

// For mains-powered devices
MinInterval: 0    // Immediate updates OK
MaxInterval: 300  // 5-minute heartbeat
Attributes: Can be more inclusive

Query device’s MaxSubscriptionsPerFabric capability before creating multiple subscriptions.

Pitfall: Commissioning Window Timeout During Multi-Admin Setup

The Mistake: Opening a commissioning window, then taking too long to scan QR code in the second ecosystem app. The 15-minute (900 second) default window expires, and commissioning fails with “Device not in commissioning mode” error.

Why It Happens: Users switch between apps, get distracted, or encounter app issues while the window timer continues running on the device.

The Fix:

  1. Have the second ecosystem app ready before opening the window
  2. Use longer timeout if available: OpenCommissioningWindow(Timeout=1800) for 30 minutes
  3. If window expires, simply re-open from the first ecosystem’s app
  4. Some apps show remaining time - watch for expiration warnings

Key Concepts

  • Matter Interaction Model: The protocol layer defining how controllers read attributes, write attributes, invoke commands, and subscribe to events on Matter devices.
  • Attribute: A named data value on a Matter cluster representing device state (e.g., OnOff cluster’s on-off boolean attribute).
  • Command: A named action that can be invoked on a Matter cluster (e.g., Toggle command on the OnOff cluster).
  • Event: A Matter cluster element representing a timestamped occurrence logged in device history, distinct from attributes which only hold current state.
  • Subscribe Interaction: A Matter interaction where a controller establishes a subscription to receive automatic reports when an attribute changes or at periodic intervals.
  • Report Data: The Matter message carrying attribute or event data from a device to a subscribed controller, generated either on attribute change or at the max interval.
  • Path: A reference to a specific endpoint, cluster, and attribute/command/event on a Matter device, used in interaction model messages.

60.8 Knowledge Check

60.9 Quick Assessment

60.9.1 Knowledge Check: Matter Subscription Design

60.9.2 Knowledge Check: Matter Commissioning

60.9.3 Knowledge Check: Timed Interactions

60.10 Latency Reality: How Fast Are Matter Commands?

Users expect smart home responses to feel instant. Understanding the actual latency of Matter interactions helps set realistic expectations and avoid designs that feel sluggish.

Measured latency for “turn on kitchen light” (Matter over Thread):

Phase Time Cumulative
Voice assistant speech recognition 200-800 ms 800 ms
Controller processes command 10-50 ms 850 ms
CASE session lookup (cached) 1-5 ms 855 ms
Thread mesh routing (2 hops avg) 15-30 ms 885 ms
MRP delivery + ACK 5-15 ms 900 ms
Device processes Invoke command 1-5 ms 905 ms
LED driver response 1-2 ms 907 ms
Total voice-to-light ~900 ms

Matter over Wi-Fi is faster for the network portion (single hop, no mesh routing), but the voice recognition dominates total latency regardless. For app-based control (no voice), Matter over Wi-Fi achieves 50-100ms end-to-end, while Matter over Thread achieves 80-150ms.

When latency matters most: Group commands (e.g., “turn off all lights”) use IPv6 multicast over Thread, reaching all devices in a single transmission. Without multicast, 20 lights controlled sequentially would take 20 x 100ms = 2 seconds, creating a visible “wave” effect. With multicast, all 20 respond within 150ms.

60.11 Concept Relationships

Concept Related To Relationship
Read Interaction Subscribe Read is one-time query; Subscribe provides continuous updates
PASE Session CASE Session PASE establishes initial trust for commissioning; CASE provides ongoing authentication
Multi-Admin Fabric Each admin controller manages a separate fabric; device stores credentials for all fabrics
Timed Interaction Invoke Timed adds security bounds to Invoke commands for replay attack prevention
Commissioning Window Multi-Admin Must open commissioning window to add device to additional fabrics
MinInterval/MaxInterval Subscription Strategy MinInterval prevents report flooding; MaxInterval ensures heartbeat even without changes

60.12 Key Takeaways

60.13 Summary

  1. Five interaction types enable all controller-device communication: Read, Write, Subscribe, Invoke, and Timed

  2. Subscriptions provide real-time updates with configurable min/max intervals - design based on device power and use case

  3. Timed Interactions protect security-sensitive operations from replay attacks

  4. Commissioning has six steps: Discovery, PASE, Network Config, Certificates, CASE, ACL

  5. Multi-admin allows one device to belong to multiple ecosystems (fabrics) with independent control

  6. Discovery methods include BLE (Thread devices), Wi-Fi Soft-AP, and mDNS (already-networked devices)

60.14 See Also

60.15 What’s Next

Chapter Focus
Matter Fabric and Security Multi-admin fabric architecture, CASE/PASE cryptographic details, and encryption mechanisms
Matter Device Types and Clusters Complete cluster library, device type definitions, and conformance requirements
Matter Implementation SDKs (ConnectedHomeIP), development workflows, and building Matter products
Matter Device Commissioning Hands-on commissioning implementation, pairing code generation, and factory reset flows
Matter Testing and Certification CSA certification process, test harness setup, and interoperability testing