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

Refactor poll scheduler legacy code vs. Device code #8074

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

manup
Copy link
Member

@manup manup commented Dec 25, 2024

This PR is part of a series to get problems with joining and keeping devices working fixed.

Basically we have multiple sub systems fighting each other. Which often works but puts stress on the queues. This PR puts the DeviceTick scheduler in charge to also drive the legacy PollManager so that they don't block each other randomly.

The command to "poll a device" shouldn't come from random places in the code, but from one schedeuler — the DeviceTick.

One improvement on the DeviceTick itself is that it now not just queries the next device at a fixed interval but also actually waits until query is done or signaled that the device can't be queried right now. This speeds up processing and also prevents filling the queues.

Further the legacy delayedFastEnddeviceProbe() function for joining sensors is simplified to not do ZDP querying of Active Endpoints, Node and Simple Descriptors, manufacturer name and modelid. This is already done by Device code.

One drawback of this PR is that polling lights after group commands is more delayed for now, this will be speed up later on again. For lights which support reporting this isn't a problem.

Basically we have two sub systems fighting each other. Which often works but puts stress on the queues. This PR puts the DeviceTick scheduler in charge to also drive the legacy PollManager so that they don't block each other randomly.

Further the legacy delayedFastEnddeviceProbe() function for joining sensors is simplified to not do ZDP querying of Active Endpoints, Node and Simple Descriptors, manufacturer name and modelid. This is already done by Device code.

One drawback of this PR is that polling lights after group commands is more delayed for now, this will be speed up later on again. For lights which support reporting this isn't a problem.
@manup manup added this to the v2.29.2-beta milestone Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant