Guides

Lost your Matter pairing code? Where it still is

Matter is kinder than HomeKit about lost codes, as long as the device is still paired somewhere. Here is where the code lives, in the order worth checking.

Checked against the makers' own pages on 3 November 2026.

What you are looking for

The QR code
Printed with the Matter mark on the device, its packaging or the quick start card. It holds the pairing code plus the vendor, product and a discriminator. If you only have its text, the decoder turns it back into a label.
The manual pairing code
11 digits, usually printed as XXXX-XXX-XXXX beside the QR code; 21 digits on devices whose commissioning flow is not the standard one, where a step on the device or in the maker's app comes first. Apple Home, Google Home, Alexa and SmartThings all accept it typed in.
One rule to know
The printed code works for the first setup and again after a factory reset. Once the device is in one ecosystem, the next ecosystem gets a temporary code from the first app instead. Amazon, Kwikset, Govee, Yale and SmartThings all state this.

Where to look, in order

The app that already has the device
If the device is in Apple Home, Google Home, Alexa or SmartThings, that app can issue a fresh code for another ecosystem: Apple Home has Turn On Pairing Mode in the accessory's settings, Google Home has Linked Matter apps and services, Alexa has Other Assistants and Apps with a 15 minute code, and SmartThings has Share with other services. The code it shows is not the printed one and is not needed again.
The maker's app
Two different things live in makers' apps, and it matters which you have. The permanent code, the one on the label, is shown by TP-Link Tapo and Kasa (Device Settings, Device Info, Matter Setup Code), Leviton (Device Settings in My Leviton), Govee (Device Settings), SONOFF eWeLink (Device Settings) and Eve (stored at the Matter upgrade). Two makers document their own flows: SwitchBot has you copy the code from the app under Matter Setup, reset the Hub 2, then paste that code into the Home app, so it serves the first pairing; Nanoleaf's Device Settings, Connections makes a code for the first Matter ecosystem of a device the Nanoleaf app has, and a device already commissioned elsewhere must be shared from that ecosystem. The ecosystem apps above make temporary share codes for adding one more ecosystem. Only a permanent code works after a factory reset.
Your iPhone's Matter list
Settings, General, Matter Accessories lists every Matter device paired from that iPhone and which apps it is connected to. It does not show the code, but it tells you which app has the device and can share it onward. Apple says the setup code is kept in iCloud Keychain for those devices.
The device and the box
TP-Link puts the code on the side of a plug or the neck of a bulb and a backup sticker in the box. Philips Hue prints it on the bulb and in the installation guide. IKEA prints it on the yellow cover in the packaging. Yale keeps its Yale Access QR code on the side of the battery compartment, and does not say where the Matter label sits. The brand pages have the rest.

Before you reset anything

A reset brings back the need for the printed code
After a factory reset the device is new again, and only its permanent code will pair it: the printed one, a saved copy of it, or, for a device whose maker replaced the label code at a firmware upgrade, the replacement code the maker's app gave you, as Eve does. If the sticker is gone and no app shows the code, do not reset: the device would be locked out of every ecosystem.
Save the code from the app first
While the device is still in a maker's app, save the permanent code it shows as an image or a note. TP-Link suggests the phone's photo album; Eve offers AirDrop, email, Files or print. Check that it is a permanent code, not a share code: the digits on the label, or the replacement code a maker's upgrade generated. Eve says a device that fails to re-add after a reset needs the Matter setup code provided at the start of the upgrade, and a temporary share code will not bring it back. Only then reset.
Makers that say a lost code is final
Aqara's forum moderators said a lost Matter code cannot be restored, even by support with the serial number. Treat that as the worst case and avoid the reset.

So it does not happen again

Scan the Matter label before the device goes in. SmartHomeQR keeps the QR code, the 11 digit code, the maker and the model, by home and room, so a reset two years from now starts with the code in hand instead of a support ticket.

Questions

Can I rebuild the QR code from the 11 digit code?
No. The 11 digit code leaves out the vendor, the product and most of the discriminator. Type the 11 digits instead; every Home app accepts them.
The code is on the label but the app says it is invalid
Three usual causes: the device is already paired to another ecosystem, so this code no longer applies; the first pairing window closed (TP-Link, Govee, Kwikset and Sengled quote about 15 minutes), so power the device off and on; or a digit was misread, which the check digit in the decoder will catch. See Matter code not working.
Does a Matter code expire?
The printed code does not. A code shown by an app to share the device does, within minutes: 15 for Alexa, about 3 for Google Home per TP-Link, and Apple Home waits 5 minutes between codes.

Next time, have the code on your phone

SmartHomeQR scans each label once and keeps every HomeKit, Matter and Z Wave code, by home and room, on iPhone, iPad, Apple Watch and Android. Offline, no account. Free for 5 devices.