PairVault

Guides

How to find a lost HomeKit or Matter setup code

Lost the pairing code for a smart home accessory? Here is where every setup code is printed, how to recover one from the box or manual, and what to do when it is genuinely gone.

By

5 min read

Every HomeKit accessory has an eight-digit setup code, usually written as XXX-XX-XXX. Matter accessories use an eleven-digit code. You scan it or type it in once, when you first pair the device, and then, in most people’s experience, never think about it again — until the day you move house, switch hubs, or reset an accessory that has started misbehaving. At that point the code is the one thing standing between you and a working device, and the sticker it was printed on is behind a wall plate or in a skip.

This guide covers where the code is printed, how to recover one you have misplaced, and what your options are when it is truly gone.

What a setup code actually is

The setup code is a shared secret. During pairing, your phone and the accessory use it to prove to each other that they are in the same room and that you are allowed to add the device. HomeKit calls it a setup code; the Matter spec calls it a manual pairing code, and pairs it with a QR code that carries the same value plus a bit of extra routing information.

Three things follow from that, and they are the source of most confusion:

  • You did not choose it. It was generated and printed when the device was manufactured. There is no “reset the code” option anywhere, in any app.
  • It does not change. Factory-resetting an accessory clears its network and pairing state, but the code underneath is the same as the day you bought it.
  • It is not stored in Apple Home in a form you can read back. Apple Home shows you accessory names, rooms and firmware versions, but it deliberately never exposes setup codes to any app, including third-party ones. So you cannot “look it up” after the fact from within Home.

Where the code is printed

In rough order of how likely it is to still exist:

1. On the accessory itself

Look for a small sticker with a QR code or a barcode, usually alongside a serial number, a model number and regulatory logos. The setup code is the XXX-XX-XXX-shaped number near it. Common spots by device type:

Accessory Usual location
Smart plug The face with the prongs, or a side panel
Bulb The collar just above the screw thread or pins
Light strip The controller pod, or the power brick
Camera The base, the back plate, or inside the battery door
Thermostat Behind the faceplate, on the wall-mount bracket
Lock Inside the battery compartment, on the interior escutcheon
Hub / bridge The underside

2. On the box

Almost every manufacturer prints the code on the retail packaging, typically on a flap or the base, next to the barcode. If you keep boxes for the warranty period, this is often the easiest copy to reach.

3. In the manual or on a setup card

Look for a dedicated sticker or a printed panel labelled “HomeKit Setup Code”, “Setup Code” or “Scan to set up”. Some accessories ship a separate wallet-sized card with nothing on it but the QR code.

How to recover a code you have misplaced

If the accessory and its packaging are no help, work through these in order.

  1. Search your photos. A lot of people photograph the code or the QR label during setup so they can scan it from the screen. Search your camera roll around the date you installed the device.
  2. Check your purchase records. The order confirmation or invoice sometimes lists it, and for a few brands the code is tied to the serial number, which is on the invoice — support can then look it up.
  3. Ask the manufacturer. Contact support with the model and serial number and ask for the HomeKit setup code. Success varies by brand, but it costs nothing to ask.
  4. Look for a companion-app export. Some ecosystems (certain Aqara, Eve and Nanoleaf devices) show the pairing code inside their own app while the accessory is still paired to them, even though Apple Home will not.

When the code is genuinely gone

If there is no readable copy anywhere, the accessory is not bricked — but adding it back to Apple Home takes a detour:

  • Factory reset the accessory, following the manufacturer’s instructions (usually a button hold, or a power-cycle sequence).
  • Pair it through the manufacturer’s own app first, if it has one. Matter accessories in particular can open a fresh commissioning window from the vendor app, which issues a new, temporary pairing code you can then use to add the device to Apple Home as well.
  • For HomeKit-only accessories with no app, a reset alone will not conjure a code — you still need the original printed one. This is the case where recovering the number from a photo or from support is the only path, and it is why keeping a copy matters.

A quick checklist

  • The code is XXX-XX-XXX (HomeKit) or eleven digits (Matter).
  • It is on the device, the box, and the manual — check all three.
  • It never changes and a reset does not affect it.
  • Apple Home will not show it to you after pairing, by design.
  • No printed copy and no app fallback means reset and re-pair, or recover the number from a photo, receipt or the manufacturer.
  • Once you have it back, write it down somewhere permanent.

Frequently asked questions

Can I pair a HomeKit accessory without the setup code?
No. The eight-digit HomeKit code (or the eleven-digit Matter code) is a shared secret that the accessory checks during pairing, so there is no way to add the device without it. If the printed code is gone, the options are to find it on the box or manual, read it from a label on the device, or factory reset and re-pair using whatever code the accessory falls back to.
Where is the HomeKit code on the device itself?
Most accessories print it on a sticker on the back or base, near the barcode and regulatory text. Plugs often carry it on the prongs side, bulbs on the collar near the thread, and some cameras only print it inside the battery compartment or on a pull-tab you may have removed at setup.
Is the HomeKit setup code the same as the Wi-Fi password or a PIN I chose?
No. It is fixed by the manufacturer and printed at the factory. You never choose it, it never changes, and resetting the accessory does not generate a new one.
Does a factory reset change the setup code?
No. A reset clears the accessory's pairing and network settings but the setup code stays the same, because it is baked into the device at manufacture. The one exception is that some Matter devices issue a fresh, temporary code each time you open a commissioning window from their own app.
I threw away the box. Is the code recoverable?
Sometimes. Check the accessory body and any manual first. If the code was only ever on the box, look for a photo in your camera roll from setup day, the original order confirmation, or contact the manufacturer with your serial number. Failing that, the device has to be reset and re-paired through the manufacturer's own app, which can mint a new code.

← All posts