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

Reduce polling rate in Blink #107386

Merged
merged 1 commit into from Jan 8, 2024
Merged

Conversation

mkmer
Copy link
Contributor

@mkmer mkmer commented Jan 6, 2024

Proposed change

Revert polling rate to previous default 300s
While this was running for a least 2 months, since 2024.1.0 many users have been receiving unexpected 406 errors from the API. Since it may be a resource constraint on Blink side that appeared after HA reached "critical mass" on updates, I think we should revert to pre 2023.11 rate and re-evaluate.
Please tag for next bug fix release.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@home-assistant
Copy link

home-assistant bot commented Jan 6, 2024

Hey there @fronzbot, mind taking a look at this pull request as it has been labeled with an integration (blink) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of blink can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign blink Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.

@mkmer mkmer marked this pull request as draft January 6, 2024 22:04
@mkmer mkmer marked this pull request as ready for review January 6, 2024 22:05
Copy link
Contributor

@fronzbot fronzbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tieskuh
Copy link

tieskuh commented Jan 7, 2024

Problem seems to be solved by changing to user agent fronzbot/blinkpy#848
Maybe polling interval change isn't needed.

@mkmer mkmer marked this pull request as draft January 7, 2024 13:22
@mkmer
Copy link
Contributor Author

mkmer commented Jan 7, 2024

Let's hold off for a bit.
I'm suspect they are rate limiting us via the user agent - this will only be a cat and mouse game if that is the case.

@fronzbot
Copy link
Contributor

fronzbot commented Jan 7, 2024

Yeah I agree with @mkmer. User agent fixes the problem, but it's best we increase the polling time as well

@mkmer mkmer marked this pull request as ready for review January 7, 2024 16:30
Copy link
Contributor

@jhollowe jhollowe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@frenck frenck added this to the 2024.1.3 milestone Jan 8, 2024
Copy link
Member

@frenck frenck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @mkmer 👍

../Frenck

@frenck frenck merged commit cc67fd8 into home-assistant:dev Jan 8, 2024
23 checks passed
@mkmer mkmer deleted the reduce-polling-rate branch January 8, 2024 12:13
@mkmer mkmer mentioned this pull request Jan 8, 2024
20 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Jan 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants