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

Posts under HomeKit tag

52 Posts
Sort by:

Post

Replies

Boosts

Views

Activity

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?
2
0
123
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
131
2w
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
176
3w
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
305
3d
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
198
3w
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.
6
12
516
Apr ’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
233
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
295
Mar ’24
EAWiFiUnconfiguredAccessoryBrowser configureAccessory not showing UI modal up
Hello everyone, I'm trying to configure my WAC device trough an App. This App finds the device without problems using startSearchingForUnconfiguredAccessoriesMatchingPredicate but when I try to use configureAccessory method I get only 3 messages in Xcode and nothing happens. These messages are: 2024-03-14 12:55:56.261969+0000 App[1394:380785] ### WAC: -[EAWiFiUnconfiguredAccessoryBrowserManager configureAccessory:withConfigurationUIOnViewController:]_block_invoke_3:368 Other Region SKU 2024-03-14 12:55:56.266191+0000 App[1394:374248] ### WAC: _notificationCleanup:42 responseFlags: 3 ### WAC: _notificationCleanup:43 responseFlags: 3 For me they don't look like an Error but would be nice if someone could give me some advice on this, I didn't find nothing about it. Thanks in advance!
1
0
377
Mar ’24
HomeKit Accessory and services name(s) ?
Hi all, We are developing a Smart Home / IoT product that integrates into HomeKit. The integration is mostly done and interation with the product works great. We have only one problem: naming inside the home app. Each time we add one of our devices to the home app, the services names are changed to the name of the accessory. Here is an example with the homekit tree: Accessory Service: Accessory Information Characteristrics: name = "my accessory" Service: Light Bulb Characteristics: name = "light 1" Service: Light Bulb Characteristics: name = "light 2" Service: Light Bulb Characteristics: name = "light 3" Service: Light Bulb Characteristics: name = "light 4" Service: Temperature Sensor Characteristics: name = "temperature sensor 1" When adding this device with 4 lights and 1 temperature sensor to homekit, all the services inside the app gets renamed "my accessory". They do not keep their name. It is especially strange since HomeKit knows about the names of the services since if I modify the name of the first light, HomeKit will suggest (in the background on the text input in gray) to rename it "light 1". I know that my characteristics declaration are correct because I verified it with the HomeKit Accessory Tester. What I can do so that the services offered by my device are not renamed to the name of the accessory itself ? Thanks in advance.
0
0
433
Mar ’24
Commission Matter accessory added via Apple Home
Greetings! I've added a Matter accessory via the Apple Home app. In my app, I'm attempting to commission this device and add it to my fabric. However, when I try to open the commissioning window, I receive an error stating, MTRBaseDevice doesn't support openCommissioningWindowWithDiscriminator over XPC. It appears that opening a commissioning window via an XPC connection is not yet supported. Is there another method to commission the device? Can I retrieve the setup payload from the MTRBaseDevice object or the shared MTRDeviceController? Here's the simplified version of my code: var home: HMHome // HMHome received via HMHomeManager var accessory: HMAccessory = home.accessory[0] // my Matter-supported accessory let deviceController = MTRDeviceController.sharedController( withID: home.matterControllerID as NSCopying, xpcConnect: home.matterControllerXPCConnectBlock ) let device = MTRBaseDevice( nodeID: accessory.matterNodeID as NSNumber, controller: deviceController ) device.openCommissioningWindow( withDiscriminator: 0, duration: 900, queue: .main) { payload, error in if let payload { // payload not received } else if let error { // I'm getting here "Error Domain=MTRErrorDomain Code=6 "(null)"" // and "MTRBaseDevice doesn't support openCommissioningWindowWithDiscriminator over XPC" logged in the console print(error) }
0
0
493
Feb ’24
HomeKit App Update
Dear All, we have an old app that supports HomeKit. As company we exited the MFi program. Now we need to update the app to do some minor changes (XCode update, recompilation and Font changes). No firmware changes. Does it need to go through the certification process? Thanks
0
0
337
Feb ’24
Homespan Garage Door Opener
Home App is not picking up current state, for example if I open the door I push button() to open and set current->setVal(2), the app shows it as opening, but if my door has obstruction the gate controller will stop and reverse automatically and the current->setVal(1) will be triggered as the gate closes by the sensor. Mean wile home app will say its still opening even though the current state has been set and notified as closed.
0
0
403
Feb ’24