This course is available as part of the Professional subscription. To learn more click here

Smart Lighting with HomeKit in watchOS

Jan 19 2021 · Video Course (17 mins) · Advanced

Learn to use HomeKit in watchOS to control light bulbs in your home. HomeKit is versatile, so most of what you learn here will apply to any type of smart device.


  • Swift 5, iOS 14, Xcode 12

Smart Lighting with HomeKit in watchOS


2:56 Free

HomeKit allows your apps to configure, monitor and control a synchronized central repository of smart home accessories with Apple devices.


HMHomeManager provides access to all the HMRooms you'll need, encapsulated in HMHomes, by way of its delegate.




HMAccessory is how HomeKit models a physical device, and HMService is a collection of related things you can do with that device.


On watchOS, you can either tap to interact with SwiftUI sliders, or use the Digital Crown. Bulb Buddy uses a slider for hue, saturation, and brightness.


Check an HMCharacteristic's metadata format to ensure you're working with the right kind of values. Throttle sending those values using Combine, if necessary.


Who is this for?

This course is designed to introduce working with HomeKit in a targeted, practical way.

To get the most out of it, you'll want to be experienced with Swift, SwiftUI, and Combine. Some familiarity with watchOS will be useful, but you should be able to follow along even if you've never developed for that platform.

HomeKit works similarly across iOS and tvOS as well, so you don't even need to be interested in watchOS development for this course to be useful!

Covered concepts

  • HomeKit
  • HMHomeManager
  • HMRoom
  • HMAccessory
  • HMService
  • HMCharacteristic
  • watchOS
  • SwiftUI Slider
  • Combine