Repository navigation
fix(circadian): let Flow cards continue before retries finish - #73
Merged
Merged
Conversation
Homey stops an app Flow card after 60 s, and the Flow then stops at that card. Circadian Light Group and Collection cards waited for the first pass, verification and two retry passes, so a few lights that do not answer (up to 10 s per write) brought "All on" close to the limit. - runDeviceTasksParallel can defer its retries: it returns after the first pass and one check (plus a second check of unconfirmed lights after 1.5 s), and retries the rest in the background. A newer command stops them, also during the final pass, and a superseded command reports nothing. - Member on/off commands and profile updates use it. Verification, the alarm, the error trigger and the target-changed trigger are reported when the retries finish, with the same messages as before. - Every Circadian action card and the onoff/clg_paused listeners return within 50 s; anything still running goes on in the background. - Pausing or deleting a group stops its background retries. - The re-enabled Turn on/off/toggle cards (Advanced Flow) return "All lights confirmed" (yes/no) and "Status" (text). Cards that may be in standard Flows get no tokens, because Homey hides THEN cards with tokens there. - The Collection merges its groups' results, reports only its newest operation, does not count postponed or superseded updates as failed groups, and names the groups in its error message. Replaces #72, whose commit messages named a review tool.
Owner
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Tiwas
added a commit
that referenced
this pull request
Oct 8, 2026
Version 1.10.35 with the Circadian Light Group Flow card fix from #73: store changelog in English and Norwegian, CHANGELOG.md section, README summary, the Homey Community listing, a #retries anchor in the guide, and the worklog. The forum post itself is not changed.
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.
Why
Homey stops an app Flow card after 60 s, and the Flow then stops at that card. Since v1.10.25 the Circadian Light Group and Collection cards waited for the first pass, verification and two retry passes. A light that does not answer costs up to 10 s per write (homey-api
DEFAULT_TIMEOUT) in every pass. On Lars's Homey on 2026-10-08, "All on" ran about 53 s from the first light to the Collection finishing, with three lights that do not answer.What changes
runDeviceTasksParallelhas adeferRetriesoption. It returns after the first parallel pass and one verification. With a verify step, it first checks unconfirmed lights once more after 1.5 s, so a light that reports late is neither listed nor written twice. Lights still unconfirmed are listed inpending, and the reduced parallel retry and final serial retry run inbackground. A newer command stops the retries through the operation generation, also during the final serial pass, so a superseded command reports nothing.runMemberCommand) and profile updates use it. A member command stays active until its retries finish, so the scheduler still waits. Verification,alarm_config,clg_error_occurredandclg_target_changedare reported when the retries finish, with the same messages as before.runWithinCardTimeBudget(50 s) wraps every Circadian action card and theonoff/clg_pausedcapability listeners. Work still running after that goes on in the background. An error before the budget still fails the card.okkeeps each operation's old boolean, so the Collection reports group errors as before, and cards without tokens still return that boolean.clg_turn_on/clg_turn_off/clg_togglereturn the tokenscompleted("All lights confirmed", yes/no) andstatus(text). They are no longer deprecated, because the device's own On/Off/Toggle cards cannot return tokens. They are titled "… and report the result" in all 11 languages. Homey shows THEN cards with tokens only in Advanced Flows, so the other Circadian cards keep their definitions without tokens; a driver test checks this. Status texts are undercircadian_outcomein all locales: Norwegian is translated, the other languages use the English text.runAwaitedMemberGroupsmerges the groups' outcomes and reports group failures when every group's retries have finished. Only the newest Collection operation reports, and a group that postponed a profile update is not a failed group. The Collection queue is released when the card's part is done. The group error message used to listundefined; it now names the groups.Behaviour change
The v1.10.25 promise that the next card waits for all retries no longer holds. A later card for the same group supersedes the retries. A profile card such as Resume or Apply temporary state that arrives while on/off retries are running is applied when they finish. That keeps the order, and the total delay matches the old in-card retries.
Companion tools
docs/tools/clg-editor.html: the config schema did not change, so it round-trips as before and needs no update.Reviews
This replaces #72, which has the same content. #72's commit messages named a review tool, which the message check rejects.
Tests
npm run test:package: publish-level validation passes.homey app install): the Collection's "Turn off and report the result" returned after 1.8 s. It gavecompleted: falseand a status per group, with the unresponsive Smart Energy Illuminator being retried, and its background report followed about 20 s later. The bedroom group returned in 59 ms withcompleted: true.Docs:
docs/docs/circadian-light-group.html,PROJECT_DOCUMENTATION.md.