Hey Siri, control my HomeKit-enabled coffee maker!
Apple has opened up the HomeKit Accessory Protocol Specification to all developers! What's the "HomeKit Accessory Protocol Specification"? It's the means by which connected home accessories communicate with Apple devices via HomeKit. In other words, you can make your own HomeKit-enabled accessories and control them with Siri and the Home app for iOS.
Up until now, only companies who intended to distribute their HomeKit-enabled accessories commercially could make use of Apple's HomeKit Accessory Protocol Specification. Developers had to request licensing through Apple's MFi program and go through reportedly rigorous testing to claim the coveted Works with Apple HomeKit badge. Now if you want to create HomeKit-enabled accessories for non-commercial purposes (if you're a hobbyist or consider yourself a "Maker," for example) you can! Here's how you get the ball rolling.
First thing's first: You've got to be a registered developer. You need a registered developer account in order to access the HomeKit Accessory Protocol (referred to as HAP here on out). Assuming you're a registered developer, here are the first steps to take:
- Head to Apple's developer page for the HAP Specification: https://developer.apple.com//homekit/specification/
- When prompted, sign in with your Apple ID and password.
- Click Continue to license agreement.
- Read the limited license agreement and check the box to confirm you've read it.
- Click I Agree.
- Click Download to download the HAP Specification.
The HAP Specification is a 256-page PDF filled with all the necessary information about creating HomeKit-enabled accessories that can communicate with Apple devices. There are certain requirements your accessory must meet in order to make use of the HomeKit framework, but they aren't as rigorous as the requirements for commercial HomeKit accessories.
- Apple says commercial accessories have to have the Apple Authentication Coprocessor, must adhere to the Bluetooth core specification or obtain Wi-Fi Alliance certification, and must be certified under Apple's MFi Program.
- Non-commercial HomeKit accessories won't be able to tout the Works with Apple HomeKit badge. Anyone adding a non-commercial HomeKit accessory to their HomeKit setup will see a prompt indicating it's not certified to work with HomeKit, but the prompt is nothing more than an alert — you'll still be able to add the accessory.
Once you've read through the HAP Spec and know you can create a device that adheres to all the necessary specifications, it's time to get crackin'!
Creating your own HomeKit-enabled accessory
HomeKit protocol spec is now open to all devs! Can build a smart device using Arduino and control it via HomeKit without getting MFI license— Victor Ilyukevich (@yas375) June 7, 2017
As Victor Ilyukevich pointed out over on Twitter, that means buying or setting up an accessory using an Arduino and controlling it with Apple HomeKit.
You could, for example, get the Arduino MKR1000 which offers the following features:
- SAMD21 Cortex-M0+ 32bit low power ARM MCU
- WINC1500 low power 2.4GHz IEEE® 802.11 b/g/n Wi-Fi
- ECC508 CryptoAuthentication
You could use it to create any number of HomeKit-enabled accessories so long as they follow the HAP Spec. Once you've got your idea figured out, your limited license agreement signed, your HAP Spec read, and your Arduino (or other communication accessory) set up, you'll just want to make sure your device is adhering to the HAP spec and can communicate with Apple HomeKit. Everything you need to know can be found in the HAP Specification, which you can download by following along with these steps.
What do you think? Excited that anyone can create their own HomeKit-enabled accessories and control them using the Home app for iOS and Siri? I know I am! I'm going to attempt to dive into the HAP Specification and see if I can't get my own HomeKit-enabled accessory rollin' (dog treat delivery device, anyone?). I'll be taking notes along the way so be sure to check back in the future for a potential in-depth how to!