Skip to content

Route plugin replies to the plugin that sent the request - #100

Open
TRusselo wants to merge 1 commit into
jath03:masterfrom
TRusselo:claude/project-thread-gu6xpu
Open

TRusselo wants to merge 1 commit into
jath03:masterfrom
TRusselo:claude/project-thread-gu6xpu

Conversation

@TRusselo

@TRusselo TRusselo commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Tristyn · project thread

Fixes #99.

OpenRGB 1.0 and 1.1 send every plugin-specific reply with device id 0 (SendReply_PluginSpecific hard-codes it). The client matched replies with plugin.id == device, so connecting raised StopIteration whenever the Effects plugin wasn't plugin 0. This is what breaks Home Assistant's OpenRGB integration (home-assistant/core#182151).

  • ORGBPlugin.send_packet remembers which plugin sent a request. Plugin requests hold the lock until their reply is read, so only one can be outstanding.
  • NetworkClient.read uses that id for the PLUGIN_SPECIFIC reply instead of the header's device id.
  • OpenRGBClient._callback ignores a plugin reply that matches no known plugin instead of raising.

No API change. It also stays correct if OpenRGB starts echoing the plugin id in its replies.

Tested against a real OpenRGB 1.1 server (Linux) with plugins 0 Plasma Integration, 1 E1.31 Receiver, 2 Effects. The Effects reply arrives labelled device 0.

  • v0.3.8 fails to connect with StopIteration.
  • This branch connects, finds all 7 devices, and routes the Effects plugin's effect-list reply to it. A second update() also succeeds.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UJMbRWp4UiTgmjc2tsKpjU

OpenRGB 1.x sends every plugin-specific reply with device id 0, so the
reply was matched to plugin 0 instead of the plugin that asked. When the
Effects plugin was not the first plugin, connecting raised StopIteration.
Remember the id of the plugin with a pending request and use it for the
reply, and ignore replies that match no known plugin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UJMbRWp4UiTgmjc2tsKpjU
@TRusselo TRusselo changed the title Route plugin replies to the plugin that sent the request (#99) Route plugin replies to the plugin that sent the request Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connecting to OpenRGB 1.x with plugins loaded raises StopIteration

2 participants