Repository navigation
Start time kept after an immediate start, retry stops while the cloud is inactive (builds 34–35) - #22
Merged
Conversation
Follow-up from the review of PR symcon#20: RetryRefresh is a repeating timer. Since build 31 it was only cleared inside the active-parent branch of refreshDeviceState(), so if the cloud went inactive while a retry was pending (e.g. a rate-limit block) the timer kept firing every 1-30 s until the cloud was active again: no API request, but a script run and a debug line each time. An inactive parent now stops the timer; the status change back to IS_ACTIVE starts the initialization again anyway. Tests: the new test fails before the fix (83 tests, 1 failure), 83 tests / 667 assertions green after.
An immediate start applied the reduced option list a running dishwasher reports (no StartInRelative) and hid the option; the next start then dropped the start time. The active-program path now only adds options, a return to Ready re-reads the selected program, and setting a hidden option reports instead of being dropped silently. Before the fix 3 failing tests, afterwards 86 green.
…tays visible Build 34 stopped a pending RetryRefresh whenever HasActiveParent() failed. That also happens while only the event-stream IO above the cloud is down: the cloud stays IS_ACTIVE, no status change follows, and the initialization was never retried once the IO was back. The retry is now only stopped when the cloud itself is inactive or no HaID is set. Build 35 made the active-program path add-only for options, but it still hid and disabled the "Use duration option" switch when the active program does not list Duration. The switch now follows the same rule. Tests: both new tests fail without the fix, 90 tests green after.
The new stubs on master (symcon/SymconStubs be1e942, raised in symcon#21) reject IPS_ConnectInstance() on an instance that ConnectParent() already connected ("Instance #X already has a parent"). testActiveProgramDoesNotHideUseDuration still used that pattern and failed in the PR's merge build. It now takes the cloud ConnectParent() connected, as the other tests do since symcon#21. Green against both the branch stubs (90 tests) and the merge with master (209 tests).
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 33) and adds builds 34 and 35. It is the delta only; apart from the build number the tree matches our tested fork state plus your configurator commit. All 88 PHPUnit tests pass.Motivation
After an immediate start, a dishwasher no longer took over a start time on later starts. Appliances answer
programs/available/<program>depending on their operation state, and a running dishwasher lists neitherStartInRelativenor most other options. The active-program refresh applied that reduced list and hid the options. Nothing showed them again, so later starts went without the start time, and setting the hidden variable was dropped without a message.Build 34 is the follow-up from your approval of #20:
RetryRefreshkept firing while the cloud was inactive.Changes
Device (
Home Connect Device)RequestActionon a hidden option echoes "This option is not available for the current program" instead of dropping the value.RetryRefreshtimer; the status change back toIS_ACTIVEstarts the initialization anyway.Tests
PHPUnit suite extended from 84 → 88 tests. The new dishwasher fixtures (
run.json,delayedstart.json) are captures of the appliance in those states. The test API can now answer an endpoint with such a state variant and records PUT requests, so the start payload can be checked. Each fix was checked red/green: the new tests fail on the code without the fix (build 35: 3 of 86) and pass with it.