Skip to content

Reuse UDP sockets and increase polling timing#472

Open
p-monteiro wants to merge 8 commits into
RobHofmann:4.0-pre-releasefrom
p-monteiro:connection-fixes
Open

Reuse UDP sockets and increase polling timing#472
p-monteiro wants to merge 8 commits into
RobHofmann:4.0-pre-releasefrom
p-monteiro:connection-fixes

Conversation

@p-monteiro

Copy link
Copy Markdown
Contributor

This PR tries to fix the reported issues with the device becoming unavailable and disconnected from Wifi (#470)

List of changes:

  • Bump default pool interval from 30 to 60 seconds. Existing configs must be manually reconfigured or re-added.
  • Reuse a single asyncio_dgram client instead of reconnecting per request
  • Remove unnecessary recv task creation and await recv() directly
  • Reset the transport after timeouts or communication errors
  • Serialize requests with a lock to avoid concurrent send/recv races

p-monteiro and others added 8 commits June 26, 2026 16:27
This allows to debug the value of all unknown props found in firmware disassembly. Might be useful to debug and find new features.

TODO: Hook it to HA
Try to fix connection problems by reusing connection streams with the device while possible:
- Reuse a single asyncio_dgram client instead of reconnecting per request
- Remove unnecessary recv task creation and await recv() directly
- Reset the transport after timeouts or communication errors
- Serialize requests with a lock to avoid concurrent send/recv races
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