Repository navigation
Recover Waveshare transport after acquisition failures - #43
Merged
Merged
Conversation
Hrabovszki1023
marked this pull request as ready for review
July 27, 2026 10:50
# Conflicts: # src/pylontech_console/framing/console.py # src/pylontech_console/transport/tcp.py # tests/integration/test_console_exchange.py # tests/unit/transport/test_tcp.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
$$-framed console response that lacks the required finalCommand completed successfullyline inside the exchange boundaryProduction failures addressed
Permanent disconnect
A healthy five-module US2000/US2000C installation entered a permanent
degradedstate after one exchange failure. The Waveshare port remained reachable, MQTT and HTTP remained healthy, but all subsequent polling failed until the container was restarted. Code inspection confirmed that the transport disconnected after the first failure and no path connected it again.Framed but incomplete response on six modules
The first Issue #42 branch was deployed to the real installation after expansion to six modules / 90 cells. Inventory, all module details, all cells and MQTT remained valid, but
pwrsysfailed almost continuously with occasional successful intervals:The response contained the
$$end marker, so the transport considered it successful and did not activate recovery. Validation now occurs inside the exchange callback; a missing success line invalidates the connection and the next regular command reconnects using the existing bounded backoff.Verification
PYTHONPATH=src python -m pytest— 214 passedpython -m ruff check .— passedpython -m mypy src tests— passedgit diff --check— passedCloses #42