ESP RainMaker + Matter non-Fabric (Dynamic Matter QR code)
| Technical solution | Classic + Matter |
|---|---|
| Use case | Lighting |
This example demonstrates RainMaker + Matter Non-Fabric provisioning with a Dynamic Matter commissioning QR Code. The device can be provisioned via the RainMaker phone app or with any Matter controller. Scan the dynamically generated Matter commissioning QR code to provision the device. This approach removes the need for pre-printed QR labels, enhances security, and simplifies manufacturing.
Product use case: Matter commissions and controls lights of any brand locally from a Matter controller, while the ESP RainMaker light is also provisioned to RainMaker, independently and without a factory reset, so the ESP RainMaker Home App can reach it through the cloud from anywhere and push firmware updates.
Overview
| Processor | ESP32-C3 |
|---|---|
| Connectivity | Wi-Fi + BLE |
| Vcc | 3.3V |
| IDF Version | ESP-IDF v5.x and newer |
What you can try
- Device Commissioning: Utilizes Matter's commissioning process to securely onboard the device to a network.
- Local Matter Control: Supports local Matter control of the light without relying on cloud services, ensuring responsiveness and reliability.
- Flexible Device Onboarding: Supports both Matter commissioning and RainMaker provisioning independently.
- Remote Control via Cloud: Enables remote control of the light through the ESP RainMaker cloud, allowing users to operate the device from anywhere.
- Over-The-Air (OTA) Updates: Facilitates OTA firmware updates, ensuring the device can receive enhancements and security patches seamlessly.
- ESP Insights (Optional): Supports integration with ESP Insights for advanced diagnostics and analytics, aiding in device monitoring and troubleshooting.
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
Runs on the public ESP RainMaker Classic deployment. Hosted by Espressif for evaluation. Free, with nothing to set up. Keep ESP RainMaker Classic when you sign in to the Home App.
Device Setup Instructions
1. Prerequisites
-
Hardware
1 x Linux, macOS or Windows-based computer 1 x ESP32-C3 DevKit
1 x USB cable 1 x iOS or Android mobile device
1 x Corresponding matter controller: HomePod, Nest Hub, Echo devices etc.
Software
- Apple home or Google home or Amazon Alexa application
- ESP RainMaker Home app
- Python version 3.10 or later (64-bit) is installed and available in your local environment. Python 3.9 is not supported
Knowledge
- Basic familiarity with terminal/command-line tools and commands
2. Connect your device
- Connect your device to the computer using a USB cable, then click the
Connectbutton located in the top-left corner above the terminal. - Select the right port and click
connect. - Once connected, the device is ready to be flashed.
3. Flash your device
- Click
Flash Deviceabove the terminal and choose Erase and flash. Wait for theerase_flashprocess to finish before the firmware is written. - Wait for the firmware flashing process to complete.
- The terminal will then enter an endless loop as the Matter DAC have not yet been generated and flashed to the
esp_secure_cert partition, nor has the Matter factory binary been flashed. - Click the
Disconnectbutton located above the terminal only once.
4. Download the matter-rainmaker-claim-mfg zip folder
- Click here to download the zip folder and upzip it.
- Open your terminal and
cd /to/path/matter-rainmaker-claim-mfg. - Run the Python Script by executing
python matter-rainmaker-claim-mfg.py. - Follow the terminal instructions to complete the claim and flashing process. Please select the "Matter Non-Fabric (Dynamic QR code)" option when prompted.
- Once claiming and flashing complete, leave the script running: it waits for the board to be provisioned (next step), then opens the Matter commissioning window and shows the QR code in your browser.
- The specific steps executed in the Python script will be explained in the README file.
- Please reconnect the device and click
Resetbutton to reset the device. - You should see that a QR code for ESP RainMaker will been generated on the device console log.
5. Provision the device with ESP RainMaker Home app (Part 1: ESP RainMaker Provisioning)
- Use the ESP RainMaker Home app to provision the device. Download the latest ESP RainMaker Home app here.
- Open the application and sign up/log in.
- Enable the necessary permissions required for this app to function.
- Add a device by tapping on the "plus sign" at the top right most corner of the screen.
- Your mobile device camera should be enabled. Proceed to scan the RainMaker QR code generated on the device console log (ESP Device Terminal).
- Follow the in-app instrunction to complete the provision process.
- Once provision is successfully, the device should be reflected in the app.
6. Get the dynamic Matter QR code
- Once the board is online in your account, the claim script opens the Matter commissioning window, shows the QR code in a new browser tab and prints the manual pairing code in the terminal. Keep the script running and go to the next step.
- Need the code again (script closed or window timed out)? In the zip folder run
python matter-rainmaker-claim-mfg.py --matter-qr, or use the commands in the Matter commissioning window panel under the device console. - Do not press Reset while pairing: the code changes at every boot.
7. Provision the device with Apple Home/Google Home/Amazon Alexa App (Part 2: Matter Provisioning)
- Use the Apple Home/Google Home/Amazon Alexa App to provision the device by scanning the QR code that is generated in step 6.
- Proceed to use a corresponding matter controller to commission the device.
- The commissioning window closes after a timeout. The Matter commissioning window panel under the device console shows whether it is open and, if it has closed, the command to reopen it.
- If you need to generate another dynamic QR code with a different payload or manual code, please perform a factory reset by holding the device’s boot button for 7–10 seconds. After the reset, repeat the process starting from step 6.
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
- Verify that your device is in flashing mode
- Get the latest ESP RainMaker phone application here