Skip to content

fix: keep a Silabs firmware update going through BLE timeouts - #159

Open
kbaker827 wants to merge 1 commit into
OpenDisplay:mainfrom
kbaker827:fix/69-silabs-ota-timeouts
Open

kbaker827 wants to merge 1 commit into
OpenDisplay:mainfrom
kbaker827:fix/69-silabs-ota-timeouts

Conversation

@kbaker827

Copy link
Copy Markdown

Refs #69

Summary

From the traceback on #69:

  • Clearing the proxy GATT cache is best effort, but a slow proxy raised a bare TimeoutError and aborted the update. It is now logged and the update continues.
  • BLETimeoutError is not a BLEConnectionError, so it escaped the handler that already tolerates a failed app-mode connect and flashes through the AppLoader. It now takes that path.
  • A BLETimeoutError during the flash now reports as a failed update, not an unexpected error.

The OTA deadline still fires: asyncio.timeout raises CancelledError inside the await, so the new inner except TimeoutError cannot swallow it.

Test plan

  • Three new tests, failed before the change
  • Full suite passes. Run locally on Windows with small local stand-ins for the Unix and BlueZ modules Home Assistant needs (not part of this PR), so CI on Linux is the first clean run.
  • Not run on Solum/Silabs hardware. These are the failures in the traceback, so please confirm a real update before closing Firmware update of silabs fails on 3.0 beta 7 #69

🤖 Generated with Claude Code

Clearing the proxy GATT cache is best effort, but a proxy that was slow to answer raised a bare TimeoutError and aborted the update. A BLETimeoutError during the app-mode trigger also escaped the handler that already tolerates a failed connect and flashes through the AppLoader directly. Handle both, and report a timeout during the flash as a failed update.

Refs OpenDisplay#69

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kbaker827
kbaker827 requested a review from g4bri3lDev as a code owner November 6, 2026 16:13
@kbaker827
kbaker827 force-pushed the fix/69-silabs-ota-timeouts branch from 615a983 to 3825d19 Compare November 6, 2026 16:13
@kbaker827

Copy link
Copy Markdown
Author

CI is waiting on maintainer approval here, so I ran the workflows on my fork at 3825d19:

  • Tests: passed, on both the latest and min-ha Home Assistant, plus ruff
  • hassfest: passed
  • HACS: 8 of 10 checks passed. The two failures are fork settings (issues disabled, no topics), and the fork's unmodified main fails the same two.

This covers this branch on its own, not merged with the other open PRs, and nothing has been run on real hardware.

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.

1 participant