Repository navigation
Fall back to the web portal when a socket SET is never acknowledged - #95
Open
justinmaiuto wants to merge 1 commit into
Open
justinmaiuto wants to merge 1 commit into
justinmaiuto wants to merge 1 commit into
Conversation
The command server at 212.92.41.143:5210 has been reachable again since early October 2026, but in a half-alive state: TCP connects, the SET is written, and no set_ack ever comes back. The portal fallback from jnimmo#90 only covers a socket that cannot be opened, so in this state every command fails ("not acknowledged within 5.0s") while the portal would still have delivered it. Use the same portal fallback after an ack timeout. Portal SETs carry absolute values, so repeating a SET that did arrive is harmless. use_socket=False is unaffected: it never reaches the ack wait. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
What happens
Since early October 2026 the command server at
212.92.41.143:5210accepts TCP connections again, but it never acknowledges SETs. On 2.4.0/2.5.0:Every command fails and the unit doesn't respond, even though the web portal still delivers commands. The fallback added in #90 only applies when
_ensure_socket()fails. A socket that opens but stays silent never reaches it.Change
_set_value: after the ack times out, try_portal_set_value()before returningFalse. The same portal path, lock and session from Add web portal command fallback when the socket cannot be opened #90 are reused.use_socket=Falseis unchanged. That path returns before the ack wait, so it never reaches the portal.False. The only cost is one extra portal round trip on a command that was going to fail anyway.Tests
test_unacknowledged_set_falls_back_to_portal: the socket opens, no ack comes back, and the portal delivers. ReturnsTrue. This test fails without the change.test_unacknowledged_set_fails_when_portal_also_fails: returnsFalseand doesn't raise.test_acknowledged_set_does_not_touch_the_portaltest_set_opens_the_socket_on_demandnow stubs the portal so it stays offline.The full suite passes: 107 tests.
ruff checkandruff format --checkare clean.Field use
I've been running this as a local patch on Home Assistant 2026.10.x with hass-intesishome 2.4.0 since 11 Oct 2026. Commands that previously failed now go through via the portal, and the log shows the warning added here.
🤖 Generated with Claude Code