Repository navigation
Conversation
Contributor
|
✅ The title and description are good to go. Thanks! |
A player next to the add-on announces `_ma_local_pairing@v1` with a port in its hello; fetch its token from the host side of the hassio network and pair with it. This replaces the route through Home Assistant, whose HA-side support was dropped.
chrisuthe
force-pushed
the
chrisuthe/task/pair-co-located-sendspin-players-from-their-local
branch
from
November 2, 2026 14:22
88eecc0 to
9a225e5
Compare
Contributor
Merging this PR will not alter performance
Comparing Footnotes
|
Contributor
🔒 Dependency Security Report📦 Modified Dependencies
|
| Name | Skip Reason |
|---|---|
| aiolibdatachannel | Dependency not found on PyPI and could not be audited: aiolibdatachannel (2026.5.23.dev4+g950e7f0) |
| torch | Dependency not found on PyPI and could not be audited: torch (2.13.0+cpu) |
| torchaudio | Dependency not found on PyPI and could not be audited: torchaudio (2.11.0+cpu) |
| yappi | Dependency not found on PyPI and could not be audited: yappi (1.7.7) |
✅ No known vulnerabilities found
Automated Security Checks
- ✅ Vulnerability Scan: Passed - No known vulnerabilities
- ✅ Trusted Sources: All packages have verified source repositories
- ✅ Typosquatting Check: No suspicious package names detected
- ✅ License Compatibility: All licenses are OSI-approved and compatible
- ✅ Supply Chain Risk: Passed - packages appear mature and maintained
Manual Review
Maintainer approval required:
- I have reviewed the changes above and approve these dependency updates
To approve: Comment /approve-dependencies or manually add the dependencies-reviewed label.
chrisuthe
marked this pull request as ready for review
November 2, 2026 16:06
chrisuthe
deleted the
chrisuthe/task/pair-co-located-sendspin-players-from-their-local
branch
November 2, 2026 16:41
5 of 17 tasks
acuntex
pushed a commit
to acuntex/music-assistant-server
that referenced
this pull request
Nov 19, 2026
…en (music-assistant#7371) # What does this implement/fix? A software Sendspin player running on the same HAOS host as the Music Assistant add-on (the Local Audio app) now pairs automatically, with no token copying. This is music-assistant#7315 again without the part that got it reverted (music-assistant#7370): the Home Assistant ESPHome auto-pairing (`HassAutoPairer` and the hass provider's `subscribe_sendspin_clients` / `get_sendspin_pairing_token`) stays as it is. The two cover different players: ESPHome devices pair through Home Assistant, software players through their local token. How it works: - The player lists the application-specific role `_ohf_local_pairing@v1` (provisional name, with the `ohf_` prefix asked for on Sendspin/backlog#86) in `client/hello` and sends `"_ohf_local_pairing@v1_support": {"port": N}`. Sendspin/sendspin-cpp-cli#110 is the player side. - When it connects encrypted and unpaired, offering the token pair method, and no manual pairing is running, MA fetches `GET http://172.30.32.1:N/` (plain-text token). It then pairs through `pair_with_token`, which rejects a token for another client id. - The address is fixed, never taken from the client. The port must be an int in 1024-65535. The fetch uses `mass.http_session` with a 5 s timeout, no redirects, 200 only and a 512-byte cap. The token is never logged. - Only active when running as the HA add-on, behind a hidden `local_pairing` entry (default on), like `allow_legacy_clients`. No same-host check in this version: aiosendspin exposes no public peer address. A client cannot pair this way without the PSK, because the handshake fails, so the check would only stop other hosts from triggering the local fetch. If a proxy is set via `HTTP(S)_PROXY` without `NO_PROXY` covering `172.30.32.1`, the fetch goes through it, because `mass.http_session` honours proxy env vars. Bumps `aiosendspin[server]` to 10.3.0, which keeps `application_objects` on the hello (Sendspin/aiosendspin#586). **Related issue (if applicable):** - related issue Sendspin/backlog#86 - reverted earlier version: music-assistant#7315, music-assistant#7370 ## Types of changes - [ ] Bugfix (non-breaking change which fixes an issue) — `bugfix` - [x] New feature (non-breaking change which adds functionality) — `new-feature` - [ ] Enhancement to an existing feature — `enhancement` - [ ] New music/player/metadata/plugin provider — `new-provider` - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) — `breaking-change` - [ ] Refactor (no behaviour change) — `refactor` - [ ] Documentation only — `documentation` - [ ] Maintenance / chore — `maintenance` - [ ] CI / workflow change — `ci` - [ ] Dependencies bump — `dependencies` ## Checklist - [x] The code change is tested and works locally. - [x] `pre-commit run --all-files` passes. - [x] `pytest` passes, and tests have been added/updated under `tests/` where applicable. - [ ] For changes to shared models, the companion PR in `music-assistant/models` is linked. - [ ] For changes affecting the UI, the companion PR in `music-assistant/frontend` is linked. - [x] I have read and complied with the project's [AI Policy](https://github.com/music-assistant/.github/blob/main/AI_POLICY.md) for any AI-assisted contributions. - [ ] I have [raised a PR against the documentation repository](https://github.com/music-assistant/music-assistant.io/blob/main/CONTRIBUTING.md) targeting the main or beta branch as appropriate. --------- Co-authored-by: Artur Pragacz <[email protected]>
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.
What does this implement/fix?
A Sendspin player running on the same HAOS host as the Music Assistant add-on (the Local Audio app) now pairs automatically, with no token copying. This replaces the route through Home Assistant: its HA-side support (home-assistant/core#188845, #7240) was closed, so the
HassAutoPairerand the hass provider'ssubscribe_sendspin_clients/get_sendspin_pairing_tokenare removed.How it works:
_ma_local_pairing@v1(provisional name) inclient/helloand sends"_ma_local_pairing@v1_support": {"port": N}.GET http://172.30.32.1:N/(plain-text token). It then pairs throughpair_with_token, which rejects a token for another client id.mass.http_sessionwith a 5 s timeout, no redirects, 200 only and a 512-byte cap. The token is never logged.local_pairingentry (default on), likeallow_legacy_clients.No same-host check in this version: aiosendspin exposes no public peer address. A client cannot pair this way without the PSK, because the handshake fails, so the check would only stop other hosts from triggering the local fetch.
If a proxy is set via
HTTP(S)_PROXYwithoutNO_PROXYcovering172.30.32.1, the fetch goes through it, becausemass.http_sessionhonours proxy env vars.Depends on Sendspin/aiosendspin#586 (hello keeps
application_objects). Theaiosendspin[server]==10.2.1pin still has to be bumped once that is released; until then mypy fails in CI.Related issue (if applicable):
Types of changes
bugfixnew-featureenhancementnew-providerbreaking-changerefactordocumentationmaintenancecidependenciesChecklist
pre-commit run --all-filespasses.pytestpasses, and tests have been added/updated undertests/where applicable.music-assistant/modelsis linked.music-assistant/frontendis linked.