Communicate with, configure, and control home automation accessories using HomeKit.

Posts under HomeKit tag

39 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

There was a problem with HCA TCL029 companion 2.4.3 in iOS 18.1
Hi all. I'm developing a homekit accessory, and I'm currently doing mfi certification. The developed product is smart door lock and supports homekey. Use below tools iPhone 13 , XR , 11 HomeKit Certification Assistant 6.4.0 HomeKit Accessory Tester 9.3.0 HomeKit Companion 2.4.3 I recently updated my iPhone 11 to iOS 18.1 and if I proceed with TCL0029 of HCA, there is a problem. Companion has no response to "SELECT step-up AID". (Unified Access Air Protocol Specification R1.1.pdf) The companion outputs the following message. "Step-up Encountered Error" There is no problem with iOS 17.x. Products that have already been certified are experiencing the same symptoms. There is no problem with using homekey in real life, only problem with companion.
0
0
93
1w
How to use HomeKit Accessory Diagnostics Function
I have some questions about the ADK6.3 Diagnostic function: If HAP_DIAGNOSTICS_MANUFACTURER is not enabled when compiling ADK, after adding the device through Home, the collecting log function cannot be found in the device settings. What is the reason? How to solve it? If HAP_DIAGNOSTICS_MANUFACTURER is enabled during compilation, the vendor URL needs to be added when transmitting the diagnostic log. How is this vendor URL defined? How to add it to diagnosticsURLParameters? How can I use the Home App in iOS device to test diagnostic functions before obtaining certification for HomeKit accessories?
0
0
96
1w
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
120
1w
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
151
6d
Can an app be seen as a trigger device on Homekit?
Suppose I want to create a dummy switch for HomeKit using an app. I run the app for the first time, the app registers itself as a dummy switch and all accessories see the app as an OFF switch. The following day, I run the app again and turn the dummy switch ON. All accessories that were monitoring the status of that switch, adjusted themselves accordingly, run their automations and so on. Can an app do that in iOS, macOS, iPadOS, watchOS, etc.? If so, can you point me in the right direction?
1
0
200
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
299
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
565
3w
Home Automation on Sensor and Time
Hi, I wanted to start the central heating if the temperature is below a certain level, I am home and the time is in a range. I created an automation but it didn't fire. I think it's because the sensor condition is "Temperature Drops Below" not "Temperature Is Below". In other words because the temperature was already below the level at the time the time window opened, the automation didn't fire. Does that sound correct? If so is it possible to do what I want which is to turn on the heating in the morning if it is cold?
0
0
216
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
388
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
879
1w
How to display the "MANUFACTURER" UI in the Home app accessory details
I found that some HomeKit accessories have an "MANUFACTURER" UI interface on the details page in the Home app (as shown in the red box in the accessory image). I developed my own HomeKit accessory and also developed a HomeKit accessory app, but my accessory does not have an "MANUFACTURER" UI interface on the details page in the Home app. What should I do to make my accessory have an "MANUFACTURER" UI interface on the accessory details page in the Home app?
1
1
458
Jun ’24
Get time it took to complete HMCharacteristic.writeValue()
I'm working on an app that uses HomeKit-enabled accessories such as wall plugs to control a photographic enlarger in a darkroom. This requires precise timing when toggling the power state of the plug. For example, the timer in my app might be set to 5 seconds, so I turn on the plug using writeValue() on the plugs power state characteristic, wait 5 seconds, then turn it off again. I want to be able to measure if the plug actually responded to the command and if there was any delay in the plug actually turning on/off so I can display a warning to the user if network latency resulted in the plug being on for longer than the set time. Does writeValue() (in my case, the async/await version) only return when the plug has been turned on, or does it return as soon as the command has been sent, regardless of if it has been received/acted on? Is there a way I can (a) quickly verify that the plug has been turned on/off, and (b) measure how long it took for the plug to act on the request, that is, the time elapsed between when writeValue() is called and when the plug actually updates to the corresponding value?
0
0
454
Jun ’24
Bricked com.apple.homekit.config CloudKit container
How did the issue (probably) occur? The issue appeared in January 2024 after setting up a new Apple TV 4K (tvOS 16.X and updated to latest tvOS after setup) or a new Apple Watch Ultra 2 (watchOS 10.X and updated after setup). Both devices were set up using my personal iCloud and both were set up to use HomeKit. I suspect the issue is related to the creation of a new Home that was subsequently shared to a family member (see below). How did I notice the issue? From the week that followed, I noticed that my iPhone 15 Pro Max tends to get really hot in standby and that the battery drops significantly in the space of a couple standby hours. (Worst case I’ve experienced is about ~80% drop in 4 hours standby) Apple Watch also has huge drops in battery life. Again, to give some perspective: I wear my AW for sleep tracking, sometimes AW will drop ~5% throughout the night, sometimes ~60% (and turn off if it was charged below 60%, making me lose my sleep tracking). My iPad Pro occasionally loses ~30-50% charge over night in standby. I went to the Battery section of the Settings app on my iPhone and iPad and could notice that about 50-75% of the time (over 24h that is), Home Accessories is running in the background. I could not confirm this on Apple Watch as the battery section of Settings does not show per app usage, however clear drops in battery percentage are noticeable from the graph. What's the issue? Seeing the issue arise on three of my four portable Apple devices, I decided to go check on my MacBook Pro M1 Max in Activity Monitor if the same behaviour was to be seen. I quickly realised that the Home Daemon (homed) is permanently running in background at (unusual) high usage. It is the top entry in CPU usage and Uptime. Going into the Console app I can see that the homed daemon on macOS is throwing 3x-5x batches of the same 5 error messages each second. The errors are the following: In the same Console app, connecting to my iPhone and my iPad, I can see the exact same errors occurring at approximately the same rate. What is the issue in technical terms? My CloudKit HomeKit config (com.apple.homekit.config) container is bricked and returns an internal server error The homed/cloudd daemons do not have a backoff policy and retry fetching the CloudKit database instantly on failure. This leads to an infinite loop of network requests going out and draining my battery on all devices massively. How did I try to solve the issue? All these measures were unsuccessful: Restarting all devices All devices are on the latest version Deleting the Home app where possible Turning off Home, Keychain and iCloud Drive in iCloud settings Signing out of iCloud and signing in again Using the HomeKit Reset mobileconfig profile where possible (http://appldnld.apple.com/iOSProfiles/HomeKitReset.mobileconfig) Use the previously mentioned reset profile in combination with a HomeKit Architecture downgrade (http://appldnld.apple.com/iOSProfiles/KeepLegacyHome.mobileconfig) On macOS, delete ~/Library/HomeKit Sending sysdiags using the Feedback Assistant (FB13529370, still open) Manually revoking all (pending and accepted) home invitations and deleting all homes from the Home app Removing all Apple TVs and HomePods from my iCloud account Reseting and repairing Apple Watch Disabled Advanced Data Protection on iCloud Logging out of all my devices’ iCloud, use the reset profile, wait 20min, login to iCloud, the issue reappears in the console (while no other devices are logged in) Changing Apple ID password and choose to log out all devices, log in again into a single device, use the reset profile, wait 20min, and the issue reappears in the console To be absolutely sure it is an iCloud issue and not a local misconfiguration (that could be solved by resetting all my devices), I took an older iPhone 12 Pro and set it up as a new device with no apps/account/data, just a blank installation of iOS. As one would expect, the issue is not present and the Console app does not show any errors. As soon as I log into my iCloud account, the Home daemon homed throws the same 5 errors over and over and the battery draining issue magically appears. This confirms my theory that it is indeed an iCloud issue on the server-side and not a client-side issue. Reseting my devices would not help fix the issue as demonstrated by a blank iOS installation on a separate iPhone 12 Pro getting the same error just by logging into my iCloud account. I’ve had an Apple Support case for over five months, it has been (unsuccessfully) escalated twice to engineering. While many basic troubleshooting steps have been taken, nothing helped. Also, while the Apple Support agent is really trying their best to help me, they understand the symptoms of the problem but not the root cause which I tried explaining multiple times. Essentially we’re sticking to the Apple Support instructions they have, and doing basic diagnostics and battery troubleshooting even though I technically understand and can explain the issue to a CloudKit engineer. We even proceeded to do a fresh install of macOS on a separate volume and took diagnostics before and after login in with my Apple ID. They were able to confirm that there is indeed a massive battery drain issue related to my account. The case is still open but is currently leading nowhere, I'm just told to keep my devices updated... How Apple can fix the issue: Investigating the internal server error and fixing the record(s) or the CoreData entity that is throwing the problem Implementing a client-side backoff policy for internal server errors coming from iCloud. Quite trivially by reseting my com.apple.homekit.config container Also worth mentioning: I don’t use a VPN or any Proxy I’m fine with losing all my HomeKit-related data on my iCloud account. At this point I just want the issue to disappear and to have useable battery life on all my devices. I’m giving my consent to the immediate and irrevocable deletion of all my past and present HomeKit-related data.
3
0
852
Jun ’24
WWDC24: Hands-free unlock w/ HomeKit
Hey there! I'm thrilled about the latest from WWDC24. I'm particularly keen on a feature announced for the HomeKit ecosystem called "Hands-free unlock". I'm eager to learn more about how this feature operates and how I can integrate it into my locks and access control systems. Could anyone please provide more details on how it works and how to implement it? P.S - I wasn't able to find any information about this in the IOS 18 Developer release notes.
1
0
485
Jun ’24
HomepodOS Beta Updates - Cannot Access.
Hello all, I have purchased 4 Homepod minis which update fine to public releases, I am currently on 17.4. I was testing with Apple and a patch is in the works so I wanted to test the beta software to see if it fixed my broken functionality within my homepods. The error message is "Loading failed, couldn't communicate with the helper application. The process was probably suspended before it could launch properly" from within the home application on my iPhone. I can update my other Apple devices to beta software either dev releases or public betas no problem. however, with the homepods, it just is not working. I have removed 1 of the 4 homepods hard reset it and set it up again etc to no avail. I phoned Apple support there solution was to try a different network or give it a shot on here. I will try a different network however I do not have another Apple device which can establish a new accessory to my home i.e. another iPhone or an iPad. Are there any known workarounds? I have searched previously for a solution but all I got were results relating to Xcode and people-building applications. not related specifically to the home pod or homepodOS Sorry if this has been posted in the wrong section of these forums. Thank you all for the help. Antonio.
8
13
1.3k
Jul ’24
Airport utility does not see certified homekit devices (WAC)
I have AirPort Extreme connected via eth switch to my MacBook And I have certified homekit device that broadcasting Apple IE as specified in the WAC Requirement document. the Airport utility is not able to see my WAC device. What I am missing? In the WAC2 document, in the test scenario, the Airpot utility should see the homekit devices (WAC) BTW: I can see the WAC devices with my iPhone as "SET UP New Device..."
1
0
433
Apr ’24
Is it possible to put a service on a Homekit accessory behind a subscription?
I have a smart camera device that can be added as an accessory to a homeKit. I want to implement a subset of functionalities of the smart camera behind a paid subscription or a paywall. Anyone aware if this has been done before? i.e. conditionally exposing services on a Homekit accessory as a paid feature? So far neither have I seen any such examples and also nowhere in the apple docs does it say that you can't. So looking for any information regarding this. The questions are Does apple support paid services in Homekit accessories? If not, does it prevent people from implementing customized solutions?
0
0
466
Mar ’24