Skip to main content
main-content
Top

About this book

Learn the HomeKit platform structure and how it supports devices—existing and planned—and get a thorough grounding on new and useful apps that deliver a new generation of home automation in a secure and innovative environment. Let your imagination run wild as you design compatible devices with unlimited capabilities.

Learn Apple HomeKit on iOS shows you how to move to secure, home automation projects that integrate with your digital world automatically—after you set them up as described in the book. Having your calendar and appointments control your lights, locks, thermostat, and other home devices is the heart of home automation. In homes and small offices, you can banish notes taped to switches and controls that say, "Do not turn off this switch" or "Leave the thermostat alone." The book gets you up to speed on HomeKit, and it also answers some of the pesky questions, such as "What happens when the power goes out?"

Along the way there are tips and suggestions for app developers, hardware manufacturers, interior designers, and real estate professionals. For programmers, there's an entire chapter (plus sections in other chapters) dedicated to the core coding issues. For non-programmers, this book is the perfect resource mastering the amazing potential of Apple HomeKit.

What You Will Learn:

For device developers, understanding the structure of HomeKit—homes, rooms, and accessories—enables you to build devices that are easily managed by a single, simple source and interface. For DIY home networking users, gain a thorough knowledge of how they can adapt HomeKit to their existing spaces.

For programmers, there's an entire chapter plus sections in other chapters dedicated to the core coding issues you'll need to learn. For non-programmers, this book is your perfect resource for easily getting your mind around the amazing potential of Apple HomeKit.

Author Jesse Feiler develops, consults, and writes about Apple technologies with an emphasis on mobile and location-based apps.

Who This Book Is For:

Device developers, DIY home networking users, programmers, and those interested in integrating their iOS devices with their IoT devices.

Table of Contents

Chapter 1. Bringing Home Automation Home

Abstract
If you're used to buying a product like an iPhone, taking it home, turning it on, and getting to work, HomeKit will be a very different experience. HomeKit is an integration technology that brings together your home, HomeKit-enabled accessories (door locks, light bulbs, sensors, and the like), and your own ideas about how your home should be automated.
Jesse Feiler

Chapter 2. Exploring the HomeKit World

Abstract
Starting with iOS 10 (released in the fall of 2016), HomeKit has an app for users to use to control their HomeKit world. Over the years since its announcement in 2014, Apple has been building out the HomeKit infrastructure—the application program interfaces (APIs) that developers use, the terminology that is shared among HomeKit developers and users (homes, rooms, scenes, and appliances), the third-party HomeKit-enabled products, and, most important, the ideas of how HomeKit can fit into the real world with real people in it. These various tracks (API, third-party products, terminology, and awareness) come together in the Home app.
Jesse Feiler

Chapter 3. Adding Scenes—The Practical Part of HomeKit

Abstract
You can use HomeKit to manage all the rooms and accessories by turning them on and off or adjusting their settings. You can also use HomeKit to check the settings of accessories, such as whether they're on or off as well as their brightness and color (in the case of bulbs).
Jesse Feiler

Chapter 4. Exploring Your Development Environment

Abstract
For almost every HomeKit developer, getting started means setting up a new environment and, in some cases, a new way of working. If you're a developer who's familiar with iOS, you're well on your way to HomeKit . . . as long as your familiarity includes the most recent version or two of iOS.
Jesse Feiler

Chapter 5. Working with HomeKit Accessories

Abstract
In the previous chapters you've seen the basis of HomeKit and its architecture. Now it's time to put it to work, and that involves accessories—your lights, door openers and lock mechanisms, sensors, and the whole range of HomeKit-enabled devices that you find in ever-increasing numbers in local stores and on the Internet. (It's like the old saw: if a tree falls in the forest and no one is around to hear it, does it make a sound?) Without accessories to be controlled, HomeKit does nothing. This chapter shows you how to put HomeKit to work.
Jesse Feiler

Chapter 6. Exploring the HomeKit World as a Developer, Designer, or Device Manufacturer

Abstract
So far in this book, you’ve looked at HomeKit from the outside, observing the things you see and control with HomeKit. Now it’s time to look at HomeKit from the inside out by starting with the code. The code is what interacts with the home itself and its components, including third-party devices. Everything talks to code, and in many ways, the code itself if the best description of the HomeKit components. This chapter gives you an overview of the HomeKit framework with its objects and functionality.
Jesse Feiler

Chapter 7. Dive into Accessories

Abstract
When it comes to home automation, the basics are homes, rooms, and devices. This applies to any home automation environment. Generally, you can adjust the settings on the devices (most often bulbs for many people), and you can combine devices with their settings into scenes. A timing mechanism lets you turn scenes on and off.
Jesse Feiler

Chapter 8. Imaginative Opportunities: Events, Triggers, and Actions

Abstract
Your homes and rooms with their accessories along with the accessory characteristics and services are a great way of organizing your HomeKit assets, but on their own, they really don’t do anything. They just sit there waiting for you to activate them with Siri commands or with . . . something else? (Note that Siri is an interface that can work with your HomeKit assets, but its use is more of a user interface concern than development, so it’s not covered in this book.)
Jesse Feiler

Chapter 9. Working with iCloud and Users with HomeKit

Abstract
HomeKit works with the networks it finds. The most basic level of communication is between an accessory and your HomeKit hub which typically is either an Apple TV or an iPad—or both. For short distances (such as within your home, HomeKit uses a WiFi network or Bluetooth Low Energy (Bluetooth LE).
Jesse Feiler
Additional information