跳到主要内容

Phase 0 — Screen boot and event listener

Layer: JS only

User lands on the commissioning screen with a scanned QR payload.

  1. Commissioning hook mounts → registers listener on MatterCommissioningEvent.
  2. Immediately starts fabric prep and commissioning.

iOS listener

Uses DeviceEventEmitter.addListener(MatterCommissioningEvent, …) — not NativeEventEmitter(ESPMatterModule).

Why listener first

Fabric prep can take time; native may emit terminal events while JS is still running bootstrap. The listener must be active before starting new work.

UI phases

loading → optional needs_conversionconverting / preparingcommissioning.

What could go wrong

No active home or user not logged in → hook stops in error phase (noActiveHome, authRequired).

On this page