-
-
Notifications
You must be signed in to change notification settings - Fork 29k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid concurrent radio operations with powerview hubs #114399
Conversation
fixes #73900 These devices tend to crash if there are concurrent radio operations. PARALLEL_UPDATES was set to 1 to try to avoid this problem, but it turned out not to be enough
Hey there @kingy444, @trullock, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Is this the crashing bug fix? |
That's the hope |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must have missed this one in the previous PR's
Trying to read up on the asyncio.lock method - will this queue the calls of block them completely? |
Co-authored-by: kingy444 <toddlesking4@hotmail.com>
It will only allow one of the calls to happen at a time so they line up waiting for previous calls to finish. If nothing is in progress it will run right away |
As far as I'm aware the Hub will return an API call even if the radio is still doing something, I can't really see where it waits for the radio? (Kotlin Engineer not Python - also know little about the HA code base) |
Co-authored-by: kingy444 <toddlesking4@hotmail.com>
Pretty fair point and probably a big contributor to the issue some users see (there are plenty who don't experience the issue) The only time the API "waits" that I have seen is when you force a position refresh. So with that in mind, maybe this will do nothing, but it shouldn't hurt to try it out either... It should at the very least prevent a HA automation sending a move command to every shade concurrently. (Personally my hub can handle this, but others have advised this can contribute to a lockup) |
Proposed change
These devices tend to crash if there are concurrent radio operations. PARALLEL_UPDATES was set to 1 to try to avoid this problem, but it turned out not to be enough
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: