-
-
Notifications
You must be signed in to change notification settings - Fork 2
en Matter Thread
SelenaCore can pair and control Matter devices via the official
python-matter-server
sidecar container. Matter is the universal IoT protocol; Thread is one of
its physical transports (the other being WiFi). From SelenaCore's point of
view both look identical — a commissioned device shows up as an ordinary
Device row with protocol='matter' and is controlled through the same
voice intents (device.on, device.off, device.lock, …) as Tuya, Gree,
or Zigbee devices.
| Component | Why | When |
|---|---|---|
matter-server container |
WebSocket bridge to the Matter fabric | Always (any Matter device) |
| Bluetooth radio | BLE commissioning of new devices | First-time pairing |
OpenThread Border Router (otbr) |
Bridge between WiFi LAN and Thread mesh | Only for native Thread devices |
| nRF52840 USB dongle | Required by otbr
|
Only for native Thread devices |
Most consumer Matter bulbs, plugs, and switches sold today are
Matter-over-WiFi — they speak Matter directly over your WiFi network
and need only matter-server, not OTBR. The Thread border router is only
required for low-power battery devices that use Thread's mesh radio
(typically advertised as "Thread" or "Matter over Thread").
Both companion containers are gated by docker compose profiles so users
without Matter devices don't pay the BLE / multicast cost.
# WiFi-only Matter (most users):
docker compose --profile matter up -d
# WiFi + Thread (battery devices, requires nRF52840 dongle on /dev/ttyACM0):
docker compose --profile matter --profile thread up -dmatter-server exposes its WebSocket on ws://localhost:5580/ws. The
URL is configurable via MATTER_SERVER_URL in .env.
Open device-control settings → Providers tab → find Matter / Thread
→ click Install. This runs pip install python-matter-server[client]
inside the core container and registers the driver class. After install
the Matter / Thread tab becomes the recommended way to pair devices.
- Open device-control settings → Matter / Thread tab.
- Read the device's QR code or 11-digit setup code from its label /
packaging. Matter QR codes start with
MT:. - Paste it into Setup code, give the device a friendly name, choose the Entity type (light / switch / outlet / lock / thermostat / sensor) and click Pair device.
- Watch the spinner — Matter commissioning takes 10-30 seconds. The first commissioning may take longer (up to 60 seconds) because BLE discovery + WiFi/Thread provisioning happen back-to-back.
- On success the device appears in the Paired Matter devices list and immediately works through the Devices tab + voice commands.
If pairing fails:
- Setup code rejected — re-read the QR / re-type the manual code.
-
matter-server connect failed— check that the matter-server container is running:docker compose --profile matter ps. - Timeout after 60s — the device is too far from the hub or its BLE radio is asleep. Power-cycle the device and try again.
| Entity type | Clusters | Logical state keys |
|---|---|---|
light |
OnOff, Level Control, Color Control |
on, brightness, colour_temp
|
switch / outlet
|
OnOff | on |
lock / door_lock
|
Door Lock | locked |
thermostat |
Thermostat |
temperature, target_temp, hvac_mode
|
sensor |
Boolean State + others | contact |
The full mapping table lives in CLUSTER_MAP at the top of
system_modules/device_control/drivers/matter.py.
Adding a new cluster is one entry in that table plus, if the cluster
needs a custom command (like Door Lock), a branch in
MatterDriver._dispatch_logical_write.
Matter devices use the same English-only intent system as everything
else (see module-bus-protocol.md). When a
Matter device is commissioned, the PatternGenerator automatically
creates English regex patterns from its name_en (or name) and
entity_type:
-
light/switch/outlet→device.on+device.off -
lock/door_lock→device.lock+device.unlock -
thermostat/air_conditioner→device.set_temperature+device.on+device.off
For non-English speech, no localised patterns are generated — the LLM tier (Tier 3) classifies any-language input and returns an English intent name, which then matches the auto-generated patterns above.
In the Matter / Thread tab, click Remove next to the device.
This calls the remove_node RPC on matter-server, which both
decommissions the node from the fabric and forgets its credentials, and
deletes the matching Device row from the SelenaCore registry.
-
pip installofpython-matter-server[client]fails on ARM: ensure the host haspython3-devand a recent OpenSSL — Matter pulls incryptographywhich compiles native code on platforms without prebuilt wheels. - Devices appear in the list but don't respond to commands: check the
matter-server container logs (
docker logs selena-matter-server) for attribute subscription errors. The most common cause is the device's endpoint number not being1— setmeta.matter.endpointon the Device row to the correct value. - Thread devices never join: confirm that
otbrhas formed a Thread network. The OTBR web UI is onhttp://<host>:8080.
🤖 This wiki is auto-synced from docs/ in the main repo. Hand-edits on the wiki UI get overwritten on the next push. Open a PR against the main repo instead.
MIT License · Sponsor · Ko-fi
SelenaCore
🇬🇧 English
Getting started
Architecture
Voice & translation
Hardware integration
Development
- Modules overview
- Module development
- System module development
- Module API guide
- Module bus protocol
- Widget development
- User manager / auth
Reference
🇺🇦 Українська
Початок
Архітектура
Голос і переклад
Інтеграція заліза
Розробка
- Розробка модулів
- Розробка системних модулів
- Module API
- Module bus
- Widget development
- User manager / auth
Довідник