-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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 update interval in Ondilo Ico #116989
Conversation
Hey there @JeromeHXP, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
@nijel I don't think this is the issue. Currently event the authentication page to get the token does not work (so you can't create a new instance) and Ondilo told me they are still working on their API issues. If the refresh frequency is an issue, we'll lower it, but let's first wait for them to solve their issues. |
I might be wrong, but my tests look like there is an hourly limit for requests per IP address and once you reach that, any request will fail with HTTP 400. Tested using this script:
I can execute it four times until it gets HTTP 400, and it then gets it for the next hour. It might be some temporary workaround on their side, so it might eventually disappear. |
Yes there are limit: 5 req/s, 30 req/h. That's per user. So indeed it could be an issue when someone has multiple ICOs, that's why at first the frequency was much higher but people complained. I'm writing Ondilo right now asking them if this can be the problem. |
What I see, this happens per IP address. When Home Assistant could not fetch the data, I could do that from another server using the same token. Now I'm getting 400 on that server and Home Assistant works just fine with changes I've posted here. But still, this is just my observation. |
Feedback from Ondilo: all that mess in the last days was related to the quotas limits. I suppose it was not active previously and when they tried to active it, it created lots of issues, especially on the authentication part. They have supposedly solved all their issues now. The limit is indeed 30 req/h per user so we need to reduce the frequency. I think 20 minutes should be enough as we make approximately 3 req per check, plus the auth ones. |
The API seems to have sticter rate-limiting and frequent requests fail with HTTP 400. Fixes home-assistant#116593
Proposed change
The API seems to have sticter rate-limiting and frequent requests fail with HTPP 400.
Fixes #116593
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: