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

Improve Request Queue Behavior #5 #817

Merged
merged 5 commits into from
Dec 4, 2023

Conversation

slugzero
Copy link
Contributor

@slugzero slugzero commented Dec 4, 2023

This is the 5th PR in a series to improve the request queue behavior for sleepy end devices, as discussed in Koenkk/zigbee2mqtt#17177.

This PR introduces the following change: If an attempt to send a message after an implicit checkin fails, the message is not deleted immediately. Instead, all messages are now kept until one of the following is met:

  • message is delivered successfully
  • send attempt fails after an explicit checkin
  • the message has expired
  • message is overwritten by a new message with the same payload

The PR also introduces another small fix that an incoming genPollCtrl message does not trigger an implicit checkin any more. The proper behavior is to send a checkin response and wait for the device to enter fastpoll, then send all messages. The implicit checkin is unnecessary and may lead to bad side effects like messages being lost or sent out of sequence.

PS: this one took me a little bit longer because I did not have sufficient time to test it in the last months. Next one will follow more quickly :-)

@Koenkk Koenkk merged commit 1051d9d into Koenkk:master Dec 4, 2023
1 check passed
@Koenkk
Copy link
Owner

Koenkk commented Dec 4, 2023

Thanks!

@slugzero slugzero deleted the request-queue-fixes-5 branch December 7, 2023 16:49
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.

2 participants