From 5948c833bd2049c77e9fb4e3f8f98f36b9e06606 Mon Sep 17 00:00:00 2001 From: Brian Harrison Date: Thu, 2 Apr 2026 14:22:00 -0400 Subject: [PATCH] client: lower Tran search floor from 1000 to 44 in channel block extraction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The channel block is in frame C data (cfg[44:1071]) not deep in a hypothetical frame D section. The offset-1000 assumption was wrong — searching from 44 lets us find it while unit string validation still prevents false positives. Co-Authored-By: Claude Sonnet 4.6 --- minimateplus/client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/minimateplus/client.py b/minimateplus/client.py index 56c8a86..233f56e 100644 --- a/minimateplus/client.py +++ b/minimateplus/client.py @@ -702,8 +702,8 @@ def _decode_compliance_config_into(data: bytes, info: DeviceInfo) -> None: # Validated by checking unit strings "in.\0" at label-14 and "/s\0\0" at label-6. # "Tran2" at a later position won't match because its surrounding bytes differ. try: - tran_pos = data.find(b"Tran", 1000) - log.warning("compliance_config: 'Tran' search from 1000 → pos=%d cfg_len=%d", tran_pos, len(data)) + tran_pos = data.find(b"Tran", 44) + log.warning("compliance_config: 'Tran' search from 44 → pos=%d cfg_len=%d", tran_pos, len(data)) if tran_pos >= 0: pre = data[max(0, tran_pos - 30) : tran_pos + 8] log.warning(