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 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2026-03-22 14:01:44 +01:00
parent 88d805dd3a
commit dd81fbf0b7

View File

@@ -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: