Reuse UDP sockets and increase polling timing#472
Conversation
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
This reverts commit 122edc3.
|
@RobHofmann Did this fix your issues? Would like to have this merged. I already have other things to send for PR. To avoid constant rebases, I am waiting for PRs to be merged before making new ones. I do this to keep PR to a minimum change, but if you prefer, I can start adding more and more commits to a single PR. |
|
Hey man. Haven't had the time yet to check & test this. What I can do for now is merge it to the 4.0 prerelease branch so people can test this in parallel. Let me know if thats ok. |
|
@RobHofmann Sure, merging is fine if you'd like to. I just would like a bit more agility in v4 merging, since there is still heavy development going into it, and not all of it requires a dedicated release. |
|
I tried to check if theres any options where I can give you PR Merge access to the branch, but I think it's impossible. My assumption is that it's because it's not within an GitHub Organization (theres seem to be a bit more options there with branch protections). |
|
I will merge it for now. I think it has quite some impact if I would move this repo to an org (URL changes and we need to inform HACS etc). |
|
For now lets just say I'll merge PR's to the 4.0-prerelease branch from you. Bit of a hassle, but let's try to be pragmatic here. |
|
Thanks 👍 No problem. I don't think there needs to be an org. Maybe branch protection rules would be enough, but I understand if you don't want that. |
This was exactly what I was looking for, but apparently to allow certain people (you) to push to a certain branch, you (from what I read) need to have your repo inside an organization. With personal repo's like this one, that feature does not show. |
|
Bummer. The docs say otherwise. I think the correct way is to lock the master instead of adding permissions to 4.0-pre-release. |
This PR tries to fix the reported issues with the device becoming unavailable and disconnected from Wifi (#470)
List of changes: