Matter is an IP-based, royalty-free connectivity protocol standard that enables communication among a wide range of smart devices.

Posts under Matter tag

32 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

How to Apply for a New Product Profile in HomeKit for a Standing Desk
Hello fellow developers, I’m developing a smart standing desk under my brand Beflo, which integrates technology with traditional furniture. As part of this, we’re working to make our Tenon smart desk compatible with the Apple HomeKit ecosystem. While exploring HomeKit profiles, I noticed there isn’t a specific profile for standing desks. However, there are similar profiles, such as curtains, which also use motors for operation and could align with our product's functionality, like height adjustments. I have a few questions: What is the process for proposing or applying for a new product profile in HomeKit? Is it feasible to adapt an existing profile (like curtains) in the interim while awaiting approval for a new profile? Has anyone had experience navigating this process, and are there any best practices or resources you recommend? I’d love to hear insights from anyone who has experience with HomeKit development or working on similar product integrations. Thank you for your time and guidance!
2
0
127
1w
Anyone who encounters "hmmtrAccessoryServerStateChange" error during Matter device commissioning?
Hello. I found that my iPhone has encountered same error continuously when I tried to commission my Eve Door & Window device. Nov 12 11:33:48 iPhone homed(Matter)[181] <Error>: Can't extract public key from certificate: src/crypto/CHIPCryptoPALOpenSSL.cpp:1911: CHIP Error 0x0000002F: Invalid argument Nov 12 11:33:48 iPhone homed(Matter)[181] <Error>: convertX509Certificate: src/credentials/CHIPCertFromX509.cpp:559: CHIP Error 0x0000002F: Invalid argument Nov 12 11:33:55 iPhone homed(HomeKitMatter)[181] <Error>: [4264877660/1(3180582119)] Couldn't get device being commissioned for network scanning: (null) Nov 12 11:33:55 iPhone homed(HomeKitDaemon)[181] <Error>: No unpaired accessory for server HMMTRAccessoryServer fa:e6:88:97:2a:ee Nov 12 11:33:55 iPhone homed(HomeKitMetrics)[181] <Error>: [4264877660/1(3180582119)] tag="hmmtrAccessoryServerStateChange" desc="Error in progress state" errorDomain="MTRErrorDomain" errorCode="1" state="19" Nov 12 11:33:55 iPhone homed(HomeKitMatter)[181] <Error>: [4264877660/1(3180582119)] CHIP Accessory pairing failed: Error Domain=MTRErrorDomain Code=1, <HMMTRAccessoryPairingEndContext, Step: HMMTRAccessoryPairingStep_GettingNetworkRequirement, Error: Error Domain=MTRErrorDomain Code=1 "The operation couldn\M-b\M^@\M^Yt be completed. (MTRErrorDomain error 1.)", Sourceerrordomain: MTRErrorDomain> Is there anyone who has experienced or solved the same error as me? Thanks.
0
0
149
Nov ’24
Under iOS18.1 and Xcode 16.1, use Matter and MatterSupport to pair Matter devices
Under iOS18.1 and Xcode 16.1, use Matter and MatterSupport to pair Matter devices. It was found that Matter over WIFI devices could not trigger the PASE process let device = try deviceController? .deviceBeingCommissioned(withNodeID: commissioningDeviceID) After some time: func controller(_: MTRDeviceController, statusUpdate status: MTRCommissioningStatus) Return failure Device logs: E (47956) chip[ZCL]: Commissioning window is currently not open I (48789) chip[EM]: <<< [E:17954r S:13425 M:26847390 (Ack:206367876)] (S) Msg TX to 1:00000000EE53575F [AE90] [UDP:[FE80::148F:AC68:D736:CA5C%st1]:58332] --- Type 0001:09 (IM:InvokeCommandResponse) E (48798) chip[DL]: Long dispatch time: 867 ms, for event type 3 I (48804) chip[EM]: >>> [E:17954r S:13425 M:206367876 (Ack:26847387)] (S) Msg RX from 1:00000000EE53575F [AE90] --- Type 0001:08 (IM:InvokeCommandRequest) I (48819) chip[EM]: <<< [E:17954r S:13425 M:26847391 (Ack:206367876)] (S) Msg TX to 1:00000000EE53575F [AE90] [UDP:[FE80::148F:AC68:D736:CA5C%st1]:58332] --- Type 0000:10 (SecureChannel:StandaloneAck) I (48838) chip[EM]: >>> [E:17954r S:13425 M:206367876 (Ack:26847387)] (S) Msg RX from 1:00000000EE53575F [AE90] --- Type 0001:08 (IM:InvokeCommandRequest) I (48851) chip[EM]: <<< [E:17954r S:13425 M:26847392 (Ack:206367876)] (S) Msg TX to 1:00000000EE53575F [AE90] [UDP:[FE80::148F:AC68:D736:CA5C%st1]:58332] --- Type 0000:10 (SecureChannel:StandaloneAck) I (48935) chip[EM]: >>> [E:17954r S:13425 M:206367877 (Ack:26847390)] (S) Msg RX from 1:00000000EE53575F [AE90] --- Type 0000:10 (SecureChannel:StandaloneAck) I (48952) chip[EM]: >>> [E:17955r S:13425 M:206367878] (S) Msg RX from 1:00000000EE53575F [AE90] --- Type 0001:0a (IM:TimedRequest) I (48957) chip[EM]: <<< [E:17955r S:13425 M:26847393 (Ack:206367878)] (S) Msg TX to 1:00000000EE53575F [AE90] [UDP:[FE80::148F:AC68:D736:CA5C%st1]:58332] --- Type 0001:01 (IM:StatusResponse) I (48998) chip[EM]: >>> [E:17955r S:13425 M:206367879 (Ack:26847393)] (S) Msg RX from 1:00000000EE53575F [AE90] --- Type 0001:08 (IM:InvokeCommandRequest) I (49019) esp_matter_command: Received command 0x00000000 for endpoint 0x0000's cluster 0x0000003C I (49019) chip[ZCL]: Received command to open commissioning window I (49025) chip[DIS]: Updating services using commissioning mode 2 I (49087) chip[DIS]: CHIP minimal mDNS started advertising. I (49093) chip[DIS]: Advertise operational node 752B90252951AE90-000000005B4AA994 I (49094) chip[DIS]: CHIP minimal mDNS configured as 'Operational device'; instance name: 752B90252951AE90-000000005B4AA994. I (49105) chip[DIS]: mDNS service published: _matter._tcp I (49109) chip[DIS]: Advertise commission parameter vendorID=5493 productID=8228 discriminator=0741/02 cm=2 I (49120) chip[DIS]: CHIP minimal mDNS configured as 'Commissionable node device'; instance name: 1D59D05DF5376A3B. I (49137) chip[DIS]: mDNS service published: _matterc._udp I (49137) chip[ZCL]: Commissioning window is now open I (49143) chip[EM]: <<< [E:17955r S:13425 M:26847394 (Ack:206367879)] (S) Msg TX to 1:00000000EE53575F [AE90] [UDP:[FE80::148F:AC68:D736:CA5C%st1]:58332] --- Type 0001:09 (IM:InvokeCommandResponse) I (49161) app_main: Commissioning window opened I (49200) chip[EM]: >>> [E:17955r S:13425 M:206367880 (Ack:26847394)] (S) Msg RX from 1:00000000EE53575F [AE90] --- Type 0000:10 (SecureChannel:StandaloneAck) I (69380) SENSOR: Temp: 236 I (69383) ACInterface: AC event ntc :236
0
0
148
Nov ’24
Matter controller permissions after device commissioning
I have tried filing a feedback, FB15509991, for help with this and that didn't go anywhere. Figured I would try the developer forums. Overview I am working on a matter device using the Matter SDK and the matter device basically consists of both a matter bridge and matter controller functionality. The bridge part is currently a none-issue, however trying to have our device be an additional controller for the existing matter fabric. The overall idea for our device as a matter controller is that it can be commissioned with Apple Home (via Matter BLE commissioning) and then view and control existing matter devices (over Wi-Fi network) on the Homekit matter fabric (convenient user experience), instead of our device having to form a matter fabric of its own and then having the user re-commission all their devices to add them our controller (difficult and possibly frustrating user experience), in order to have a consistent control experience between our device's display and Apple Home app. The big problem When we onboard our device via Apple Home app it does not have attribute write permission to other devices on the same fabric as we are seeing Unsupported Access (IM:0x0000057E) responses instead of expected attribute changes. Same for attempts to read valid endpoint/cluster/attributes. The possible solution Our operational device needs to be added to the access control list (ACL) with View and Operator permissions and then the ACL update pushed to all the fabric devices in order to give our device controller access to them. The next problem My question is what do we have to do in order for our device will be given control access permissions (View + Operator) in an ACL (access control list) update to other devices after our device has been commissioned? Because the matter specification does not define a "Controller Cluster" that could be used to type a device as a matter controller to make it obvious that the device wishes to have controller permissions post commissioning. So that means its up to each fabric administrator implementer as to how to accomplish what I'm requesting to do. I'm hoping somebody in the Apple team responsible for the Matter + HomeKit integration could give me some insight as to whether this is even possible at this time. Test environment The environment consists of: iPhone running iOS 17.7 iPad running iPadOS 18.0.1 HomePod Mini with software version 18.0 Realtek WiFi module running Matter Fan+Light firmware (Matter SDK 1.3) for target/controlee [our device] LCD display unit + Realtek WiFi module (Matter SDK 1.3) for controller.
1
0
262
Oct ’24
Commissioning Matter Thread Device without Hub
I have been looking at the new feature in iOS 18 where it is possible to pair Matter accessories without a hub. Using the Home app I can successfully commission and control a Matter Thread Light Bulb directly (without a home hub in the network). I have an iPhone 15 Pro which includes the thread hardware. I then tried to commission the same device in my own app using the MatterSupport framework. In this case the same user interface is displayed as when using the Home App but an error is displayed - "Thread Border Router Required." Is it also possible to connect directly to a thread Matter device when using MatterSupport or does this only work when using the Home app?
3
0
367
Nov ’24
iOS 17.6.1 App crashes during Matter provisioning
The app crashes after the system Matter provisioning dialog disappears. Fatal Exception: NSInvalidArgumentException *** +[NSString stringWithUTF8String:]: NULL cString Fatal Exception: NSInvalidArgumentException 0 CoreFoundation 0x83f20 __exceptionPreprocess 1 libobjc.A.dylib 0x172b8 objc_exception_throw 2 Foundation 0x6194 +[NSString allocWithZone:] 3 Matter 0x471e30 MTRDeviceControllerStorageClasses 4 libsystem_dnssd.dylib 0x48ac CallbackWithError 5 libsystem_dnssd.dylib 0x2a10 DNSServiceProcessResult 6 libdispatch.dylib 0x3dd4 _dispatch_client_callout 7 libdispatch.dylib 0x72d8 _dispatch_continuation_pop 8 libdispatch.dylib 0x1b1c8 _dispatch_source_latch_and_call 9 libdispatch.dylib 0x19d8c _dispatch_source_invoke 10 libdispatch.dylib 0xb284 _dispatch_lane_serial_drain 11 libdispatch.dylib 0xbf64 _dispatch_lane_invoke 12 libdispatch.dylib 0x16cb4 _dispatch_root_queue_drain_deferred_wlh 13 libdispatch.dylib 0x16528 _dispatch_workloop_worker_thread 14 libsystem_pthread.dylib 0x4934 _pthread_wqthread 15 libsystem_pthread.dylib 0x10cc start_wqthread
0
0
198
Oct ’24
Can I hand Matter commissioning over to the Home App?
Instead of using the MatterSupport framework to commission a device, I'd much rather throw the process over to the Home App if possible. I noticed that if I open my camera app and scan a Matter QR code, that starts the process to commission the device in the Home App. That means the Home App must be able to handle a url scheme with the QR code details. Is this available for developers to deep link into the Home App? Launching the QR code as a url itself does not work so Apple Home isn't capturing the MT url scheme. Otherwise I can open Apple Home with com.apple.home:// but have no idea what params would need to be passed to that scheme. if let url = URL(string: "MT:E9.01EEI141RUX5.210") { UIApplication.shared.open(url) { result in print(result) } } Is there something in the documentation I'm missing that allows for this?
2
0
330
Oct ’24
Matter development - Matter Accessory - Apple Ecosystem
Apple developer support could not answer my question which is the following: How are Matter developers supposed to test accessory pairing, accessory communication and accessory discovery if the Console logs provided by Apple (iOS, MacOS, iPadOS) are encrypted, incomplete or straight up non-existent. Current issue is mDNS-SD discovery, pairing and PAKE requests initialisation. Impossible to figure out why X or Y stopped on the Apple Device. Chip-tool (provided by PROJECT-CHIP) acts 100% differently than iOS (Home) or iPadOS(Home). Thank you
0
0
395
Sep ’24
Unable to commission with wifi device using iOS matter framework
Hi there: Following document: https://developer.apple.com/documentation/mattersupport to add wifi sensor to my own fabric. I added MatterExtension, Matter Allow Setup Payload = YES, Add following to info.plist _matter._tcp _matterc._udp _matterd._udp _meshcop._udp I can still not get callback from MatterAddDeviceExtensionRequestHandler commissionDevice. I know print log can not be seen in Extension, but I can still not see any logs even use os_log.
2
0
385
Sep ’24
Matter subscriptions not working with MTRBaseDevice obtained from HomeKit
I am working on an app for a Home automation device built on Matter. There are both standard and custom features/services/clusters on this device. HomeKit seems to pick up the standard ones except for one (leak detector) that is part of the Matter 1.3 spec. Of course HomeKit doesn't know what to do with the custom ones so they aren't shown in the Home app. I am trying to access those directly via calls to the Matter APIs so I can present them in a custom app. To access Matter APIs I am using a process suggested by DTS in a forum post that can be found here. The MTRBaseDevice I obtain in the suggested way responds appropriately to read and write commands, but subscribe doesn't work as expected. It returns an error code 48 which is described as "The operation couldn’t be completed." and the source that contains the error calls it "operationNotSupported". This is the subscribe call referenced in the DTS response to earlier post, however there are three more "subscribe" methods and I have tried them all. Two also return an error 48, and the last one never calls any of the callback handlers providing no data or errors. Since a subscription is supposed to return data periodically even when there have been no changes it doesn't seem that different than polling so I have written code for that and it works. However I don't expect iOS will let me poll in the background for alarm conditions and I am hoping subscription updates will be sent to a background app so it can notify users of these conditions. Is that a reasonable assumption? Here is the code I am using to test subscribe, perhaps I am doing something wrong? Originally I had shorter intervals but changing them made no difference. Do they need to be longer? let subscribeParams = MTRSubscribeParams(minInterval: 15, maxInterval: 900) if #available(iOS 17.6, *) { subscribeParams.shouldAssumeUnknownAttributesReportable = true } subscribeParams.shouldFilterByFabric = false subscribeParams.shouldReplaceExistingSubscriptions = true subscribeParams.shouldReportEventsUrgently = true subscribeParams.shouldResubscribeAutomatically = false print("Attempting subscribe:with") let localClusterStateCache = MTRClusterStateCacheContainer() matterBaseDevice.subscribe(with: OS_dispatch_queue_global.global(), params: subscribeParams, clusterStateCacheContainer: localClusterStateCache) { (attributes: [Any]) in print("subscribe:with attributeHandler: \(attributes)") } eventReportHandler: { (events: [Any]) in print("subscribe:with eventHandler: \(events)") } errorHandler: { (error: any Error) in let reportingError = error as NSError if reportingError.domain == "HMErrorDomain" { let hkError = HMError(HMError.Code(rawValue: reportingError.code)!) print("subscribe:with errorHandler: \(hkError.localizedDescription); UserInfo: \(hkError.userInfo); ErrorUserInfo: \(hkError.errorUserInfo)") } else { print("subscribe:with errorHandler: \(reportingError)") } } subscriptionEstablished: { print("subscribe:with Subscription established!!!") } resubscriptionScheduled: { (error: any Error, numericParam: NSNumber) in print("subscribe:with Resubscription scheduled; error: \(error); numericParam: \(numericParam)") }
7
0
720
Oct ’24
Matter: Commissioning of a device
Hi everyone, I am pretty new to writing Swift and only doing it to extend a React Native App, thus my knowledge is a bit limited. I am trying to follow the example from https://developer.apple.com/documentation/mattersupport/adding-matter-support-to-your-ecosystem#Set-the-principal-class Without implementing the Extension, the Workflow starts but fails after a few minutes to add the device to Apple Home. Hence, I am currently trying to add the extension (as this is later on needed anyway to commission the device to our ecosystem). I added the class with some dummy logs to see if anything gets triggered but I am failing at registering the class as stated at https://developer.apple.com/documentation/mattersupport/adding-matter-support-to-your-ecosystem#Set-the-principal-class How is this meant to work? I guess I need to define it in info.plist but at least this did not work out: ... <key>NSExtensionPointIdentifier</key><string>com.apple.matter.support.extension.device-setup</string> <key>NSExtensionPrincipalClass</key><string>IoBrokerAddDeviceExtensionRequestHandler</string> ... Does anyone know how to register the class? Thanks in advance. Kind regards Moritz
1
0
404
Aug ’24
How use MatterSupport to commission a thread device?
Hi, When I would like to use MatterAddDeviceRequest to commission a thread device, I will get error "Error Domain=HMErrorDomain Code=18 "Pairing Failed" UserInfo={NSLocalizedDescription=Pairing Failed, NSUnderlyingError=0x282786e20 {Error Domain=HAPErrorDomain Code=15 "(null)"}}". As checking logs, I found App will always get fail to store thread credential (-[THClient storeCredentialsForBorderAgent:activeOperationalDataSet:completion:]_block_invoke:646: - Response: Error Domain=ThreadCredentialsStore Code=1 "Backing store is nil..." UserInfo={NSLocalizedDescription=}) so that I will also get error "CHIP Accessory Server failed to obtain Thread credentials for selected extended PAN ID... Error: (null)" in following. Logs: error 17:59:05.713433+0800 CoreThreadCommissionerServiced ThreadCommissioningService is Enabled error 17:59:05.713597+0800 CoreThreadCommissionerServiced Server: -[CTCSXPCService checkEntitlements:connection:] - Entitlement Check is successful for the key : <private> error 17:59:05.714183+0800 MatterExtension Client: -[THClient getConnectionEntitlementValidity]_block_invoke - Error: (null) error 17:59:05.714695+0800 MatterExtension -[THClient storeCredentialsForBorderAgent:activeOperationalDataSet:completion:]_block_invoke:646: - Response: Error Domain=ThreadCredentialsStore Code=1 "Backing store is nil..." UserInfo={NSLocalizedDescription=<private>} error 17:59:05.715346+0800 CoreThreadCommissionerServiced Server: -[CTCSXPCService listener:shouldAcceptNewConnection:]_block_invoke - XPC Connection invalidated error 17:59:05.747498+0800 CoreThreadCommissionerServiced ThreadCommissioningService is Enabled error 17:59:05.748245+0800 CoreThreadCommissionerServiced Server: -[CTCSXPCService checkEntitlements:connection:] - Entitlement Check is successful for the key : <private> error 17:59:05.749249+0800 homed Client: -[THClient getConnectionEntitlementValidity:]_block_invoke - Error: (null) error 17:59:05.750575+0800 CoreThreadCommissionerServiced Server: -[CTCSXPCService checkEntitlements:connection:] - Entitlement Check is successful for the key : <private> default 17:59:05.750705+0800 CoreThreadCommissionerServiced Request to fetch active dataset record with xpanid <private> default 17:59:05.751315+0800 CoreThreadCommissionerServiced nw_path_evaluator_start [AC0FC426-242F-40D0-945A-27682116B6EE <NULL> generic, attribution: developer]path: satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns error 17:59:05.752692+0800 homed [1263984240/1] CHIP Accessory Server failed to obtain Thread credentials for selected extended PAN ID... Error: (null) error 17:59:05.754467+0800 homed Invalidating XPC connection. error 17:59:05.754694+0800 homed Client: -[THClient connectToXPCService]_block_invoke - CTCS XPC Client is invalidated. error 17:59:05.755485+0800 CoreThreadCommissionerServiced Server: -[CTCSXPCService listener:shouldAcceptNewConnection:]_block_invoke - XPC Connection invalidated May I get an advice?? Thanks
2
0
438
Jul ’24
How use MatterSupport to commission a thread device?
Hi, Currently I would like to commission a thread device via MatterSupport. When I call MatterAddDeviceRequest API, it returns "Failed to perform Matter device setup setup: Error Domain=HMErrorDomain Code=18 "Pairing Failed" UserInfo={NSLocalizedDescription=Pairing Failed, NSUnderlyingError=0x282786e20 {Error Domain=HAPErrorDomain Code=15 "(null)"}}". As Log, I found I always get error while calling [THClient storeCredentialsForBorderAgent:activeOperationalDataSet:completion:]. It will return error "Invalid parameter sent to server..." so that I also get error log "CHIP Accessory Server failed to obtain Thread credentials for selected extended PAN ID... Error: (null)" in following. Logs: error 17:59:05.714183+0800 MatterExtension Client: -[THClient getConnectionEntitlementValidity]_block_invoke - Error: (null) error 17:59:05.714695+0800 MatterExtension -[THClient storeCredentialsForBorderAgent:activeOperationalDataSet:completion:]_block_invoke:646: - Response: Error Domain=ThreadCredentialsStore Code=4 "Invalid parameter sent to server..." UserInfo={NSLocalizedDescription=<private>} error 17:59:05.715346+0800 CoreThreadCommissionerServiced Server: -[CTCSXPCService listener:shouldAcceptNewConnection:]_block_invoke - XPC Connection invalidated error 17:59:05.747498+0800 CoreThreadCommissionerServiced ThreadCommissioningService is Enabled error 17:59:05.748245+0800 CoreThreadCommissionerServiced Server: -[CTCSXPCService checkEntitlements:connection:] - Entitlement Check is successful for the key : <private> error 17:59:05.749249+0800 homed Client: -[THClient getConnectionEntitlementValidity:]_block_invoke - Error: (null) error 17:59:05.750575+0800 CoreThreadCommissionerServiced Server: -[CTCSXPCService checkEntitlements:connection:] - Entitlement Check is successful for the key : <private> default 17:59:05.750705+0800 CoreThreadCommissionerServiced Request to fetch active dataset record with xpanid <private> default 17:59:05.751315+0800 CoreThreadCommissionerServiced nw_path_evaluator_start [AC0FC426-242F-40D0-945A-27682116B6EE <NULL> generic, attribution: developer]path: satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns error 17:59:05.752692+0800 homed [1263984240/1] CHIP Accessory Server failed to obtain Thread credentials for selected extended PAN ID... Error: (null) error 17:59:05.754467+0800 homed Invalidating XPC connection. error 17:59:05.754694+0800 homed Client: -[THClient connectToXPCService]_block_invoke - CTCS XPC Client is invalidated. error 17:59:05.755485+0800 CoreThreadCommissionerServiced Server: -[CTCSXPCService listener:shouldAcceptNewConnection:]_block_invoke - XPC Connection invalidated May I get an advice?? Thanks
1
0
401
Aug ’24
Matter Device OTA upgrade issue
I am using a Matter Device to do the OTA test with iPhone 8 Plus, HomePod mini, and the Home App. however, there is some abnormal behavior. The problem is that: The Matter device in the pop-up message is still the old firmware version after the OTA upgrade successfully. A few minutes later, the firmware version is updated in the device info but Apple Home still pop-up that a new firmware version is available for the Matter device with the same new version. When I restart the HomePod mini, no more updates are available for my device. is the HomePod cached the firmware version? The firmware version display format is incorrect? I remember the firmware format is in string e.g. 1.6.138. I could confirm this issue happened on HomePod mini V17.4. example: The old firmware version of the Matter device should be 251689472 in number and 1.5.122.0 in string. The new firmware version of the Matter device after OTA should be 1.6.138.0 in string and 268470784 in number (OTA upgrade with new firmware version) **Please let me know if more information is needed. ** Environment: iPhone 8 Plus, IOS 16.7.5 Apple HomePod Mini V17.5
0
0
458
Jul ’24
Support for custom Matter endpoints, clusters and attributes
I am working on an app for a home automation device. If I were using HomeKit exclusively I could add custom services or custom characteristics on standard services and these things would all be reported to my app via HomeKit. There is sample code from Apple that demonstrates how to do this. When a Matter device is commissioned using HomeKit you might expect custom clusters and/or custom attributes in a standard cluster would be translated to appropriate HomeKit services and characteristics, but this doesn't appear to be the case. Is there a way to have HomeKit do this? If not it seems I would need to use Matter directly rather than via HomeKit to access custom features. But if I commission the device using Matter in my app then I understand a new fabric is created and the device would not show in the Home app. Maybe the user needs to commission the device twice, once with my custom app and once with the Home app? That seems like a poor user experience to me. Perhaps that is the price paid for using a cross-platform standard? Is there a better way to get the same level of customization using Matter that I am able to get using HomeKit?
10
0
1.2k
Oct ’24
Pairing with MatterSupport framework
In my RequestHandler.swift, this is extension of MatterAddDeviceExtensionRequestHandler After commission device is completion. I call getBaseDevice method in the MTRDeviceController. func controller(_ controller: MTRDeviceController, commissioningComplete error: Error?, nodeID: NSNumber?) { if error != nil { os_log(.default, "TrinhVM: commissioningComplete error -> \(error!.localizedDescription)") } else { os_log(.default, "TrinhVM: commissioningComplete ->\(nodeID)") chipController.getBaseDevice(1, queue: DispatchQueue.main, completionHandler: { chipDevice, error in if chipDevice == nil { os_log(.debug, "Status: Failed to establish a connection with the device") } else { os_log(.error, "Status: Success to establish a connection with the device: \(chipDevice?.description ?? "")") let onOff = MTRBaseClusterOnOff(device: chipDevice, endpointID: 1, queue: DispatchQueue.main) // Send the "on" command to the device onOff?.on { error in let resultString: String if let error = error { resultString = String(format: "An error occurred: 0x%02lx", error._code) } else { resultString = "On command success" } debugPrint(resultString) } } }) } } It's working well, the status is always "Status: Success to establish a connection with the device". And I can control the lightbulb here with chipDevice (chipDevice is MTRBaseDevice). But, after the commission device has finished in the extension, get back the application scheme. I call method: chipController.getBaseDevice(1, queue: DispatchQueue.main, completionHandler: { chipDevice, error in if chipDevice == nil { os_log(.debug, "Status: Failed to establish a connection with the device") } else { os_log(.error, "Status: Success to establish a connection with the device: \(chipDevice?.description ?? "")") let onOff = MTRBaseClusterOnOff(device: chipDevice, endpointID: 1, queue: DispatchQueue.main) // Send the "on" command to the device onOff?.on { error in let resultString: String if let error = error { resultString = String(format: "An error occurred: 0x%02lx", error._code) } else { resultString = "On command success" } debugPrint(resultString) } } }) It's always show timeout error . Mdns: Resolve failure (src/platform/Darwin/DnssdImpl.cpp:476: CHIP Error 0x00000074: The operation has been cancelled) OperationalSessionSetup[1:0000000000000015]: operational discovery failed: src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:119: CHIP Error 0x00000032: Timeout Creating NSError from src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:119: CHIP Error 0x00000032: Timeout (context: (null)) "Failed to establish a connection with the device Optional(Error Domain=MTRErrorDomain Code=9 \"Transaction timed out.\" UserInfo={NSLocalizedDescription=Transaction timed out.})" I don't know why the same method, works in RequestHandler.swift but not in AppScheme. Any support for this issue. Thank and best regards.
1
1
773
Jun ’24