You bought a HomeKit accessory. You open the Home app, tap Add Accessory, point your phone at the setup code. The Home app either does not recognize the code, or says “this accessory was not found”, or pretends to scan but never completes. The code is right there on the device. The accessory is plugged in and powered. Why is HomeKit not seeing it?
Two kinds of setup codes
HomeKit accessories use either an 8-digit pairing code (older HAP devices) or a Matter setup code (newer accessories using Matter over Wi-Fi or Thread). They look similar at a glance (both are usually printed on a sticker with a QR-style symbol) but they are different formats and the Home app handles them differently.
If you are trying to pair an older HAP-only device, the code is the 8-digit format (XXX-XX-XXX). The Home app will accept it through scan or manual entry.
If you are pairing a Matter device, the code is the 11- or 21-digit Matter format. The Home app accepts it through scan, manual entry, or the Matter pairing flow.
Try manual entry first if the scan fails
Camera-based QR scanning is finicky. Bad lighting, motion blur, smudged stickers, or low-resolution stickers cause more failures than the code itself. Type the 8 or 11 digits manually. There is no penalty for using manual entry and it works in almost every case where the scan does not.
For HAP codes, the format is three digits, hyphen, two digits, hyphen, three digits. For Matter codes, the format is 11 digits with no hyphen.
If the code is damaged or missing
Devices that have been moved, dropped, or stored have sometimes worn the printed code off the sticker. Several places to look for the code:
- The bottom or back of the device (most common location)
- Inside a flap or behind a removable cover
- On the device’s box or quick-start card
- In the manufacturer’s companion app, in the device’s settings page
- On a small paper card that came in the box
If you have lost all physical copies, the manufacturer’s app is your best bet. Most manufacturers store the setup code in your account and can display it inside their app for any accessory you previously paired.
If the code is intact but the Home app rejects it
The most common cause is that the accessory was already paired to another HomeKit home and never properly removed. HomeKit pairings are persistent until both sides explicitly clear them.
The fix is to factory reset the accessory. Each device has its own reset procedure. Common patterns:
- Smart plugs: hold the button for 10 to 15 seconds
- Smart bulbs: power-cycle off-on 5 to 6 times
- Light strips: hold the reset button on the controller for 10 seconds
- Sensors: remove the battery, hold the pairing button while reinserting
After reset, the device returns to its initial pairing state and the original setup code becomes valid again. Try the Home app pairing flow.
Network access during pairing
HomeKit pairing for Wi-Fi accessories requires the device and your iPhone to be on the same Wi-Fi network. If your phone is on a 5GHz network and the device only supports 2.4GHz, the discovery phase fails even though the code is valid.
Connect your phone to the 2.4GHz SSID temporarily for pairing. After pairing completes, you can move the phone back to 5GHz; the accessory will continue working.
iCloud requirements
HomeKit accessories cannot be added to a home that is not signed into iCloud and with Home enabled in iCloud settings. If your iPhone is using a non-iCloud Apple ID or has Home disabled in iCloud, the Home app silently fails to complete the pair.
Go to Settings, [your name], iCloud, scroll to Home, ensure it is on. Retry pairing.
Hub requirements
HomeKit needs a home hub (HomePod, Apple TV, iPad set as a home hub) to actually complete pairing for many accessory types. If your home does not have a hub, pairing fails at the final step with an unhelpful error.
If you do not have a HomePod or Apple TV, an iPad can serve as the hub. Go to Settings, Home, enable “Use This iPad as a Home Hub”. The iPad must remain powered and on the same Wi-Fi as your accessories.
Bluetooth bypass
If Wi-Fi based discovery fails, some HomeKit accessories support Bluetooth-based pairing as a fallback. The Home app will offer this automatically when it detects the accessory via Bluetooth. The pairing then transitions to Wi-Fi after the initial handshake.
For this to work, your iPhone’s Bluetooth must be on and the accessory must support BLE commissioning (most do).
If the manufacturer code is the wrong format
A small number of accessories shipped with HomeKit codes that did not validate against the standard format due to manufacturing errors. The accessory works fine, but the Home app’s validator rejects the code. The manufacturer usually issues a replacement code via their support channel; contact them with the device’s serial number.
When to use the manufacturer app instead
If the HomeKit pairing repeatedly fails, you can sometimes pair the device through the manufacturer’s app first, which adds it to the manufacturer’s cloud. The manufacturer’s HomeKit integration then exposes the device to your Home app indirectly. This is less ideal (it depends on the manufacturer cloud) but it gets you a working device while you figure out the direct pairing issue.
The forgotten copy of the code
For Apple Home accessories you have already added, the Home app stores the setup code internally and lets you display it from the accessory’s settings. Open the Home app, tap the accessory, scroll to the bottom of its settings, and look for “Add to Home Hub” or a similar option that surfaces the code. This is a lifesaver when the physical sticker has worn off.
Print or screenshot the code right after you first pair an accessory. Save it where future-you will look first. The full setup-recovery flow including factory reset paths is in our Bluetooth pairing guide for BLE-paired accessories that hit this issue.