Site icon ArcTouch

How We Used Apple WatchKit + HomeKit to Control Lights

WatchKit HomeKit sketch

Since Apple’s WWDC ’14, we’ve been excited about the new tools available for developers to build entirely new experiences with the Internet of Things (IoT) — well beyond what a typical phone or tablet are capable of. I’m particularly interested in the promise of Apple WatchKit and HomeKit.

So, late last year when our executive team announced the ArcTouch Hackathon would take place during the first two business days of 2015, senior developer André Gatti and I thought it would be pretty cool to hack a way to control a home lighting system using an Apple Watch.

Of course, HomeKit devices haven’t yet hit the market (though several were announced at CES) and Apple Watch isn’t due out until later this spring. But that doesn’t mean we couldn’t start playing with our new dev toys tools.

Over the course of two days (January 5th to 6th), we hacked a way to control a Philips Hue Connected Light using Apple’s WatchKit extension in combination with HomeKit. Here’s how we did it:

STEP BY STEP: Controlling Lighting with Apple HomeKit + Apple WatchKit

Step 1: Research and planning

ArcTouch began planning for our hackathon in November, and after we were given the green light for our project in early December, we started researching a solution immediately.

Step 2: Hackathon – Two days of coding chaos

New Year came and the hackathon was underway. With only two of us on the project, we split tasks into three major activities: The watch interface design, Apple HomeKit bridge tweaking and the WatchKit + HomeKit integration.

WatchKit Watch Mock Up

Step 3: Victory!

There’s nothing better than the moment when something you thought you could make work actually does work as expected. This occurred for the first time on Tuesday afternoon — as Day 2 of our hackathon was winding down. Even better was the next day, the noon hour, when I stepped in front of a group of people gathered in our San Francisco office while a team in our Brazil office watched live on video. From a table at the front of our office, I fired up the WatchKit extension on my MacBook — and as people turned to look at our lighting display, it responded to my commands to turn it on, off, change hues and set to Deep Sea scene. Exactly as planned.

Hackathon home automation

Step 4: Post-mortem on what we learned

The two-day hackathon went by in a blur. Looking back, here’s what we learned:

Exit mobile version