Matter Protocol Integration for Smart Home Control
Matter is an open smart home standard from Connectivity Standards Alliance (CSA), supported by Apple, Google, Amazon, and Samsung. A Matter-certified device works with any ecosystem: Apple Home, Google Home, Amazon Alexa, SmartThings — without separate integrations for each. For mobile applications, this means: one SDK to control all Matter devices regardless of manufacturer.
How Matter Works at the Stack Level
Matter operates over IPv6 via Wi-Fi or Thread (low-energy mesh network). Border Router (HomePod mini, Google Nest Hub, Echo) connects the Thread network to the IP network.
Device commissioning process:
- User scans QR code or enters device PIN
- Phone establishes Bluetooth connection with device
- Certificate exchange via PASE (Passcode Authenticated Session Establishment)
- Device receives network credentials and connects to Wi-Fi / Thread
- Device is added to Fabric — shared trusted space
One physical device can be added to multiple Fabrics simultaneously (Multi-Admin). A lamp added to both Apple Home and Google Home — both ecosystems control it independently.
iOS: Matter via HomeKit + MatterSupport
On iOS, Matter devices are added via HomeKit. Application can initiate the process via MatterSupport.framework (iOS 16.1+):
import MatterSupport
func addMatterDevice() {
let topology = MatterAddDeviceRequest.Topology(
ecosystemName: "MyApp Smart Home",
homes: [MatterAddDeviceRequest.Topology.Home(
displayName: "My home"
)]
)
let request = MatterAddDeviceRequest(topology: topology)
Task {
do {
try await request.perform()
// device added to HomeKit
} catch {
// MatterAddDeviceRequest.Error.userCancelled — user cancelled
}
}
}
After adding, the device is available as HMAccessory in HomeKit. Management via standard HMCharacteristic API. Matter-specific clusters not in HomeKit are available via HMAccessory.matterNodeID and additional APIs.
Android: Google Home Mobile SDK + Matter SDK
Google provides two paths:
Google Home Mobile SDK (recommended for most applications) — high-level SDK for commissioning devices into Google Home ecosystem:
// Add via Google Home
val commissioningRequest = CommissioningRequest.builder()
.setCommissioningService(MatterCommissioningService::class.java)
.build()
homeClient.commissionDevice(commissioningRequest).addOnSuccessListener { result ->
// device added
}.addOnFailureListener { exception ->
// error handling
}
Matter SDK (connectedhomeip) — full implementation from CSA, includes own Fabric and device management without Google Home dependency. Significantly more complex: need to manage Fabric Credentials, store certificates, implement commissioning yourself.
When Matter SDK direct is needed: building own ecosystem (don't want dependency on Apple Home / Google Home), or need access to device clusters beyond standard HomeKit/Google Home API.
Matter Clusters
Matter uses clusters model — similar to GATT Characteristics in BLE. Cluster 0x0006 — On/Off. Cluster 0x0008 — Level Control (brightness). Cluster 0x0300 — Color Control.
Via Matter SDK:
// Direct cluster management
val endpointId = EndpointId(1u)
val clusterId = ClusterId(0x0006u) // On/Off
val attributePath = AttributePath(
endpointId = endpointId,
clusterId = clusterId,
attributeId = AttributeId(0x0000u) // OnOff attribute
)
// Read state
chipDeviceController.readAttributePath(devicePtr, listOf(attributePath), 0)
Typical Development Challenges
Thread Border Router. If device uses Thread, phone cannot work with it directly without Thread Border Router in network. Development requires compatible Border Router (HomePod mini, Eero 6, Google Nest Wifi Pro).
Certification. Matter device must be CSA certified. Application management doesn't require this, but testing on uncertified prototype possible via Development Mode SDK.
Commissioning window. Device opens window for adding (11 minutes by default). If commissioning not completed — restart needed. This requires explicit UX handling.
Implementation timeframe: 1–2 weeks — commissioning + basic management via MatterSupport/Google Home SDK. Own Fabric with Matter SDK directly — 4–6 weeks. Cost calculated individually.







