Event-only program support (hoods, hobs) & keep-alive watchdog backoff (builds 20–24) - #19
Open
bumaas wants to merge 5 commits into
Open
Event-only program support (hoods, hobs) & keep-alive watchdog backoff (builds 20–24)#19bumaas wants to merge 5 commits into
bumaas wants to merge 5 commits into
Conversation
…achlauf) Geräte wie Dunstabzugshauben melden das laufende Programm beim Lüfternachlauf / der Intervall-Lüftung nur über BSH.Common.Root.ActiveProgram, nie über SelectedProgram - bisher wurde das Event per EXCLUDE-Liste komplett ignoriert und die Programmanzeige blieb leer (Forum-Meldung pitti, Beitrag #530/#531). Neu: rein anzeigende Variable "Aktives Programm" (Ident ActiveProgram), befüllt direkt aus dem Event, angelegt erst beim ersten ActiveProgram-Event, geleert bei value=null (Programmende). Keine zusätzlichen API-Aufrufe, keine Auswirkung auf SelectedProgram/Start. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…gLevel) Haube bei lokaler Bedienung meldet ihr Programm nur über ActiveProgram, nie über SelectedProgram - der Pfad, der die Options-Variablen anlegt, lief daher nie und Events wie VentingLevel hatten keine Variable zum Aktualisieren (Forum-Fall pitti, LD88WMM66). - ActiveProgram-Event stößt (entkoppelt per OnceTimer, nur bei Programmwechsel) einen Abruf von programs/available/<key> an und legt die Options-Variablen mit Profil aus den Constraints an - Option-Werte, die vor der Variablenerzeugung eintreffen, werden gepuffert und nach dem Anlegen angewendet - updateOptionVariables: neuer Parameter clearSelectionOnFailure, damit ein nicht auflösbares Laufzeitprogramm (z. B. Lüfternachlauf, SDK.Error.UnsupportedProgram) die Programmauswahl nicht mehr leert - Tests: Haube mit vollständigem Fixture-Satz (Init, Variablenerzeugung inkl. Request-Zählung, Puffer-Replay, UnsupportedProgram-Regression) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…iral on dead stream) With a permanently dead event stream the watchdog used to reconnect every 2 minutes - ~700 GET /events per day, keeping the "1000 calls in 1 day" quota exhausted for good (forum case zman0801). Reconnect attempts now back off exponentially (2/4/8/... min, capped at 1 hour) and reset as soon as the first keep-alive arrives. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…odes, oven/coffee runtime programs) Hobs are monitoring-only: the API lists no programs, so the Programs profile stayed empty and ActiveProgram showed the raw key. ActiveProgram events now add a translated profile association for programs that never appear under programs/available (hob modes, hood interval venting, oven follow-up/cleaning modes, coffee maker cleaning modes, favorites). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… appliance types - CheckServerEvents now includes the SSE client IO's InstanceStatus in the "KeepAlive | Failed" debug line. On a silently dead stream nothing reaches ReceiveData, so this is the only hint whether the IO saw an HTTP error or still believes it is connected (diagnosis gap seen in a support case where the stream stayed dead with no visible cause). - createPrograms() skips the GET /programs request for appliance types the API documents as having no programs (Refrigerator, Freezer, FridgeFreezer, WineCooler, CookProcessor) - it was a guaranteed SDK.Error.UnsupportedOperation costing one request per initialization. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
bumaas
force-pushed
the
pr/event-only-programs-watchdog-backoff
branch
from
August 2, 2026 09:53
baf5b46 to
05bda74
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR builds on the current
master(build 19) and adds builds 20–24. It is the delta only; the tree matches our tested fork state. All 52 PHPUnit tests pass.Motivation
Two field cases drove these changes. A hood operated at the appliance reports its programs only via
BSH.Common.Root.ActiveProgramevents (never via SelectedProgram), so runtime programs like fan run-on were invisible. And hobs turned out to be monitoring-only appliances: the API lists no programs for them at all, leaving theProgramsprofile empty and the raw key on display. Separately, a support log showed a permanently dead event stream turning into a quota death spiral: the keep-alive watchdog reconnected every 2 minutes without backoff (~700GET /eventsper day), keeping the "1000 calls in 1 day" limit exhausted for good.Changes
Device (
Home Connect Device)ActiveProgramvariable is maintained from the event stream, so appliance-started programs (e.g. hood fan run-on) become visible.SelectedProgramis intentionally never filled from these events — its value goes into the start payload.VentingLevel) are created from a single deferredprograms/available/<key>request (RegisterOnceTimer→RequestAction, off the event thread). Option values arriving before the variables exist are buffered and applied afterwards. AnUnsupportedProgramanswer no longer clears the program selection.programs/available(hob modes, hood interval venting, oven follow-up/cleaning modes, coffee maker cleaning modes, favorites) get a curated, translatable display name in theHomeConnect.<type>.Programsprofile via the newEVENT_ONLY_PROGRAM_NAMESmap, including aBSH.Common.Program.Favorite.NNN→ "Favorite N" pattern rule. German translations included.GET /programsfor programless appliance types: the API documentation states "There are no programs available for …" for Refrigerator, Freezer, Fridge Freezer and Wine Cooler (and no released program support for Cook Processor), so the request — a guaranteedSDK.Error.UnsupportedOperation— is skipped for these types.Cloud (
Home Connect Cloud)InstanceStatus. On a silently dead stream nothing reachesReceiveData, so this is the only hint whether the IO saw an HTTP error or still believes it is connected.Tests
PHPUnit suite extended from 40 → 52 tests (hood fixture set incl. ActiveProgram flow, buffered option values, unsupported-program handling, profile associations with translated names and the favorites rule, watchdog backoff and its keep-alive reset, no
/programsrequest for programless types). All green.