Skip to content
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

Implement request concurrency limits #193

Merged
merged 4 commits into from
Apr 17, 2022

Conversation

puddly
Copy link
Contributor

@puddly puddly commented Apr 12, 2022

This implementation is mostly copied from zigpy-znp.

8 seems to be the limit that keeps BUSY statuses out of logs during ZHA startup when all ZHA semaphores are removed.

I've also added a random (up to one second) delay between the two request retries, hopefully to break up groups of failing requests that were sent concurrently.

@MattWestb
Copy link

If i have understanding de(F)CONZ is they in there host system using ques and shuddering sending for not blocking the NCP so i think its very needed for this coordinator.

@codecov-commenter
Copy link

Codecov Report

Merging #193 (36af4a8) into dev (5fa4e2b) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev     #193      +/-   ##
==========================================
+ Coverage   96.88%   96.93%   +0.05%     
==========================================
  Files           7        7              
  Lines         964      980      +16     
==========================================
+ Hits          934      950      +16     
  Misses         30       30              
Impacted Files Coverage Δ
zigpy_deconz/config.py 100.00% <100.00%> (ø)
zigpy_deconz/zigbee/application.py 98.95% <100.00%> (+0.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5fa4e2b...36af4a8. Read the comment docs.

@MattWestb
Copy link

For groups its good with rate limiting then sending more the 1 / second the routers is blocking new broadcast and loosing sent commands. Also if using source routing its using broadcasts for finding devices that also must taking in account with the max 1.2 broadcast / seconds (i think is 9 broadcast / 8 second or the other way around).

@puddly puddly merged commit 9f21510 into zigpy:dev Apr 17, 2022
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.

3 participants