This document describes how Open Wemo’s Matter integration works. For user setup (Google Home commissioning, Developer Console, troubleshooting), see GOOGLE-HOME.md. For HTTP endpoints, see API.md.
Open Wemo runs an in-process Matter aggregator bridge that exposes saved WeMo on/off devices to controllers such as:
- Google Home
- Apple Home
- Amazon Alexa
Control stays on the LAN. There is no Belkin cloud and no Google Smart Home Action cloud fulfillment for device control.
WeMo devices (SOAP / UPnP)
▲
│
DeviceService ←→ REST API / PWA
│
│ events (deviceAdded, stateChanged, …)
▼
MatterBridge (ServerNode + AggregatorEndpoint)
│
│ Matter over IP (UDP 5540 + mDNS)
▼
Google Home / Apple Home / Alexa
| Piece | Role |
|---|---|
DeviceService |
Single boundary for discovery, persistence, and on/off control |
IntegrationManager |
Starts/stops Matter from the matter_enabled setting |
MatterBridge |
Owns the Matter ServerNode, aggregator, and bridged endpoints |
| PWA Settings → Google Home & Matter | Enable, QR pairing, identity, per-device kind overrides |
packages/bridge/src/
├── device-service/ # Shared device API for REST + Matter
├── integrations/
│ ├── index.ts # IntegrationManager
│ └── matter/
│ ├── bridge.ts # ServerNode lifecycle + sync
│ ├── mapper.ts # WeMo type → Matter kind
│ ├── kinds.ts # Optional per-device kind overrides
│ ├── storage.ts # Credentials + storage paths
│ └── commissioning.ts # QR / standalone /matter page HTML
└── server/routes/matter.ts # REST API
Matter device type IDs determine which controls Google Home (and other controllers) show. Open Wemo maps WeMo types automatically:
| WeMo type | Matter kind | Matter device | Controller UI |
|---|---|---|---|
| Switch, Mini, Insight | plug |
On/Off Plug-in Unit (0x010A) |
Outlet / switch with on/off |
| LightSwitch, Bulb, Dimmer | light |
On/Off Light (0x0100) |
Light with on/off |
| Unknown | plug (default) |
On/Off Plug-in Unit | On/off rather than dropping the device |
| Motion | skip |
— | Not exposed |
Never use Matter’s On/Off Light Switch (0x0103) for WeMo actuators. In Google Home that type is a controller (binding), not an on/off device—so the app shows the device with no controls.
- Per-device user override (if set in Settings → Advanced, or when type is Unknown)
- Else automatic map from
device.deviceType - Unknown without override →
plug
Overrides are stored in SQLite settings as JSON (matter_device_kinds). Changing a kind recreates the Matter endpoint (device type is fixed at endpoint creation). Controllers may need remove + re-pair (or hub resync) to pick up the new type.
- Enable —
matter_enabled=true;MatterBridge.start()createsServerNode, aggregator, and one bridged endpoint per exposable device. - Commission — Controllers scan the QR / enter the setup code. Identity uses stored passcode, discriminator, vendor ID, and product ID.
- Control (controller → WeMo) — Matter
onOffchanges callDeviceService.setOn/setOffwith source"matter". - Control (PWA/API → controller) —
stateChangedevents update the Matter endpoint (feedback loop ignored for"matter"source). - Reset — Running bridge uses
ServerNode.erase(); offline path clears fabric storage and may defer locked files on Windows. - Identity change — Updates VID/PID, factory-resets fabrics, restarts if enabled.
| Path | Contents |
|---|---|
%APPDATA%/open-wemo/matter/ (Windows) |
Matter root (path.root) |
credentials.json |
Passcode, discriminator, uniqueId, vendorId, productId |
open-wemo/storage.db |
matter.js SQLite fabric / node state |
The default matter.js file storage driver is not used: under Bun on Windows, write-tmp + rename intermittently fails with EPERM, which crashes the Matter environment so it cannot restart in-process. SQLite is selected via StorageService.configuredDriver.
- Uncertified VID/PID pairs must be registered in the Google Home Developer Console. See GOOGLE-HOME.md.
- A Nest Matter hub (Nest Mini, Nest Audio, Nest Hub, etc. on the same Wi‑Fi) is required for Matter control in the Google ecosystem.
- The Google Home device settings page (Name / Room / Remove) never shows an on/off toggle. Controls are on the home/room tile (tap or touch-and-hold).
- After changing a device’s Matter kind, remove the device from Google Home and re-pair if the tile still has no controls.
- GOOGLE-HOME.md — User setup and troubleshooting
- API.md —
/api/integrations/matter/* - ARCHITECTURE.md — Bridge module layout