Skip to content

Type menu change leaves a device configured=False, invisible to iter('self') — both #58 guards are structurally blind #62

Description

@simons-plugins

Live evidence from jarvis (2026-06-12, the energy-plug rig device, found while validating #60/#61).

What happened

The rig device node-matter Energy Plug (node 0x20, created as matterRelay) had its type changed to matterDimmer via Indigo's Edit Device Type menu. Result, captured by instrumented reconciles:

EXPERIMENT energy plug: type='matterDimmer' enabled=True configured=False
EXPERIMENT iter('self') returned 19 devices    # 20 exist — the flipped one is absent
EXPERIMENT index keys: [...]                   # (32, 1) missing
  • Indigo mutates deviceTypeId immediately on menu selection — an unsaved (or guard-rejected) dialog still leaves the type changed, with configured=False.
  • Unconfigured devices are excluded from iter("self") and never receive deviceStartComm.
  • Therefore both Endpoint-mapping hardening: actuator duplicates, unknown-device fallback, type-edit guard #58 guards are blind: validateDeviceConfigUi only fires on a completed save, and the deviceStartComm backstop never runs.
  • Downstream: the index loses the node, _unique_name can't see the name (it iterates the same collection), reconcile attempts a re-create, and Indigo rejects it server-side with NameNotUniqueError — previously a raw traceback every reconcile.

Shipped mitigation (PR #61)

_create_one now converts the collision into an actionable warning naming the device and the remedy (delete + reload; reconcile recreates it correctly).

Possibly worth doing later

  • rebuild_index could additionally scan the unfiltered indigo.devices collection for our pluginId to spot configured=False strays and warn about them directly at reconcile (rather than waiting for the create collision).
  • Docs: note in TESTING.md / README troubleshooting that the Type menu must never be used on Matter devices, and that the failure signature is this warning.

The remedy for the rig device itself: delete node-matter Energy Plug in the Indigo UI and reload the plugin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions