Skip to content
Draft
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
24cc7d1
Add WiiM provider
davidanthoff Dec 31, 2025
9ce0bbd
Merge branch 'dev' into da/wiim
davidanthoff Jan 7, 2026
c32db10
Fix a naming error in the WiiM provider
davidanthoff Jan 7, 2026
c06afbf
Update state more often for the WiiM player
davidanthoff Jan 7, 2026
97b397c
Store deps for WiiM provider in manifest.json
davidanthoff Jan 7, 2026
366f64b
Remove hard coded IP address in WiiM provider
davidanthoff Jan 7, 2026
2fe0211
Progress on the WiiM provider
davidanthoff Jan 7, 2026
7e1ae81
Improve WiiM device detection a bit
davidanthoff Jan 7, 2026
c1a4f34
Refactor WiiM provider a bit
davidanthoff Jan 7, 2026
7c9806e
Remove unneeded things from WiiM provider
davidanthoff Jan 8, 2026
5d4523b
Add play queue callback to WiiM provider
davidanthoff Jan 8, 2026
83ccbb9
Pass media meta info to WiiM player
davidanthoff Jan 8, 2026
9abf553
Propagate WiiM device media info to MA
davidanthoff Jan 8, 2026
2058a2a
Add source support to Wiim provider
davidanthoff Jan 19, 2026
4729ba0
Merge branch 'dev' into da/wiim
davidanthoff Jan 19, 2026
ac9fff9
Fix Wiim provider source handling
davidanthoff Jan 19, 2026
635ef36
Pin wiim depencendy for Wiim provider to custom branch
davidanthoff Jan 19, 2026
652da93
Update music_assistant/providers/wiim/manifest.json
davidanthoff Jan 20, 2026
da5d317
Use self.logger for Wiim provider
davidanthoff Jan 20, 2026
21ced87
Use didl feature from MA in Wiim provider
davidanthoff Jan 20, 2026
0677651
Update music_assistant/providers/wiim/provider.py
davidanthoff Jan 20, 2026
caf6787
Update music_assistant/providers/wiim/provider.py
davidanthoff Jan 20, 2026
35a7e3c
Adjust log levels for Wiim provider
davidanthoff Jan 21, 2026
e0857a0
Merge branch 'da/wiim' of https://github.com/davidanthoff/server into…
davidanthoff Jan 21, 2026
d6422f9
Set more media attributes in Wiim provider
davidanthoff Jan 22, 2026
0aabea9
Merge branch 'dev' into da/wiim
davidanthoff Feb 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions music_assistant/providers/wiim/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"""
Provider for WiiM speakers.

This package provides a Music Assistant provider implementation for WiiM speakers.
"""

from __future__ import annotations

from typing import TYPE_CHECKING

from music_assistant_models.enums import ProviderFeature

from music_assistant.constants import CONF_ENTRY_MANUAL_DISCOVERY_IPS

from .provider import WiimProvider

if TYPE_CHECKING:
from music_assistant_models.config_entries import ConfigEntry, ConfigValueType, ProviderConfig
from music_assistant_models.provider import ProviderManifest

from music_assistant.mass import MusicAssistant
from music_assistant.models import ProviderInstanceType

SUPPORTED_FEATURES = {
ProviderFeature.SYNC_PLAYERS,
}


async def setup(
mass: MusicAssistant, manifest: ProviderManifest, config: ProviderConfig
) -> ProviderInstanceType:
"""Initialize provider(instance) with given configuration."""
return WiimProvider(mass, manifest, config, SUPPORTED_FEATURES)


async def get_config_entries(
mass: MusicAssistant, # noqa: ARG001
instance_id: str | None = None, # noqa: ARG001
action: str | None = None, # noqa: ARG001
values: dict[str, ConfigValueType] | None = None, # noqa: ARG001
) -> tuple[ConfigEntry, ...]:
"""
Return Config entries to setup this provider.

instance_id: id of an existing provider instance (None if new instance setup).
action: [optional] action key called from config entries UI.
values: the (intermediate) raw values for config entries sent with the action.
"""
return (CONF_ENTRY_MANUAL_DISCOVERY_IPS,)
61 changes: 61 additions & 0 deletions music_assistant/providers/wiim/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
"""Constants for the WiiM Provider."""

from music_assistant_models.player import PlayerSource

SOURCE_LINE_IN = "line_in"
SOURCE_AIRPLAY = "airplay"
SOURCE_SPOTIFY = "spotify"
SOURCE_UNKNOWN = "unknown"
SOURCE_TV = "tv"
SOURCE_RADIO = "radio"

PLAYER_SOURCE_MAP = {
SOURCE_LINE_IN: PlayerSource(
id=SOURCE_LINE_IN,
name="Line-in",
passive=False,
can_play_pause=False,
can_next_previous=False,
can_seek=False,
),
SOURCE_TV: PlayerSource(
id=SOURCE_TV,
name="TV",
passive=False,
can_play_pause=False,
can_next_previous=False,
can_seek=False,
),
SOURCE_AIRPLAY: PlayerSource(
id=SOURCE_AIRPLAY,
name="AirPlay",
passive=True,
can_play_pause=True,
can_next_previous=True,
can_seek=True,
),
SOURCE_SPOTIFY: PlayerSource(
id=SOURCE_SPOTIFY,
name="Spotify",
passive=True,
can_play_pause=True,
can_next_previous=True,
can_seek=True,
),
SOURCE_RADIO: PlayerSource(
id=SOURCE_RADIO,
name="Radio",
passive=True,
can_play_pause=True,
can_next_previous=True,
can_seek=True,
),
SOURCE_UNKNOWN: PlayerSource(
id=SOURCE_UNKNOWN,
name="Unknown",
passive=True,
can_play_pause=True,
can_next_previous=True,
can_seek=True,
),
}
11 changes: 11 additions & 0 deletions music_assistant/providers/wiim/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions music_assistant/providers/wiim/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"type": "player",
"domain": "wiim",
"name": "WiiM",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"name": "WiiM",
"name": "WiiM",
”stage”: “beta”,

"description": "Stream music to WiiM devices.",
"codeowners": ["@davidanthoff"],
"requirements": ["wiim@git+https://github.com/davidanthoff/wiim.git@ma-branch", "python-didl-lite==1.5.0"],
"documentation": "https://music-assistant.io/player-support/demo/",
"mdns_discovery": ["_linkplay._tcp.local."]
}
Loading