Wave 9 #108 — Starlink 3-path wizard - #85
Open
bernardc6 wants to merge 1 commit into
Open
Conversation
This was referenced Aug 5, 2026
Context: Bernard chat #7563-7574 priority 4: Starlink integration must be perfect, with extremely clear and simple instructions for using Starlink Mini as the sole router, plus a setup flow that asks the user which topology they want (Mini-only / separate router / VM router inside the VP2430) and auto-sets up the chosen path. Tier-b recipe connection stays at tier-b; Path A (starlink_mini_only) is the tier-a promotion candidate (gated on test fixture landing). Changes: - connections/starlink/connection.yml: wizard now exposes setup_paths (3 entries: starlink_mini_only / separate_router / vp2430_vm_router); added tier_a_promotion_candidate marker; install.config_flow flipped to true (wizard exposes a Starlink step); new side_effects (adds_wizard_step, adds_input_text_helper). - connections/starlink/__init__.py: now exports apply_setup_path() (the wizard entry point) + describe_setup_paths() (radio-button metadata) + 3 PATH_* constants. Path A wires the input_text + REST + 3 template sensors (reachable, signal_pct, sleep_state). Path B validates the user's smart plug entity (exposed + controllable) + creates switch.rc_net_starlink_plug. Path C validates the OpenWrt API URL + bearer token + creates the REST chain. 3x-retry-with-backoff HTTP probe (10s window). Plain- English errors throughout. Idempotent (re-running is safe). - connections/starlink/docs/recipe.md: restructured around a 'Choose your setup' section at the top with a decision tree + table of the 3 paths. The legacy Path A / Path B sections preserved (now under §A / §B / §C headings). Added Path A (Mini only) + Path C (VM router) step-by-step. Errors section expanded with plain-English 'what to do' per error. - connections/starlink/tests/test_connection_yml.py: 14 tests (was 6). New tests: 3-path wizard setup_paths structure, Path A no inputs + side_effects check, Path B requires plug entity, Path C requires openwrt api url + token, tier_a_promotion_candidate is Path A, absence-of-required-config failure case, recipe documents all 3 paths, __init__ exports wizard-wiring helpers. - docs/catalog/connectivity/starlink.md: rewritten as 5-step IKEA howto (Pick your setup -> Answer 2-3 questions -> RoamCore does the rest -> Tiles appear -> Done). Includes a 'Common questions' Q&A covering which path to pick, switching paths, the unreachable error, credentials privacy, mid-setup cancellation safety. - homeassistant/custom_components/roamcore/config_flow.py: added async_step_starlink that renders the 3 paths as radio buttons + collects path-specific input (Path A: nothing; Path B: plug entity id; Path C: OpenWrt API URL + token) + calls connections.starlink.apply_setup_path(). Errors surface as form errors (no exceptions bubble up). Lazy import of the starlink module so the rest of the config_flow works without the connection folder being installed. Verification: - python3 -m pytest connections/starlink/tests/test_connection_yml.py -v: 14 passed in 0.09s - bash scripts/check.sh --core-only: green (all 33 connection tests + HA-beta smoke pass) - YAML / Python parses clean - Path A idempotent: re-running apply_setup_path with the same args is a no-op (verifies, writes, returns the same entities_created) - Path B validates plug entity is exposed + controllable BEFORE writing anything - Path C verifies OpenWrt API reachable BEFORE writing anything - Plain-English errors verified by string-matching the format strings (ERROR_STARLINK_UNREACHABLE, ERROR_PLUG_NOT_EXPOSED, ERROR_PLUG_NOT_CONTROLLABLE, ERROR_OPENWRT_UNREACHABLE, ERROR_PATH_REQUIRES_INPUT) Rollback: git revert HEAD (one commit, 6 files). No schema migrations; no helper state outside HA's normal registry; the in-package YAML + REST sensors Path A wires are guarded by the wizard's verification step (re-running the wizard with a different path removes them on the next reload via the package YAML). Tier discipline: - Path A is the tier-a promotion CANDIDATE (manifest declares tier_a_promotion_candidate: starlink_mini_only). Tier stays 'b' until a Starlink test fixture lands. - Paths B and C stay tier-b (recipe, depend on operator wiring). - install.config_flow flipped to true (wizard exists); install.hacs stays false (no HACS integration of our own).
bernardc6
force-pushed
the
subagent/starlink-wizard
branch
from
August 5, 2026 12:14
9a675fa to
87ccfc1
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.
Rebased onto main
d3d596bRebased onto main
d3d596bto strip the pre-existingafb743a(Wave 8 #315 OpenWrt controls = PR #82, separate work item, still OPEN).Context
Bernard chat #7563-7574 priority 4: Starlink integration must be perfect, with extremely clear and simple instructions for using Starlink Mini as the sole router, plus a setup flow that asks the user which topology they want (Mini-only / separate router / VM router inside the VP2430) and auto-sets up the chosen path.
Changes
wizardnow exposessetup_pathswith 3 entries (starlink_mini_only/separate_router/vp2430_vm_router); each carriesconnection_kind,estimated_time,requires_reboot,setup_notes. Newtier_a_promotion_candidate: starlink_mini_onlymarker.install.config_flowflipped totrue(wizard exposes a Starlink step).apply_setup_path()(the wizard entry point) +describe_setup_paths()+ the 3PATH_*constants. Path A wires theinput_text+ REST + 3 template sensors (reachable, signal_pct, sleep_state). Path B validates the user's smart plug entity (exposed + controllable) + createsswitch.rc_net_starlink_plug. Path C validates the OpenWrt API URL + bearer token + creates the REST chain. 3×-retry-with-backoff HTTP probe (10s window). Plain-English errors throughout. Idempotent.async_step_starlinkthat renders the 3 paths as radio buttons + collects path-specific input (Path A: nothing; Path B: plug entity id; Path C: OpenWrt API URL + token) + callsconnections.starlink.apply_setup_path(). Errors surface as form errors (no exceptions bubble up). Lazy import of the starlink module so the rest of the config_flow works without the connection folder being installed.Verification
python3 -m pytest connections/starlink/tests/test_connection_yml.py -v: 14 passed in 0.09sbash scripts/check.sh --core-only: green (all 33 connection tests + HA-beta smoke pass)apply_setup_pathwith the same args is a no-opERROR_STARLINK_UNREACHABLE,ERROR_PLUG_NOT_EXPOSED,ERROR_PLUG_NOT_CONTROLLABLE,ERROR_OPENWRT_UNREACHABLE,ERROR_PATH_REQUIRES_INPUT)Rollback
git revert HEAD(one commit, 6 files). No schema migrations; no helper state outside HA's normal registry; the in-package YAML + REST sensors Path A wires are guarded by the wizard's verification step.Tier discipline
tier_a_promotion_candidate: starlink_mini_only). Tier staysbuntil a Starlink test fixture lands.install.config_flowflipped totrue(wizard exists);install.hacsstaysfalse(no HACS integration of our own).Diff:
6 files changed, 1793 insertions(+), 243 deletions(-)