Repository navigation
Back off on 429 without block duration; throttle GALEVO hybrid menu items - #202
rudelafuente wants to merge 3 commits into
Conversation
…tems Heat pump and hybrid GALEVO systems request four extra menu-item groups on every state refresh (more when the per-item fallback runs), which exhausts Ariston's per-account request budget. Ariston then answers "429 Requests are blocked" without a duration; the 5 s fallback retry and the coordinators' regular polling keep the account blocked indefinitely. - A 429 without a parsable duration no longer retries: every request of the API instance pauses for 15 minutes, doubling up to 2 hours while the block persists. A successful response resets the pause. A 429 with a parsed duration keeps the sleep-and-retry-once behaviour. - GALEVO hybrid/heat pump menu items are requested at most every 30 minutes; the last values are kept in between. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ttle only after a fetch Review feedback on fustom#202: - A parsed 429 no longer shortens a longer pause that is already active: it neither waits nor retries in that case, and the retry after waiting out a block is skipped if a longer pause started meanwhile. - Retries (405 re-login, 5xx) now go through the pause check, so an in-flight 500 cannot retry into a pause started by another response. - A 429 without a duration that was in flight when the pause began does not double the pause again, and an in-flight success does not reset the backoff. - The 30-minute hybrid menu window starts only once the hybrid items were fetched and stored. A poll skipped by a 429 pause, a retained server error or a failed properties request no longer delays the next attempt. Adds concurrency tests (two requests in flight, responses released in order) for the async path, sync twins, and regression tests for the hybrid window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Request-volume data that may help compare this PR with #200, both of which address fustom/ariston-remotethermo-home-assistant-v3#545. Not live-tested on this PR. I simulated it with the same harness for both PRs: the real
Live context from the same installation (GALEVO pure heat pump, gateway firmware 104.115.22C, HA 2026.11.0) while testing #200:
Hybrid values going stale for up to 30 min is less of a concern than request volume on this unit. Still, the counts above suggest that caching the discovered ids (as #200 does) saves more requests than throttling the groups. |
|
Thanks for the numbers, Remper1997, that's a useful comparison. Caching the discovered ids, as #200 does, clearly saves more requests than throttling the groups, and #200 came first. If
I'll add our live data from a night without 429s on #200. |
|
Do you prefer to merge #200? If so close this |
Problem
Since fustom/ariston-remotethermo-home-assistant-v3#530, heat pump and hybrid GALEVO systems request four extra menu-item groups on every state refresh (more when the per-item fallback runs). With the default 180 s interval that is roughly 120–280 requests/hour per account. Ariston then answers
429 Requests are blockedwithout a block duration. In that case the client waits 5 s, retries, and every coordinator keeps polling, so the block never expires (fustom/ariston-remotethermo-home-assistant-v3#545). The block is account-wide: the official Ariston NET app stops working too.Changes
Tests
test_429_without_parsable_bodyis updated to the new behaviour. One heat pump test now marks the hybrid refresh as due before its second refresh.python -m unittest discoverpasses, with 99 % coverage.Tested against mocked responses. I'm running the same logic as a local patch on a GALEVO heat pump (NIMBUS) and will report request rates in #545 once the account block clears.
🤖 Generated with Claude Code