3

When I first heard about Homekit in 2014 when introduced by Apple I thought this was a feature only for device manufacturers who would be allow to embed the Homekit in their devices but I think I'm missing something here form the programmers point of view. Let pretend for a moment that I buy a Homekit enabled device right now, maybe a thermostat, what can I do with it (besides its default functionality of course), how can I interact with it?

Can someone explain Homekit from the programmers point of view? What will Homekit enable programmers to do, etc?

FYI- The way I understand it is that you would buy a Homekit enabled device, then download an App provided by the manufacturer to interact with it, done. What am I missing?

Thanks

fs_tigre
  • 10,650
  • 13
  • 73
  • 146
  • 5
    From a software developer's perspective, see the [HomeKit Developer Guide](https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/HomeKitDeveloperGuide/Introduction/Introduction.html) first. – Joe Jan 13 '16 at 12:38
  • 1
    "What will Homekit enable programmers to do" Build IoT thermostats? – Arc676 Jan 13 '16 at 12:40
  • 2
    "iOS-side" HomeKit does not enable the everyday developer to build a thermostat. To accomplish that you need to implement the HomeKit Accessory Protocol (HAP) on an IoT device. HAP is a closed API that requires enrollment in the Apple MFi program to access. I wrote [this](http://dev.iachieved.it/iachievedit/an-in-depth-look-at-apples-homekit/) HomeKit ecosystem overview in 2014 when HomeKit first arrived. The architecture is still valid but the implementation details have changed. – Joe Jan 13 '16 at 12:44
  • Thank you for the article, It started to make more sense. This is how I understand it now, as a programmer you will be able to create an app that describes your house layout so Siri knows what room you are talking aobut when you ask something. What I'm not sure is how your app will connect to the various devices but I'm assuming that the manufacturer and the programmer will work off the same API, in other words just by looking at Homekit's documentation you will know what options you can control in each device since the device manufacturer used the same API, correct? Am I missing somehitng? – fs_tigre Jan 13 '16 at 13:08
  • 1
    HomeKit Accessory Protocol is that "same API" that allows for an iDevice (iPhone, AppleTV) to communicate with HomeKit-enabled accessories (thermostat, light). Apple does not provide the iOS app for instantiating accessories, presumably to allow for 3rd-party innovation. Rather it provides the HomeKit iOS API for developers to create their own UI for creating accessories, which in turn can then leverage the HAP stack for actual device communication. The data model of accessories is stored in iCloud for remote access (you're driving open and want to open the garage door). I hope that helps. – Joe Jan 14 '16 at 13:32
  • Well what I didn't understand was how the programmer would know what classes where available from a certain device but it appears that you would first need to access the characteristics of the device you are working on with an array `var characteristics: [HMCharacteristic] { get }`. Here is the documentation: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/HomeKitDeveloperGuide/AccessingServicesandTheirCharacteristics/AccessingServicesandTheirCharacteristics.html#//apple_ref/doc/uid/TP40015050-CH6-SW1 Thanks a lot for your help. – fs_tigre Jan 14 '16 at 20:26

1 Answers1

3

Homekit provides both a standard for device manufacturers and an SDK for developers to interact with said devices.

Any developer can write an app which interacts with the homekit SDK that apple provides. Apple's goal was that anyone would be able to write a homekit app which would be able to interact with any and all homekit devices on the market. In order to accomplish this, apple defined a set of standard services that can be adopted by the manufacturers (things like thermostat, switch, and door lock).

At the moment, each manufacturer has been creating an app to go along with their product. In the future, this may not be necessary, but hardware has a long lead time and there weren't any homekit apps out on the market when most of the hardware was being developed.

In addition, many of the manufacturers have deviated from the standard services defined by homekit, and want to enable other abilities that are unique to their product, or have 'side channels' to access more advanced functionality that's not covered by homekit.

So if you buy a thermostat and install it and hook it up with homekit, you will be able to tell it to do some standard thermostat stuff. For instance turn the AC on, turn the heat up, etc. through any app that supports homekit thermostats, and also through Siri. Any more advanced functionality that the thermostat provides would not be available through homekit (like nest's filter change reminders, for instance).

Adam Shiemke
  • 3,734
  • 2
  • 22
  • 23