From 2ade5091c4a8a53b1834fd4e55debbc5a8558629 Mon Sep 17 00:00:00 2001 From: James Mackay Date: Thu, 8 Oct 2026 08:53:27 +0100 Subject: [PATCH] =?UTF-8?q?feat(const):=20persistent-connection=20timing?= =?UTF-8?q?=20constants=20=E2=80=94=20watchdog=20backoff/cap/jitter,=20Sta?= =?UTF-8?q?teStore=20TTL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom_components/nvidia_shield/const.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/custom_components/nvidia_shield/const.py b/custom_components/nvidia_shield/const.py index 666a01e..f0d7ad8 100644 --- a/custom_components/nvidia_shield/const.py +++ b/custom_components/nvidia_shield/const.py @@ -26,6 +26,14 @@ ADB_POLL_INTERVAL = 10 # seconds ADB_RETRY_INTERVAL = 300 # seconds before retrying a failed ADB connection DEFAULT_ADB_PORT = 5555 +# Persistent-connection manager timing (Phase 1, docs/MVP_PLAN.md §2): +# watchdog reconnects with exponential backoff + jitter; ADB-derived store +# fields expire (B5) instead of clinging to stale values. +ADB_RECONNECT_BACKOFF_START = 5 # seconds before the first reconnect retry +ADB_RECONNECT_BACKOFF_CAP = 300 # seconds; backoff never sleeps longer +ADB_RECONNECT_JITTER = 0.25 # ±25 % randomization against reconnect storms +STATE_STORE_TTL = 60 # ADB-sourced fields older than this are stale + DEFAULT_NAME = "Nvidia Shield" # Emotiva DAG attribute we read to get available inputs