Skip to content

Identify action for regular devices (Zigbee Identify cluster) #40

@tashda

Description

@tashda

Summary

Shellbee has no way to ask a regular Zigbee device to physically blink/beep so the user can confirm "yes, this is the device I just paired." The Zigbee Identify cluster is the standard mechanism for this (the Z2M frontend exposes it per device), and it's a hard prerequisite for the pairing wizard (#20) — without it, step 3 ("identify the device you just added") can't ship.

The existing touchlinkIdentify topic is unrelated — that's the Touchlink-specific reset/identify protocol used in Features/Bridge/TouchlinkView.swift for light bulbs, not the per-device Identify cluster.

Worse, the current code actively hides the Identify property on devices that expose it:

  • Shared/Components/DeviceExtras.swift:21alwaysHiddenPrefixes: ["identify"]
  • Shared/GenericExposeCard/GenericExposeCard.swift:81 — filters identify* exposes
  • Shared/LightControl/LightControlContext.swift:172 — skips identify

So even when a device advertises Identify, the user can't trigger it.

Proposed change

Add a first-class Identify action accessible per device (long-press menu on the device card, plus an explicit button on the device detail screen).

Behavior

  • Sends <device-friendly-name>/set with {"identify": {"effect": "blink"}} (Z2M's accepted form for the Identify cluster — verify against z2m-windfront before shipping).
  • Track in-progress state on AppStore (identifyInProgress: Set<String> keyed by IEEE) so the button shows a spinner / disabled state for ~3s.
  • Show a toast / inline confirmation: "Asked Light Bulb to identify."
  • Skip the action (or grey it out) for devices that don't expose Identify in their definition.exposes.
  • Don't un-hide the raw identify* property in the generic expose card — it stays diagnostic noise, but the dedicated action surfaces the capability cleanly.

Why long-press + detail-screen button

  • Long-press on a device tile = quick "blink that one" without leaving the list. Useful in the pairing wizard and during normal "which one is which" debugging.
  • Detail-screen button = discoverable for users who don't think to long-press.

Acceptance criteria

  • Tapping Identify on a device that supports the Identify cluster makes the physical device blink/beep.
  • In-progress state is reflected in the UI (spinner / disabled button) until the call resolves or a short timeout passes.
  • Devices that don't expose Identify don't show the action.
  • Pairing wizard ([Feature]: Pairing wizard for adding new devices #20) can call into this same code path.
  • No regression in the Touchlink Identify flow.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions