Skip to content

Pairing follow-ups: new key over a kept one, no Hub Wi-Fi, cage guard - #9

Merged
MarkParker5 merged 12 commits into
developfrom
feature/pairing-followups
Oct 22, 2026
Merged

MarkParker5 merged 12 commits into
developfrom
feature/pairing-followups

Conversation

@MarkParker5

@MarkParker5 MarkParker5 commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

For review, do not merge yet.

  • Kept-key trap (d-key): a node announcing api_encryption while the Hub still holds a key it gave it earlier (soft-unpaired, then reflashed with its own YAML key) is now offered with [none, secret] instead of [none], so the user can enter the new key. none still pairs with the kept key.
  • Hub on Ethernet (d-eth): wifi_credentials() returning None (or an SDK without it) makes pair_device of a BLE discovery raise the SDK's MissingCredentialsError with type wifi before any BLE step. The discovery's last_error is left alone: the Hub returns the error to the app's pairing request as a 422 with the kept device_id and credentials_type: "wifi" (ParkerIndustries/MajorDom-Hub#149), and the app retries on that id after the user saves Wi-Fi on the Hub. wifi is the only type this integration raises.
  • No README changes: integration docs live in the docs repo.
  • Hardware tests are not part of this PR: the earlier tests/hardware changes (cage DUT guard) are reverted here and move to the Hub repo.

Merge order

Depends on MissingCredentialsError from integration-sdk#6, not in any SDK release yet; CI here fails on import until then.

  1. Merge integration-sdk#6, release the SDK.
  2. Bump majordom-integration-sdk here to that release (pyproject.toml + poetry.lock), and in MajorDom-Hub#149.
  3. Merge this together with MajorDom-Hub#149.

Tests

Tests-first: the Hub-Wi-Fi tests now assert last_error stays None and failed (2 failed) before the controller change. With the SDK branch feature/credentials-option installed in the venv: pytest tests 138 passed on Python 3.13, ruff check, ruff format and ty check clean. The hardware test was not run (no cage access).

@MarkParker5
MarkParker5 changed the base branch from feature/improv-ble to develop October 14, 2026 12:34
@MarkParker5
MarkParker5 merged commit 1a88ac2 into develop Oct 22, 2026
6 checks passed
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