Skip to content

Fix fetching via BLNETDirect in DL mode / without web interface - #50

Merged
nielstron merged 3 commits into
masterfrom
fix/direct-dl-mode
Nov 16, 2026
Merged

nielstron merged 3 commits into
masterfrom
fix/direct-dl-mode

Conversation

@nielstron

@nielstron nielstron commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Cherry-picked from #48 (by Alexander Eisele), without the fork-specific changes (uv migration, Python 3.11 requirement, pyupgrade, PyPI/README fork changes, CLAUDE.md, version bumps).

Needed #49 (now merged): the recorded DL-mode data has heat meter 1 active.

  • struct.unpack in DL/DL2 mode was missing the data argument (TypeError).
  • With use_web=False, analog/digital values from the direct connection were dropped since there were no web entries to update.
  • get_value() raised KeyError for entries without a name; get_latest() stored the string "timeout" as a frame; BLNETDirect set the process-wide default socket timeout (and only after the first connect).
  • Adds a fake TCP BL-NET replaying responses recorded from a real device in DL mode, so BLNETDirect is tested for the first time.

Each commit's tests fail with that commit's code change reverted.

@nielstron
nielstron added this pull request to stack #56 November 16, 2026 14:31
@nielstron
nielstron removed this pull request from stack #56 November 16, 2026 14:34
@nielstron
nielstron changed the base branch from fix/parser-inputs to master November 16, 2026 14:34
dereisele and others added 3 commits November 16, 2026 15:35
- get_value() raised KeyError because values fetched only via
  blnet_direct have no name; match on the id key instead
- get_latest() stored the string "timeout" as a frame, which crashed
  fetch(), and also did so when the last retry succeeded; timed out
  frames are now listed in info["timeout"] and fetch() raises
  ConnectionError if no data arrived
- BLNETDirect set the process-wide default socket timeout, and only
  after the first connection; the timeout is now set on its own sockets

Adds a fake TCP BL-NET replaying responses recorded from a real device
in DL mode, so BLNETDirect is covered by tests for the first time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nielstron
nielstron merged commit 7c6e9b4 into master Nov 16, 2026
24 checks passed
@nielstron
nielstron deleted the fix/direct-dl-mode branch November 16, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants