Add Yandex Station player provider#3605
Open
trudenboy wants to merge 81 commits intomusic-assistant:devfrom
Open
Add Yandex Station player provider#3605trudenboy wants to merge 81 commits intomusic-assistant:devfrom
trudenboy wants to merge 81 commits intomusic-assistant:devfrom
Conversation
Contributor
🔒 Dependency Security Report📦 Modified Dependencies
|
| Name | Skip Reason |
|---|---|
| torch | Dependency not found on PyPI and could not be audited: torch (2.11.0+cpu) |
| torchaudio | Dependency not found on PyPI and could not be audited: torchaudio (2.11.0+cpu) |
| ✅ 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.
…th, voice control
57ce2b1 to
5895b4d
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Yandex Station player provider to Music Assistant, enabling local playback/control on Yandex smart speakers via the Glagol WebSocket protocol, including discovery and authentication flows.
Changes:
- Introduces the
yandex_stationplayer provider (discovery via Quasar + mDNS, local Glagol WebSocket control, queue playback viaradio_playbypass). - Adds Yandex authentication helpers (QR flow + cookies fallback) and an HTTP session wrapper for token/cookie/CSRF handling.
- Adds a minimal protobuf wire encoder/decoder plus basic unit tests for protobuf roundtrips.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| music_assistant/providers/yandex_station/init.py | Provider setup + config entries (QR/cookies auth actions, token storage). |
| music_assistant/providers/yandex_station/constants.py | Provider constants for config keys and API/WS endpoints. |
| music_assistant/providers/yandex_station/glagol.py | Glagol local WebSocket client (connect/reconnect, command send/receive, updates). |
| music_assistant/providers/yandex_station/icon.svg | Provider icon asset. |
| music_assistant/providers/yandex_station/manifest.json | Provider manifest (player provider metadata + mDNS discovery type). |
| music_assistant/providers/yandex_station/player.py | Player implementation (transport controls, play_media via bypass, state updates, voice-control logic). |
| music_assistant/providers/yandex_station/protobuf.py | Minimal protobuf encode/decode helpers for externalCommandBypass. |
| music_assistant/providers/yandex_station/provider.py | Provider discovery/lifecycle (Quasar discovery + mDNS updates, player creation). |
| music_assistant/providers/yandex_station/quasar.py | Quasar cloud API client for device discovery and config enrichment. |
| music_assistant/providers/yandex_station/session.py | HTTP session wrapper (token refresh, cookie/CSRF management, throttling). |
| music_assistant/providers/yandex_station/yandex_auth.py | QR + cookies authentication flows to obtain x_token/music_token. |
| tests/providers/yandex_station/init.py | Test package marker for provider tests. |
| tests/providers/yandex_station/test_protobuf.py | Unit tests for protobuf dumps/loads behavior. |
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.
Yandex Station Player Provider
Source: trudenboy/ma-provider-yandex-station — synced from v1.4.12.
Adapted from AlexxIT/YandexStation (MIT license).
Play music on Yandex Station smart speakers via the local Glagol WebSocket protocol, with an optional reverse-direction "intercept" mode that redirects native Station playback to another MA player.
Related PRs
Dependencies
ya-passport-auth==1.3.0— Yandex Passport authentication (Device Flow, QR login, cookie login, token refresh, device tokens)Features
Core
externalCommandBypass/radio_play_yandexio._tcp.local.)Authentication (via ya-passport-auth)
Transport Controls
Playback
radio_playwith unreachable URL (fully local, no cloud)Announcements
Voice Control (Experimental, off by default)
Intercept Mode (Experimental, off by default — new in v1.4.0)
Redirects native Station playback to a configured target MA player. When the Station starts native Yandex Music playback (typically via an Alice voice command, but also via a touch on the Station UI), the provider:
yandex_musicMA music provider.Volume / seek / pause / Alice-speech mirror from the Station to the target while intercept is active.
Gated by two switches (both default OFF):
intercept_feature_enabled).intercept_enabled) + target dropdown filtered by required features (PLAY_MEDIA,PAUSE,VOLUME_SET,SEEK).Hardened across four review rounds (PR #45 in source repo) for: serialised dispatch under
_intercept_lock, debounced failure paths, target availability pre-validation, self-stop window, seek baseline anchored at play-start, idempotent Alice-pause, and decoupled session/debounce cleanup.Architecture
__init__.pysetup(),get_config_entries()— Device Flow / QR / cookies auth actions, remember-session toggle, intercept master switchprovider.pyplayer.pyplay_media()viaradio_play, announcements, voice-control, intercept dispatch and mirroringglagol.pyquasar.pysession.pyPassportClientauth.pyrefresh_music_token/refresh_credentials_via_passport/validate_x_tokenprotobuf.pyexternalCommandBypassconstants.pyChanged files
music_assistant/providers/yandex_station/__init__.pymusic_assistant/providers/yandex_station/auth.pymusic_assistant/providers/yandex_station/constants.pymusic_assistant/providers/yandex_station/glagol.pymusic_assistant/providers/yandex_station/icon.svgmusic_assistant/providers/yandex_station/manifest.jsonmusic_assistant/providers/yandex_station/player.pymusic_assistant/providers/yandex_station/protobuf.pymusic_assistant/providers/yandex_station/provider.pymusic_assistant/providers/yandex_station/quasar.pymusic_assistant/providers/yandex_station/session.pytests/providers/yandex_station/__init__.pytests/providers/yandex_station/test_auth.pytests/providers/yandex_station/test_intercept.pytests/providers/yandex_station/test_player_state.pytests/providers/yandex_station/test_protobuf.pytests/providers/yandex_station/test_provider_cascade.pyTotal: 17 files, +5286 / -0 lines.
Tests (101 total)
_on_glagol_update