The ESP32-C6 is one of the easiest Espressif chips to use for a real Matter-over-Thread project because it combines Bluetooth LE, Wi-Fi and an IEEE 802.15.4 radio on one inexpensive device. That 802.15.4 radio is the important part: it allows the C6 to join a Thread mesh directly rather than using Wi-Fi as the Matter transport.
Home Assistant can then control the device locally through its Matter controller. The Thread network carries IPv6 packets between the ESP32-C6 and a Thread Border Router, while Matter defines the smart-home device model, commissioning, security and control protocol.
This guide builds a simple Matter on/off light with an ESP32-C6 using Espressif’s current Arduino Matter library, commissions it into Home Assistant over Thread, and explains the pieces that usually cause confusion: Bluetooth commissioning, Thread credentials, border routers, Home Assistant’s Matter Server, IPv6 and the difference between ESPHome-over-Thread and Matter-over-Thread.
If you are still choosing hardware, see our Best ESP32 for Matter, Thread & Zigbee comparison. The C6 remains a strong all-round development choice because it combines Wi-Fi, BLE and 802.15.4 in one SoC.
Matter, Thread and Bluetooth Are Three Different Things
The easiest way to understand the architecture is to separate the application protocol from the radio network and the commissioning transport.
Matter = smart-home application protocol
Thread = low-power IPv6 mesh transport
Bluetooth LE = commonly used for commissioning
ESP32-C6
│
├── BLE ── initial commissioning
│
└── Thread ── normal Matter traffic
│
Thread Border Router
│
Home LAN / IPv6
│
Home Assistant Matter Server
Matter can also run over Wi-Fi or Ethernet. Thread is simply one IP transport available to Matter. Likewise, a Thread device is not automatically a Matter device: Thread can carry other application protocols as well.
Home Assistant’s own documentation makes the same distinction. Its Thread integration stores and manages Thread networks, while its Matter integration provides the Matter controller.
Why ESP32-C6 Is Suitable for Matter over Thread
Espressif’s current Matter documentation lists ESP32-C6 among the SoCs with IEEE 802.15.4 hardware that can build Matter-over-Thread devices. The C6 also provides Bluetooth LE, which is useful for the normal factory-fresh Matter commissioning flow.
| Feature | ESP32-C6 relevance |
|---|---|
| IEEE 802.15.4 | Provides native Thread radio |
| Bluetooth LE | Used for CHIPoBLE commissioning |
| Wi-Fi 6 | Available for other projects; not required for a Thread endpoint |
| RISC-V CPU | Runs application and Matter stack |
| USB Serial/JTAG | Convenient programming/debugging on many C6 boards |
| Arduino Matter support | Current Arduino-ESP32 core includes Matter support |
For a dedicated battery Thread sensor, ESP32-H2 or newer H-series devices can be attractive because they omit Wi-Fi. For development, though, the C6 is convenient because one board can be used for Wi-Fi, BLE, Zigbee and Thread experiments.
What You Need
- An ESP32-C6 development board, such as ESP32-C6-DevKitC-1.
- A USB data cable.
- A current Arduino IDE installation with the Espressif ESP32 board package that includes the Matter library.
- Home Assistant with the Matter integration and Matter Server available.
- A Thread Border Router reachable from the Home Assistant LAN.
- An Android phone or iPhone running the Home Assistant Companion app for the easiest commissioning flow.
- Bluetooth enabled on the phone during commissioning.
- A working Thread network whose credentials can be shared to the phone.
You Need a Thread Border Router
The ESP32-C6 Thread endpoint cannot talk directly to ordinary Ethernet or Wi-Fi devices. A Thread Border Router forwards IPv6 packets between the low-power Thread mesh and the normal home LAN.
Home Assistant supports several border-router options. Home Assistant Yellow, Connect ZBT-1 and Connect ZBT-2 can run the OpenThread Border Router application when configured for Thread. Third-party Thread Border Routers such as compatible Apple, Google and other ecosystem devices can also be used.
The Border Router is not the Matter controller. Those are separate roles.
| Role | What it does |
|---|---|
| Thread Border Router | Routes IPv6 between Thread and the home LAN |
| Matter Controller | Commissions and controls Matter devices |
| Home Assistant Matter Server | Implements Home Assistant’s Matter controller |
| Phone | Assists BLE commissioning and Thread-credential transfer |
Prepare Home Assistant First
Home Assistant recommends its Matter Server application on Home Assistant OS as the supported path. The Matter integration connects Home Assistant to that server, which maintains Home Assistant’s Matter fabric.
Before flashing the ESP32-C6, make sure Home Assistant already has a working Thread network and Border Router.
Check the Thread Integration
Open Home Assistant’s Thread integration and confirm that a Thread network is visible. If Home Assistant itself is providing the Border Router through Yellow, Connect ZBT-1 or Connect ZBT-2, install and configure the OpenThread Border Router application first.
If several Thread networks exist—for example separate Apple, Google and Home Assistant meshes—decide which one you want new devices to join. Home Assistant can store credentials for several networks, but devices on different Thread networks do not automatically roam between them.
Make the Intended Network Preferred
Home Assistant exposes a preferred Thread network. However, Home Assistant currently notes that commissioning through the mobile apps can still use the phone’s preferred Thread credentials, so the phone must know the network you intend to use.
Sync Thread Credentials to the Phone
For a Home Assistant-created Thread network, use the Companion app to send or sync the Thread credentials to the Android phone or iPhone. This is a crucial step: during commissioning, the phone/controller needs the operational Thread dataset so it can give the ESP32-C6 the credentials required to join the mesh.
Install the ESP32 Arduino Core
In Arduino IDE, install or update the Espressif esp32 board package through Boards Manager. Matter support is part of the current Arduino-ESP32 platform; it is not a separate third-party Matter library that you install from Library Manager.
Select your actual ESP32-C6 board. For an official DevKitC board, use the matching C6 board definition if available. If you are using another C6 module or development board, use its board definition rather than copying pin choices blindly from a different model.
Use the Thread Matter Stack, Not Wi-Fi Matter
Current Arduino-ESP32 Matter support can run Matter over several transports. On ESP32-C6, calling Matter.selectNetwork(MATTER_NETWORK_THREAD) selects Thread for the Matter Network Commissioning cluster.
Espressif documents that on the C6 this replaces the root Wi-Fi Network Commissioning path with Thread. In other words, do not start a Wi-Fi connection and then assume Matter is using Thread just because the chip contains an 802.15.4 radio.
Minimal Matter-over-Thread On/Off Light
The following sketch uses the current Arduino Matter API. It creates an on/off light endpoint, selects Thread before the endpoint starts, and uses Bluetooth LE commissioning so Home Assistant can deliver the Thread dataset.
#include <Arduino.h>
#include <Matter.h>
MatterOnOffLight matterLight;
#ifdef LED_BUILTIN
const uint8_t ledPin = LED_BUILTIN;
#else
const uint8_t ledPin = 8; // Change for your board
#endif
bool setLight(bool state) {
digitalWrite(ledPin, state ? HIGH : LOW);
Serial.printf("Matter light: %s\n", state ? "ON" : "OFF");
return true;
}
void setup() {
Serial.begin(115200);
delay(1000);
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, LOW);
// Select Matter over Thread on ESP32-C6.
Matter.selectNetwork(MATTER_NETWORK_THREAD);
// Create the Matter endpoint before Matter.begin().
matterLight.begin(false);
matterLight.onChange(setLight);
// Start the Matter stack.
Matter.begin();
// Prints commissioning information and waits for the fabric/network.
matterWaitUntilReady();
// Apply current Matter state to the physical output.
matterLight.updateAccessory();
}
void loop() {
// Reboot if the controller removed the Matter fabric.
matterRestartIfNoFabric();
delay(10);
}
Change ledPin if your C6 board’s built-in LED uses another GPIO or is an addressable RGB LED rather than a conventional single GPIO LED. For the first commissioning test, an external LED plus resistor on a known safe GPIO can be easier to diagnose.
What the Sketch Does
Matter.selectNetwork(MATTER_NETWORK_THREAD)chooses Thread as the network transport.MatterOnOffLightcreates a standard Matter on/off-light endpoint.matterLight.begin(false)starts that endpoint in the OFF state.matterLight.onChange()registers the callback that controls the physical output.Matter.begin()starts the Matter stack after the endpoints exist.matterWaitUntilReady()waits for commissioning/connectivity and prints commissioning information.matterRestartIfNoFabric()handles the case where the Matter fabric has been removed.
Espressif explicitly recommends starting endpoint objects before Matter.begin(). The current Matter helper functions are intended to simplify example sketches and print useful status over Serial.
Why There Is No Thread Password in the Sketch
For a factory-fresh Matter-over-Thread accessory, the normal commissioning path uses Bluetooth LE. The controller sends the Thread operational dataset during commissioning.
Espressif’s current Arduino documentation calls this MatterCHIPoBLEThread: CHIPoBLE is enabled, there is no Thread dataset compiled into the sketch, and the hub/controller delivers the dataset.
This is preferable to hard-coding your Thread network key into an example sketch. Espressif also provides an on-network Thread mode for devices that are already attached to the mesh, but that is a different commissioning path.
Flash and Open Serial Monitor
Compile and upload the sketch to the ESP32-C6, then open Serial Monitor at 115200 baud. On an uncommissioned device, the Matter helper should display commissioning information.
Keep Serial Monitor open during the first pairing attempt. Matter commissioning involves several layers—BLE discovery, Thread credential transfer, mesh attachment, IPv6 discovery and Matter fabric commissioning—and serial logs help identify which stage failed.
Commission the ESP32-C6 in Home Assistant
Use the Home Assistant Companion app’s Matter-device onboarding flow. The exact mobile UI can change, but the process is conceptually the same:
- Start the Add Matter Device flow in the Home Assistant Companion app.
- Scan the Matter QR code or enter the setup code produced by the example/device.
- The phone discovers the ESP32-C6 over Bluetooth LE.
- Home Assistant/phone passes the selected Thread network credentials to the device.
- The ESP32-C6 joins the Thread mesh.
- The Matter controller commissions the device into Home Assistant’s Matter fabric.
- The new light entity appears in Home Assistant.
Bluetooth is mainly part of the commissioning path. Normal Matter control then travels through Thread and the Border Router to Home Assistant.
What Happens on the Network
Home Assistant
│
│ Matter over IPv6
▼
Home LAN
│
▼
Thread Border Router
│
│ 802.15.4 Thread mesh
▼
ESP32-C6 Matter device
Matter traffic remains local. Home Assistant notes that a third-party Thread Border Router only forwards encrypted traffic; it does not need to be part of the same Matter controller ecosystem that owns the device.
For example, a compatible Apple or Google device can provide Thread border routing while Home Assistant remains the Matter controller.
Thread Is IPv6, Even If Your Internet Is IPv4
Matter over Thread relies heavily on IPv6 inside the local network. You do not need an IPv6 Internet connection from your ISP, but IPv6 must work locally between Home Assistant and the Thread Border Router.
Home Assistant recommends enabling IPv6 on the Home Assistant network interface and warns that routers, VLANs and multicast optimisation features can interfere with Matter discovery.
Do Not Block Multicast and mDNS
Matter discovery uses local multicast/DNS-SD behaviour. A home network that aggressively isolates Wi-Fi clients, filters IPv6 multicast or separates Home Assistant from the Border Router across restrictive VLAN rules can commission successfully over Bluetooth and still fail when the controller tries to reach the device normally.
When troubleshooting, simplify the topology: place Home Assistant and the Thread Border Router on the same ordinary LAN, avoid client isolation, and confirm IPv6 is enabled.
ESPHome over Thread Is Not Matter over Thread
This distinction has become especially important because current ESPHome now has a native OpenThread component.
ESPHome can run its own API and OTA traffic over a Thread network on compatible 802.15.4 devices including ESP32-C6. That produces an ESPHome device using Thread as the IP transport.
It does not automatically produce a Matter endpoint.
| Configuration | Transport | Application protocol | Home Assistant integration |
|---|---|---|---|
| ESPHome + OpenThread | Thread | ESPHome native API | ESPHome |
| Arduino / ESP-Matter + Matter over Thread | Thread | Matter | Matter |
| Matter over Wi-Fi | Wi-Fi | Matter | Matter |
Choose ESPHome-over-Thread when you want ESPHome’s native components, automations and Home Assistant API. Choose Matter-over-Thread when you specifically want a standards-based Matter accessory that can be commissioned to Matter controllers.
Can the Same ESP32-C6 Use Wi-Fi and Thread Matter at the Same Time?
Do not assume Matter can expose one accessory simultaneously through both transports. Current Arduino Matter documentation states that on ESP32-C6 selecting Thread replaces the root Wi-Fi Network Commissioning cluster for the node.
The chip physically has both radios, but the Matter application’s selected network transport is a deliberate configuration choice.
Thread Border Router vs Thread Router
The terms sound similar but mean different things.
A Thread Router is a Thread node that forwards traffic inside the mesh. A Thread Border Router connects the Thread mesh to another IP network such as Ethernet or Wi-Fi LAN.
A mains-powered ESP32-C6 Thread device may participate as a router depending on its Thread configuration, but that does not make it a Border Router to the home LAN.
Commissioning Fails at Bluetooth Discovery
- Make sure Bluetooth is enabled on the phone.
- Keep the phone physically close to the ESP32-C6 for the first pairing.
- Confirm the device is still in commissioning mode.
- Check Serial Monitor for Matter startup errors.
- Factory-reset/decommission the device if it still contains an old fabric.
- Do not attempt to commission two stale copies of the same flashed device simultaneously.
Commissioning Finds the Device but Thread Join Fails
This usually points to Thread credentials or Border Router availability rather than the Matter endpoint itself.
- Confirm a working Thread Border Router is online.
- Verify Home Assistant sees the intended Thread network.
- Sync the Thread credentials to the phone again.
- Check that the phone is using the same Thread network you expect.
- If several Apple/Google/Home Assistant networks exist, verify which network is actually preferred on the phone.
- Move the C6 closer to the Border Router during initial testing.
Device Joins Thread but Home Assistant Cannot Control It
At this stage, investigate IPv6 and discovery between the Border Router and Home Assistant.
- Enable IPv6 on Home Assistant’s network interface.
- Put Home Assistant and the Border Router on the same LAN while testing.
- Disable Wi-Fi client isolation.
- Check firewall/VLAN rules for IPv6 multicast and mDNS/DNS-SD traffic.
- Avoid router settings that aggressively ‘optimise’ or suppress multicast until Matter is working.
Multiple Thread Networks Are a Common Source of Confusion
A home can contain separate Thread networks created by Home Assistant, Apple and Google. Home Assistant may discover all their Border Routers, but discovering a network is not the same as knowing its credentials.
If an ESP32-C6 joins one Thread network while Home Assistant expects another, the Matter commissioning path can become confusing even though every individual component appears operational.
During early testing, use one known Thread network and one Border Router if possible. Add complexity only after the basic C6 device commissions and remains reachable.
Factory Reset and Recommissioning
Matter commissioning information is persistent. Reflashing application firmware does not always mean the stored Matter fabric and Thread credentials disappear.
If the device has been removed incorrectly or commissioning repeatedly fails after previous experiments, decommission or factory-reset it before trying again. Espressif’s Matter API provides Matter.decommission(), and its official examples commonly map a long button hold to that operation.
A factory reset means the device must be commissioned again from scratch.
Using a Relay Instead of an LED
Once the Matter light example works, the callback can drive a relay output instead of an LED. However, use an electrically safe relay driver and keep boot-state behaviour in mind.
const uint8_t relayPin = 23;
bool setRelay(bool state) {
// Example for an active-low relay.
digitalWrite(relayPin, state ? LOW : HIGH);
return true;
}
Do not assume GPIO23 is available on every ESP32-C6 board; choose a valid exposed output for your specific board. If the relay can energise during reset, see our ESP32 Relay Boot Glitches guide.
Which Matter Endpoint Should You Use?
The current Arduino Matter library exposes several standard endpoint classes, including:
MatterOnOffLightfor a basic light.MatterDimmableLightfor brightness control.MatterOnOffPluginfor an outlet/relay-style endpoint.MatterTemperatureSensorandMatterHumiditySensorfor environmental sensors.MatterContactSensorfor door/window contacts.MatterOccupancySensorfor occupancy.MatterFanandMatterThermostatfor more complex control.MatterWindowCoveringfor blinds and shades.
Use the endpoint type that matches the physical product rather than representing every relay as a light. Matter controllers use the device type and clusters to determine how the entity should behave in the UI.
Arduino Matter vs ESP-Matter SDK
The Arduino Matter library is excellent for experiments and relatively simple accessories. Espressif’s full ESP-Matter SDK is the better route when you need deeper control over the data model, production provisioning, manufacturing data, certification or complex Matter features.
| Approach | Best fit |
|---|---|
| Arduino-ESP32 Matter | Fast prototypes and maker projects |
| ESP-Matter / ESP-IDF | Advanced devices and production development |
| ESPHome OpenThread | ESPHome-native devices over Thread, not Matter |
Espressif’s ESP-Matter SDK sits on top of the official Matter stack and provides production-oriented tooling and examples. A commercial Matter product also has certification, device-attestation and manufacturing requirements that go far beyond a development-board example.
Matter Certification Is Separate from Making a Device Work
A development-board accessory can be commissioned into your own Home Assistant instance without turning it into a certified retail product. Commercial certification is a separate process through the Connectivity Standards Alliance and includes vendor identity, testing and product requirements.
Do not copy development setup passcodes, test vendor IDs or example credentials into a product intended for sale.
Practical Recommendations
- Start with an official or well-supported ESP32-C6 board.
- Get the Home Assistant Thread network working before debugging the Matter sketch.
- Use the normal CHIPoBLE Thread commissioning flow rather than hard-coding Thread credentials for the first project.
- Keep Serial Monitor open at 115200 during commissioning.
- Use one Thread network and one Border Router while learning.
- Ensure Home Assistant has working local IPv6 even if your ISP does not provide IPv6.
- Do not confuse ESPHome OpenThread with Matter over Thread.
- Factory-reset stale test devices before repeated commissioning attempts.
- Match the Matter endpoint class to the physical device type.
- Move to ESP-Matter/ESP-IDF if the project grows beyond a simple maker accessory.
Final Thoughts
Matter over Thread can look complicated because several independent technologies are involved, but the architecture becomes much easier once the roles are separated. The ESP32-C6 provides the Thread radio, Bluetooth helps commission the device, the Thread Border Router bridges IPv6 to the home LAN, and Home Assistant’s Matter Server acts as the controller.
The most common failures are not caused by the on/off endpoint code. They happen because the phone has the wrong Thread credentials, no usable Border Router exists, IPv6/multicast traffic is filtered, or an old Matter fabric remains stored on the device.
For the current Arduino APIs and example set, see Espressif’s Arduino ESP32 Matter documentation. For Home Assistant commissioning and Thread-network setup, see the official Matter integration and Thread integration. For production development, use the ESP-Matter documentation.