Matter Smart Button
| Technical solution | Matter |
|---|---|
| Use case | Appliances & Controls |
A Matter generic switch: a stateless button that reports single, double and long presses. Pair it with a Matter app and use each press to trigger a scene or automation across your home.
Product use case: A stateless Matter button: single, double and long presses are reported separately, each running a scene in any Matter app.
Overview
| Supported chips | ESP32-C3 |
|---|---|
| Connectivity | Wi-Fi, BLE for pairing |
| Framework | ESP-Matter |
| Controller | Any Matter ecosystem app |
You will need
- ESP32-C3 DevKit
- USB data cable
- Chrome or Edge (Web Serial)
- Phone with a Matter app (Apple Home, Google Home, Alexa or SmartThings) on 2.4 GHz Wi-Fi
What you can try
- Press events: Single, double and long press are reported separately.
- Automations: Use each press to run a scene in your Matter app.
- Any Matter app: Pair with Apple Home, Google Home, Alexa or SmartThings.
- BOOT is the button: The board's BOOT button acts as the smart button.
Try it on a real board
Get an official DevKit from Espressif or one of its distributors, then flash this example straight from this page. Shop Espressif DevKits
Flash and try it
Flash the prebuilt firmware from the browser, then pair the board with any Matter app on your phone. Works in Chrome and Edge over USB.
- Connect: Plug in the board over USB and pick its serial port.
- Flash: Write the prebuilt Matter firmware straight from the browser.
- Reset: Reboot the board. It opens its Matter pairing window.
- Pair: Scan the Matter QR code with Apple Home, Google Home, Alexa or SmartThings.
Detailed instructions
1. Connect and flash
- Connect the board over USB, click
Connectabove the terminal and pick its port. - Click
Flash Device, choose Erase and flash and wait for it to finish. The flasher checks the chip against the supported list.
2. Reset the board
- Click
Reset. - Wait for
Commissioning window openedin the console. The board is now ready to pair.
3. Pair with a Matter app
- Keep your phone on the 2.4 GHz Wi-Fi network the board should join.
- In Apple Home, Google Home, Amazon Alexa, SmartThings, choose Add device → Matter.
- Scan the QR code in the Pair with Matter panel, or enter the code
34970112332. - This is a development build, so the app warns that the device is not certified. Tap Add anyway.
4. Try it
- In Apple Home (or any app that supports Matter buttons), open the button and add an automation for Single Press, Double Press or Long Press, e.g. turn a light on.
- Press
BOOTonce, twice, or hold it for 5 seconds to run each automation. - Each event is also logged in the console.
5. Pair again
- To start over, remove the device from the app, then hold the
BOOTbutton for about 10 seconds to factory reset it. - Every board uses the same test pairing code, so keep only one unpaired board powered while pairing.
Pair with Matter
| Manual pairing code | 3497-011-2332 |
|---|---|
| QR | MT:Y.K9042C00KA0648G00 |
| Works with | Apple Home, Google Home, Amazon Alexa, SmartThings |
Development build with a test certificate. Tap Add anyway when the app asks. Setup PIN 20202021, discriminator 3840.
Having trouble connecting?
- Ensure your device is properly connected via USB
- Check if the correct drivers are installed
- Try a different USB port or cable
- Pairing fails? Confirm the phone has Bluetooth on and is close to the board
- Wi-Fi builds join 2.4 GHz networks only