Skip to content

Reuse UDP connections and add Prop dump debug#471

Closed
p-monteiro wants to merge 6 commits into
RobHofmann:4.0-pre-releasefrom
p-monteiro:separate-props
Closed

Reuse UDP connections and add Prop dump debug#471
p-monteiro wants to merge 6 commits into
RobHofmann:4.0-pre-releasefrom
p-monteiro:separate-props

Conversation

@p-monteiro

@p-monteiro p-monteiro commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

This PR tries to fix the reported issues with the device becoming unavailable and disconnected from Wifi (#470)
Additionally, it provides a new method in the device API to dump all prop values from the device that were found in a FW disassembly.

List of changes:

  • Bump default pool interval from 30 to 60 seconds. Existing configs must be manually reconfigured or re-added.
  • Generalize gree_get_status() to work with other enums of props
  • Add AllProp enum and gather_prop_dump() method to debug device props. Should be useful to find the props of new device features to implement. Not yet surfaced in HA.
  • 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 6 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
@p-monteiro

Copy link
Copy Markdown
Contributor Author

This was bad naming on my part. I will close this and reopen it with only the relevant bits and proper branch name.

@p-monteiro p-monteiro closed this Jun 29, 2026
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