WeRo
(Welf)
November 20, 2024, 7:14pm
1
Since several weeks the account thing is mostly offline:
„COMMUNICATION_ERROR
Request failed with HTTP status code: 429 response“
Sometimes it changes to online for a short time.
I increased the value „refresh interval“ to 300 but it didn’t solve the problem.
The Hydrawise documentation contains the following statement:
„Rate Limiting: Access to this API is rate limited. The statusschedule.php request has a field called nextpoll that indicates when the next API query should be made. Queries over this rate may be rejected with an HTTP 429 status code.“
1 Like
digitaldan
(Dan Cunningham)
November 20, 2024, 9:26pm
2
It looks like Hydrawise is limiting requests much more aggressively now, this is affecting more then just our addon as the HA plugin has also been struggling with this over the last week. Its seems like once you get a 429, you are locked out for at least 30 mins. I’ll need to look and see how we can limit our exposure to this.
3 Likes
WeRo
(Welf)
December 3, 2024, 7:58pm
3
Hi Dan,
have you had a chance to take a look at it?
It’s not urgent and I really appreciate your support.
Jonas88
(Jonas)
December 4, 2024, 6:33am
4
Hello
I am also interested in this.
Maybe a “refreshInterval” parameter in the binding config is sufficient and we can figure out the allowed pull rate.
Thank you!
digitaldan
(Dan Cunningham)
December 4, 2024, 5:58pm
5
There is already a refresh interval on the thing. Although i am still getting banned even with 300 seconds. Also note that once you are banned you need to pause the binding for 30-60 mins to get unbanned. I have not had time to look at this yet.
digitaldan
(Dan Cunningham)
December 5, 2024, 4:23am
7
So it looks like the binding may not be honoring the configurable refresh interval. I’ll look at changing that. Interesting enough, mine has been querying every min for the last few hours and has not been blocked, so maybe they relaxed this? In any case i’ll push an update to make sure the interval is respected and also a longer default value is used.
1 Like
Penrose
(Thomas)
December 5, 2024, 5:31am
8
Yes, same here, working fine for a couple of hours now. Very likely that there was a change on their end.
1 Like
digitaldan
(Dan Cunningham)
December 5, 2024, 4:58pm
9
So i read that the HA devs reached out to them, maybe they worked something out?
WeRo
(Welf)
December 5, 2024, 9:03pm
10
Well, unfortunately it still doesn’t work for me
digitaldan
(Dan Cunningham)
December 5, 2024, 9:19pm
11
Have you disabled the account thing for at least an hour or more? If not, its probably been trying to reconnect in the background and may still be in a banned state on their side.
WeRo
(Welf)
December 6, 2024, 3:01pm
12
thanks, now it works for me too
WeRo
(Welf)
December 6, 2024, 3:58pm
13
I was too happy too soon - my account is offline again.
STSC
(STSC)
December 22, 2024, 4:36pm
15
digitaldan:
So i read that the HA devs reached out to them, maybe they worked something out?
I think this is the HA solution:
home-assistant:dev
← dknowles2:hydrawise-appid
opened 02:36AM - 10 Dec 24 UTC
## Proposed change
This provides a new field (`app_id`) to the Hydrawise API fo… r identifying Home Assistant and its current version.
This is meant to help remediate throttling errors, which occur when there is no app_id specified. Providing the specific HA version performing the request should also allow Hydrawise to throttle specific HA versions, if needed.
Note that this requires pydrawise 2024.12.0 (bumped in https://github.com/home-assistant/core/pull/132015)
## Type of change
<!--
What type of change does your PR introduce to Home Assistant?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [x] 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
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #130857
- This PR is related to issue:
- Link to documentation pull request:
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [x] The code change is tested and works locally.
- [x] Local tests pass. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
- [x] I have followed the [development checklist][dev-checklist]
- [x] I have followed the [perfect PR recommendations][perfect-pr]
- [x] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [x] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [ ] The [manifest file][manifest-docs] 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.
<!--
This project is very active and we have a high turnover of pull requests.
Unfortunately, the number of incoming pull requests is higher than what our
reviewers can review and merge so there is a long backlog of pull requests
waiting for review. You can help here!
By reviewing another pull request, you will help raise the code quality of
that pull request and the final review will be faster. This way the general
pace of pull request reviews will go up and your wait time will go down.
When picking a pull request to review, try to choose one that hasn't yet
been reviewed.
Thanks for helping out!
-->
To help with the load of incoming pull requests:
- [ ] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr
digitaldan
(Dan Cunningham)
December 22, 2024, 4:54pm
16
@STSC thank you for finding this! i’ll give this a try (using openhab as the identifier ) and post a new jar shortly if it works (probably in a few hours)
1 Like
digitaldan
(Dan Cunningham)
December 22, 2024, 7:17pm
18
I’m running this now for a few hours, if all looks ok, i’ll post a jar for others to test
2 Likes
digitaldan
(Dan Cunningham)
December 22, 2024, 7:37pm
19
Here is a jar to test. You can upgrade from the console directly from github like
bundle:update org.openhab.binding.hydrawise https://github.com/digitaldan/openhab-addons/releases/download/hydrawise-429-fix/org.openhab.binding.hydrawise-4.3.1-SNAPSHOT.jar
or uninstall the binding and put the jar in your addons folder .
This also fixed the fact we were ignoring the configured refresh interval.
4 Likes
Jonas88
(Jonas)
December 23, 2024, 12:44pm
20
Works for me for several hours now.