Questions tagged [homekit]

HomeKit is a new framework for communicating with and controlling connected devices in a user’s home using iOS Apps. Apps can enable users to discover devices in their home and configure them, or you can create actions to control those devices. Users can group actions together and trigger them using Siri.

Home Kit provides seamless integration between accessories that support Apple's Home Automation Protocol and iOS devices, allowing for new advances in home automation. By promoting a common protocol for home automation devices and making a public API available for configuring and communicating with those devices, Home Kit makes possible a marketplace where the app a user controls their home with doesn’t have to be created by the vendor who made their home automation accessories, and where home automation accessories from multiple vendors can all be integrated into a single coherent whole without those vendors having to coordinate directly with each other.

Home Kit allows third-party apps to perform three major functions:

Discover accessories and add them to a persistent, cross-device home configuration database.
Display, edit, and act upon the data in the home configuration database. Communicate with configured accessories and services to get them to perform actions, such as turning on the lights in the living room.
The home configuration database is not only available to third-party apps, it’s also available to Siri. This allows users to give commands like, “Siri, turn on the lights in the living room.” If a user creates a home configuration with logical groupings of accessories, services, and commands, Siri can make it very easy to accomplish sophisticated operations with voice control.

For more info: see the documentation here

216 questions
5
votes
1 answer

How to avoid or bypass setup code alert (popup) in HomeKit?

I am working on HomeKit enable application. In that while adding accessory to home, I want to avoid setup code popup. By default apple provides its own alert in which we have to enter setup code while adding accessory with Home. Edit : More info To…
Hiren
  • 101
  • 4
5
votes
2 answers

HomeKit - Error Domain=NSCocoaErrorDomain Code=4097

I would like to create HMHome with HMHomeManager and addHomeWithName. manager.addHomeWithName("Casa", completionHandler: { (home:HMHome!, error:NSError!) in if error != nil { NSLog("Failed adding home, Error:\(error)") } else { …
KameHouse
  • 61
  • 1
  • 4
4
votes
0 answers

Instantiating HMHomeManager causes a background thread error

I have a fresh iOS app / project; all I've done is import the HomeKit framework. When I instantiate HMHomeManager: var homeManager = HMHomeManager() Xcode yells at me: Main Thread Checker: UI API called on a background thread: -[UIApplication…
Dan
  • 4,197
  • 6
  • 34
  • 52
4
votes
1 answer

Display power usage as temperature with Node-Red in Apple HomeKit

I would like to display the power usage in HomeKit. Unfortunately there is no category to do that in HomeKit. That's why I had the idea to display this not as a power usage but as temperature in HomeKit. The idea is to control HomeKit scenes with…
4
votes
4 answers

How do I await multiple functions with completionHandlers?

I'm currently working on a bridge for HomeKit for React-Native and I have to read HomeKit values to return for my Javascript code. To read the latest value of a characteristic we must use readValueWithCompletionHandler where the value isn't ready…
4
votes
1 answer

Can a HomeKit device directly see states/changes of other devices?

For some time already I am developing my own “virtual” HomeKit accessories - there is a software bridge with couple of accessories which is implemented in Scala (using a Java HomeKit accessory library). With this, I am for example able to turn…
4
votes
1 answer

Turn Philips HUE Lights on When the Ambient Light is Below X

I have Philips HUE Lights throughout my office and I've been trying to find a way to get them to turn on when it gets below a set lux / ambient light luminous so we don't have to wait till some realises its way too dark and turn them all on. It…
Trent
  • 429
  • 1
  • 5
  • 19
4
votes
3 answers

HomeKit: Check for permission

I have an iOS application using HomeKit and I need to check if application can access HomeKit Store. As I noticed, homeManagerDidUpdateHomes will be called anyway. How do I check for HomeKit store permission?
Nikita Zernov
  • 5,465
  • 6
  • 39
  • 70
4
votes
5 answers

Where did the Homekit Accessory Simulator go in Xcode 6 beta 6?

In Xcode 6 Beta 5 and previous betas, I could open a HomeKit Accessory Simulator by right-clicking on the icon in the dock and choosing Open Developer Tool > HomeKit Accessory Simulator. In Xcode 6 beta 6, this seems to be no longer the case: How…
Undo
  • 25,519
  • 37
  • 106
  • 129
3
votes
0 answers

How to Add and Set up accessory using HMAccessoryPayLoad

I want to know how to use apple docs func addAndSetupAccessories(with payload: HMAccessorySetupPayload, completionHandler completion: @escaping ([HMAccessory]?, Error?) -> Void) I want to use this func because I need to pair HomeKit…
Pavan Kumar
  • 63
  • 1
  • 6
3
votes
2 answers

How does HomeKit find nearby devices?

First of all I am sorry if this is not the most appropriate forum to post this question. I looked at AskDifferent which seems not technical enough for this and I looked at Super User which seems too technical for it. Hence why I am asking it here as…
levidhuyvetter
  • 401
  • 5
  • 16
3
votes
0 answers

Open HomeKits X-HM:// URL sheme

I'm creating an App with the HomeKit SDK and I'd like to add an uncertified accessory programmatically. My goal is to build a user-friendly and convenient pairing process without having a printed QR-code or NFC ready accessory. I'd like to hand on…
user3191334
  • 1,148
  • 3
  • 15
  • 33
3
votes
1 answer

Know when view presented using addAndSetupAccessoriesWithCompletionHandler

From iOS 10 onwards apple have introduced the addAndSetupAccessoriesWithCompletionHandler method to add the HMAccessories to the home. In this method ^(NSError *error block is executing when we successfully add/cancel the accessory setup. But my…
SRI
  • 1,514
  • 21
  • 39
3
votes
2 answers

Push Notification due to an event in a HomeKit accessory

I want my app to be aware of events triggered by HomeKit accessories (HMAccessory). Such that, when my HomeKit powered motion detector detects motion, my app gets to know about this somehow (preferably via a push notification). The preinstalled Home…
Syzygy
  • 123
  • 2
  • 9
3
votes
0 answers

Saving and Restoring Lights (HMCharacteristics)

I'm using lights connected with HomeKit for notifications. I'd like to take the current state (color, brightness, on/off) of each light being used, and restore the lights to that state after the notification is finished. However it doesn't seem to…
jpcguy89
  • 217
  • 2
  • 16
1
2
3
14 15