Skip to content

Stop warning about every dropped vendor request - #43

Merged
matuszeg merged 1 commit into
mainfrom
quiet-vendor-logs
Sep 24, 2026
Merged

matuszeg merged 1 commit into
mainfrom
quiet-vendor-logs

Conversation

@matuszeg

Copy link
Copy Markdown
Owner

The vendor hangs up on about one request in ten even when it's healthy, and the retry in forward() already absorbs that. Logging each one as a warning came to 491 lines in four days on a live install. Those are debug now. The log gets one line when the vendor is judged unreachable and one when it comes back, which is the same thing the reachability sensor reports.

Also in here:

  • A /pings entry with a null value (what a repaired non-finite reading turns into) gets skipped now, so it no longer fails float() and takes the whole body down. A live install still sees about nine /pings parse failures a day, erroring at char 46, which is exactly where a 1.#INF00 clock sits. The clock repair already covers that, so something else in those bodies is wrong too. I don't know what yet, so a failed parse now quotes the first 400 bytes of the body.
  • HA 2026.9 deprecates via_device and device_registry.async_get_device, and both stop working in 2027.8. The pump now names its parent with via_device_id, using the id from registering the service device during setup, and falls back to via_device on releases that don't have the new key.

Tests: 261 pass. Every new test fails against the old code. Running on a live 2026.9.3 install since 2026-09-24 00:16 UTC: neither deprecation is logged any more and the pump is still linked to the service device. The vendor hasn't dropped a request since the deploy, so the new transition line hasn't had a chance to show up live yet.

The vendor hangs up on about one request in ten even on a good day, and
the retry in forward() already covers it. Logging each one as a warning
put 491 lines into a live Home Assistant log in four days, the third
noisiest source there. Those are debug now. What gets a line is the
verdict changing: once when the vendor is judged unreachable, once when
it comes back. That is the same thing the reachability sensor reports.

Two smaller things the same log turned up:

A /pings entry whose value is null, which is what a repaired non-finite
reading becomes, now gets skipped instead of failing float() and taking
the whole body with it. Nine /pings bodies a day still fail on the live
install with the error at char 46, exactly where a 1.#INF00 clock sits.
The repair already handles the clock, so something else in those bodies
is bad too. A non-finite value is the likeliest guess but it has not
been seen, so a failed parse now quotes the first 400 bytes of the body
and the next one will say.

Home Assistant 2026.9 deprecated via_device in favour of via_device_id,
and the old form stops working in 2027.8. The pump now names its parent
by registry id when the running version knows that form, and falls back
to the old one when it does not. The id comes from registering the
service device during setup, since looking it up with async_get_device
is deprecated in the same release.
@matuszeg
matuszeg merged commit 9b596a2 into main Sep 24, 2026
3 checks passed
@matuszeg
matuszeg deleted the quiet-vendor-logs branch September 24, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant