-
-
Notifications
You must be signed in to change notification settings - Fork 32k
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
Update Neato Library And Reduce Cloud Calls #15072
Conversation
Hi @dshokouhi, It seems you haven't yet signed a CLA. Please do so here. Once you do that we will be able to review and accept this pull request. Thanks! |
Looks good! |
That's a crazy amount of calls . Even 10k is a lot. Can we reduce it even more ? |
@balloob I will look into that, the |
We haven't done it before in Home Assistant, but I wonder if we should explore increasing polling frequency when the vacuum is in use versus when not. |
* Update Neato library to 0.0.6 and reduce the amount of calls to the cloud * Remove file commited in error * Lint
That would be ideal because then we can also update the map only when it needs to be, just after it was in use. There is no need to update the map if there has been no activity on the vacuum. The image is not going to change. |
Description:
This PR updates the pybotvac library to the latest version and also reduces the amount of calls being sent to Neato's servers. Previously the robot would update every second, the robot map every 10 and the vacuum/switch entities were set to the default. Now everything is set to update once a minute.
I have tested these changes locally and can confirm a significant drop in the amount of calls being made. Previously there would be more than 50,000 calls a day being made. With these changes that number drops drastically, well below 10,000 a day. This cuts down on most if not all time out and gateway errors that user are experiencing. The only side effect to the change is that the vacuum toggle may be a bit slower to update than before but it will update.
Pi-Hole long term stats to show that the calls were reduced immediately:
Related issue (if applicable): fixes #
Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>
Example entry for
configuration.yaml
(if applicable):Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTS
variable (example).requirements_all.txt
by runningscript/gen_requirements_all.py
..coveragerc
.If the code does not interact with devices: