Skip to content

Fix repeater setup for discovered contacts and editable routes - #388

Closed
clausefoto wants to merge 3 commits into
meshcore-dev:mainfrom
clausefoto:fix/repeater-setup
Closed

clausefoto wants to merge 3 commits into
meshcore-dev:mainfrom
clausefoto:fix/repeater-setup

Conversation

@clausefoto

@clausefoto clausefoto commented Oct 22, 2026 •

Copy link
Copy Markdown

The Add Repeater dropdown includes discovered contacts, but login resolves only contacts saved on the companion. Selecting a discovered-only repeater therefore produces ‘Contact not found,’ even though it is visible in the list. Setup also offers no way to correct a missing route, and a failed login resets the selection.

This changes setup to two steps: select the repeater, then review its saved path, password and polling settings. Discovered-only contacts are saved to the companion and verified before login. The path is prefilled and editable, with validation for hex hops and hash widths, plus explicit direct and flood options. A failed attempt stays on the selected repeater’s settings form with entered values preserved.

Login makes one attempt per Confirm, using the existing traffic budget and timeout. After failure, the same form remains open for a manual retry. A new contact and its selected path are saved in one companion write. Regular repeater polling and background login behavior are unchanged. Route writes use a copy of the contact so an SDK mutation before a rejected save cannot alter the cached route. Contact-save errors explain the distinction between discovered and saved contacts and give a manual recovery step.

Contact and route changes are saved before authentication and remain on the companion if login fails; the form and documentation explain this. Documentation and regression tests are included.

Validation

  • 66 related integration tests passed, covering setup, configuration updates, radio commands and contracts.
  • Unit suite: 371 passed; two failures in tests/test_cli_command.py were also reproduced on unchanged upstream code (EntityRegistry missing entities).
  • Ruff checks and diff whitespace checks passed for the changed Python files.
  • Live testing with a USB companion in Home Assistant: the new setup screen loaded, and removing/re-adding a repeater completed successfully. A previously failing login also succeeded after configuring its known working route. Automated tests verify one attempt per submission, manual retry without reselection, and saving a discovered contact plus its new path in one write. The simplified version is ready for another live test.

Related reports: #99, #153, #194.

@clausefoto
clausefoto marked this pull request as draft October 22, 2026 23:09
@clausefoto clausefoto closed this Oct 23, 2026
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