With the camera on your iOS device, scan the eight-digit HomeKit code, or QR code on the accessory or accessory documentation. If you have an iPhone 7 or later with iOS 11 and see on your accessory, hold your iPhone near the accessory to add it.