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
55
votes
2 answers

HomeKit completion block in Swift: Cannot convert the expression's type 'Void' to type 'String!'

I'm playing with HomeKit, and I'm trying to add a new home. This is my code: func addHome() { homeManager.addHomeWithName("My House", completionHandler: { (error: NSError!, home: HMHome!) in if error { …
SmokeDetector
  • 751
  • 2
  • 8
  • 12
13
votes
2 answers

HomeKit - Changing Lightbulb Color Without Transition

I am making an app that uses HomeKit enabled lights for notifications. When I write a new value to the hue characteristic of a lightbulb, the color is transitioned from it's current hue to the hue written. So instead of going from it's currently…
jpcguy89
  • 217
  • 2
  • 16
13
votes
2 answers

Repeat HMTimerTrigger On multiple days (Ex: Every Monday,Wednesday.... like in iOS 10 Home app)

I have checked the iOS 10 Home app. The screenshot is captured from Home app only. Since last 2 days I have been trying to implement the HMTimerTrigger repeat functionality. My requirement is I have to repeat the Trigger on every monday,tuesday and…
SRI
  • 1,514
  • 21
  • 39
8
votes
1 answer

How can I access historical data from HomeKit sensors -- or alternatively log this data myself

I have an outside and inside temperature sensor on HomeKit. Recently I ran into the problem that I wanted to check the temperatures a couple of days ago. As far as I have been able to determine, there does not seem to be a way to get historical data…
Claude
  • 8,806
  • 4
  • 41
  • 56
8
votes
0 answers

HomeKit: "Thread left active" log in xcode console

In my app, I have added a HomeKit-enabled accessory to my home object. It's a lightbulb that I'm able to successfully turn on/off from the app. However, every time I switch it on/off I get these logs in the Xcode console: 2020-06-02…
alexisSchreier
  • 677
  • 1
  • 5
  • 21
8
votes
1 answer

Preparing data in TLV8

I'm writing a HomeKit (so perhaps Bluetooth) characteristic in TLV8 format. Apple doc says The value is an NSData object containing a set of one or more TLV8's, which are packed type-length-value items with an 8-bit type, 8-bit length, and…
huggie
  • 17,587
  • 27
  • 82
  • 139
7
votes
0 answers

How do I fetch HomeKit values for usage in iOS 14 Widgets?

I am writing a HomeKit app that successfully shows live data from my supported accessories in-app. I can read single values (HMCharacteristic.readValue) or use notifications to stay updated (HMCharacteristic.enableNotification). Now I want to…
theMomax
  • 919
  • 7
  • 8
7
votes
1 answer

Triggering HomeKit scene from the command line on macOS

For workflow automation purposes, I'm wondering if it's possible to trigger a preconfigured HomeKit scene on macOS Mojave using the command line. I'm happy with any solution, including using AppleScript to control the Home app, as long as it may be…
kettlepot
  • 10,574
  • 28
  • 71
  • 100
6
votes
0 answers

Get all Home Hubs available in HomeKit(in iOS 10)

I'm work on HomeKit App and my requirement is to get Home Hubs available in HomeKit(in iOS 10) and there respective states i.e., "connected" or "not connected". I searched in homekit FrameWork but, i didn't find any help Thank you.
datha
  • 359
  • 2
  • 14
6
votes
2 answers

HomeKit HMHome and HMRoom identifiers / extra metadata

In my application I am using HomeKit. You can add/remove HMHome and HMRoom object, but I would also like to add some metadata to them. For example in my application I want to be able to add an icon to a HMRoom and add an Array of items to it too. My…
Wim Haanstra
  • 5,918
  • 5
  • 41
  • 57
6
votes
2 answers

HomeKit throws Error 77 & 78

Every time I make a call to HomeKit on my iPod Touch 5th gen, I consistently get this error: Printing description of error: Error Domain=HMErrorDomain Code=78 "The operation couldn’t be completed. (HMErrorDomain error 78.)" This is on a call to…
Undo
  • 25,519
  • 37
  • 106
  • 129
5
votes
1 answer

HomeKit - How to update accessory isReachable value, when i come back from background to foreground?

Situation: i am developing an app, which manages HomeKit accessories. For example i do that: Accessory is power on, and i see it via app. Also in foreground mode HMAccessoryDelegate method: func accessoryDidUpdateReachability(HMAccessory) works…
n3lab
  • 51
  • 2
5
votes
2 answers

How to use Home Kit Accessory Simulator

I am new to iOS programming...Can someone guide me, how to use Home Kit Accessory Simulator and from where can I get it. I tried to setup my simulator like this but cant figure out, how to use it.. Thanks, Soumyashree
user9411690
5
votes
1 answer

swift 4 - HMCharacteristicTypeSerialNumber deprecated

I want to read information of an accessory, typed HMAccessory, such as Serial number (HMCharacteristicTypeSerialNumber), manufacturer (HMCharacteristicTypeManufacturer), model (HMCharacteristicTypeModel) but they all are deprecated in iOS11,…
quanguyen
  • 1,443
  • 3
  • 17
  • 29
5
votes
1 answer

Know Admin from HMUsers array

I have an issue that When I want to add the room to the Home incase if the user is Guest then I am getting HMErrorCodeInsufficientPrivileges error. I have a view which will display after click on the button named "Add Room", My intensin is I want to…
SRI
  • 1,514
  • 21
  • 39
1
2 3
14 15