From dd81fbf0b75a998a1e0b68473f21e1b665b98970 Mon Sep 17 00:00:00 2001 From: MarekWo Date: Sun, 22 Mar 2026 14:01:44 +0100 Subject: [PATCH] fix(console): add min_timeout=15s to binary repeater requests req_status, req_acl, req_neighbours, req_mma use send_binary_req which calculates timeout from suggested_timeout/800. After firmware updates this can be too short, causing instant timeouts. Adding min_timeout=15 ensures we wait at least 15 seconds for a response. Co-Authored-By: Claude Opus 4.6 --- app/device_manager.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/device_manager.py b/app/device_manager.py index 8e6dae7..a1a8976 100644 --- a/app/device_manager.py +++ b/app/device_manager.py @@ -1688,10 +1688,9 @@ class DeviceManager: if not contact: return {'success': False, 'error': f"Contact not found: {name_or_key}"} try: - # Pass timeout=0 to let library use device's suggested_timeout contact_timeout = contact.get('timeout', 0) or 0 result = self.execute( - self.mc.commands.req_status_sync(contact, contact_timeout), + self.mc.commands.req_status_sync(contact, contact_timeout, min_timeout=15), timeout=120 ) if result is not None: @@ -1751,7 +1750,7 @@ class DeviceManager: try: contact_timeout = contact.get('timeout', 0) or 0 result = self.execute( - self.mc.commands.req_acl_sync(contact, contact_timeout), + self.mc.commands.req_acl_sync(contact, contact_timeout, min_timeout=15), timeout=120 ) if result is not None: @@ -1791,7 +1790,7 @@ class DeviceManager: try: contact_timeout = contact.get('timeout', 0) or 0 result = self.execute( - self.mc.commands.req_mma_sync(contact, from_secs, to_secs, contact_timeout), + self.mc.commands.req_mma_sync(contact, from_secs, to_secs, contact_timeout, min_timeout=15), timeout=120 ) if result is not None: @@ -1811,7 +1810,7 @@ class DeviceManager: try: contact_timeout = contact.get('timeout', 0) or 0 result = self.execute( - self.mc.commands.fetch_all_neighbours(contact, timeout=contact_timeout), + self.mc.commands.fetch_all_neighbours(contact, timeout=contact_timeout, min_timeout=15), timeout=120 ) if result is not None: