From 27e0e5571e09984d168ef0ff1e140eda0317298c Mon Sep 17 00:00:00 2001 From: Filippo Scatigna Date: Thu, 8 Oct 2026 03:45:03 +0200 Subject: [PATCH 1/3] Skip the plugin list request once the server leaves it unanswered OpenRGB 1.0 in server mode accepts REQUEST_PLUGIN_LIST and never replies (#94). The hotfix in 0.3.7 recovers by waiting for the 10 s socket timeout and reconnecting, but it does so on every update(), so each update costs about 10 s. Clients that poll, such as the Home Assistant integration, hold their connection for most of the time and queue every command behind it. Remember that the request timed out and skip it on later updates of the same client. Only a timeout sets the flag: a dropped connection still retries the request on the next update. Co-Authored-By: Claude Opus 5.5 --- openrgb/orgb.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openrgb/orgb.py b/openrgb/orgb.py index ea1b4ed..9eedc64 100644 --- a/openrgb/orgb.py +++ b/openrgb/orgb.py @@ -1,4 +1,5 @@ from __future__ import annotations +import socket import struct import platform import warnings @@ -386,6 +387,7 @@ def __init__(self, address: str = "127.0.0.1", port: int = 6742, name: str = "op self.devices: list[Device] = [] self.profiles: list[utils.Profile] = [] self.plugins: list[ORGBPlugin] = [] + self.plugin_list_unanswered = False self.comms = NetworkClient( self._callback, address, port, name, protocol_version) self.address = address @@ -599,11 +601,14 @@ def update_plugins(self): ''' # OpenRGB 1.0+ doesn't respond to the plugin request when run in --server mode # so we need to do a bit of sketchy error handling for now + if self.plugin_list_unanswered: + return try: self.comms.requestPluginList() for plugin in self.plugins: plugin.update() - except utils.OpenRGBDisconnected: + except utils.OpenRGBDisconnected as e: + self.plugin_list_unanswered = isinstance(e.__cause__, socket.timeout) self.connect() def show(self, fast: bool = False, force: bool = False): From e66a3f59436d1c174043ecf6690f56a0f685973e Mon Sep 17 00:00:00 2001 From: Jack Hughes Date: Wed, 7 Oct 2026 22:47:02 -0500 Subject: [PATCH 2/3] Move plugin_list_unanswered check into update() --- openrgb/orgb.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/openrgb/orgb.py b/openrgb/orgb.py index 9eedc64..536377b 100644 --- a/openrgb/orgb.py +++ b/openrgb/orgb.py @@ -586,7 +586,7 @@ def update(self): self.comms.requestDeviceData(x) if self.comms._protocol_version >= 2: self.update_profiles() - if self.comms._protocol_version >= 4: + if self.comms._protocol_version >= 4 and not self.plugin_list_unanswered: self.update_plugins() def update_profiles(self): @@ -601,8 +601,6 @@ def update_plugins(self): ''' # OpenRGB 1.0+ doesn't respond to the plugin request when run in --server mode # so we need to do a bit of sketchy error handling for now - if self.plugin_list_unanswered: - return try: self.comms.requestPluginList() for plugin in self.plugins: From 8773ba432840b213ca924a425a10dd2442d6525e Mon Sep 17 00:00:00 2001 From: Jack Hughes Date: Wed, 7 Oct 2026 22:57:07 -0500 Subject: [PATCH 3/3] Set plugin_list_unanswered unconditionally instead of checking for timeout --- openrgb/orgb.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/openrgb/orgb.py b/openrgb/orgb.py index 536377b..25a3533 100644 --- a/openrgb/orgb.py +++ b/openrgb/orgb.py @@ -1,5 +1,4 @@ from __future__ import annotations -import socket import struct import platform import warnings @@ -605,8 +604,8 @@ def update_plugins(self): self.comms.requestPluginList() for plugin in self.plugins: plugin.update() - except utils.OpenRGBDisconnected as e: - self.plugin_list_unanswered = isinstance(e.__cause__, socket.timeout) + except utils.OpenRGBDisconnected: + self.plugin_list_unanswered = True self.connect() def show(self, fast: bool = False, force: bool = False):