Music Assistant 2.0: Your Music, Your Players

I installed add on and everything works except streaming :crazy_face:
I have configured chromecast players (chromecast itself and onkyo amplituner) and playing either silently fails or doesnā€™t start at all. How to troubleshoot it?
I can stream to those devices from mobiles and laptopā€¦

Hey i hope someone can help me with a question :smile: I am using Music Assistant with the integrated Snapserver and multiple Snapclients.

I created a Snapcast Group (not a Universal Group) in the Music Assistant GUI and it is working mainly without problems to sync music across the players.
I also can use the media_player.turn_on/turn_off feature to play only on the players i want playback on.

I donā€™t know if it is a Snapcast specific thing or with all player providers but it seems the groups have a Group Leader. You can see it in the state of the players:

media_player.group_player:
attributes:
    group_members: ma_b827eb89ad15, ma_b827eb3a185f, ma_b827eb5abfbb

media_player.first_player:
attributes:
    group_members: ma_b827eb89ad15, ma_b827eb3a185f
    mass_player_id: ma_b827eb89ad15
    group_leader: null

media_player.second_player:
attributes:
    group_members: ma_b827eb89ad15, ma_b827eb3a185f
    mass_player_type: player
    group_leader: ma_b827eb89ad15

media_player.third_player:
attributes:
    group_members: 
    mass_player_id: ma_b827eb5abfbb
    group_leader: null

So here first_player and second_player are playing and third_player is off.
The first_player is also the group_leader.

So now to the problem:
I can turn_off second_player no problem and i could also join the third_player if i wanted with media_player.join.
But i canā€™t seem to turn of first_player (the group_leader) without stopping playback on all other players.
Is there like a way to transfer ownership of the queue/group (without resetting to the start of the queue) before turning that player off? Or is it maybe just snapcast specific and there is like a workaround you can use?

I have looked around but it seems the problem has not come up yet for someone else yet :smile:

For me it was my network configuration that gave me problems with Google Cast devices :smile:

The Cast devices need to be able to reach the Music Assistant Server (with the Addon it is the IP of Home Assistant itself) and specifically Port 8096 and upwards.

You can also set the log level of a specific provider with Settings - Chromecast in your case under Player Provider - Advanced Settings - Log Level to get more Log Infos :smile:

1 Like

Thanks! Increasing log verbosity was bullseye! I had wrong IPā€™s binding left - came from the time when I had multiple interfacesā€¦

Using the join service call and grouping through the UI will result in different behaviour User Interface - Music Assistant Not sure sure if you are having problems because you are mixing the methods?

Thank you sorry i missed that part in the documentation :smile:
Although it seems to behave the same in the UI for me.
When i turn off the player flagged as Leader (from HA Integration Status as i think the MA UI has no indication) it stops playback on all devices and sets the Speaker Group Status to idle both in the MA UI and in HA.
Is that the expected behaviour? :smile:

The Snapcast dev is taking a look

1 Like

I am so much celebrating this right now. I have my local music collection in a self-hosted Nextcloud instance and wondered how I can make it available to Sonos etc (which only supports NAS, which might have become complicated).
However, I discovered that the Nextcloud Music app I have been using for some time provides two APIs, one of which (Subsonic) is supported by Music Assistant. Using the Subsonic music provider, it was so easy to hook them up, and now I can play music directly from my Nextcloud to the speakers. I love it.
Thanks for supporting open source APIs!

5 Likes

Music Assistant is fantastic. I want to create a direct link to Music Assistant running as an Add-on in HA Core, so it opens in its own browser window without the rest of Home Assistant visible - just for playing music. I cannot figure out how to do this.

Iā€™ve tried to set up a link using https://my.home-assistant.io but I canā€™t figure out how to refer to the addon - music-assistant, the add-on slug music_assistant or the host name displayed on the add-on page donā€™t work. Anyway, Iā€™m not sure this would be the best way to reach the add-on since there is an intermediary page with my.home-assistant.io.

How can I work out the right URL to get straight into Music Assistant?

Figured it out:
Go into Music Assistant in HA. Settings > Core > Web Server then enable. It is then reachable on port 8095 at my HA local address - e.g. http://home-assistant:8095.

Happy days!

2 Likes

This is why I need to abandon the project for now. I cannot rename my album folders to match the album tags as how would I have multiple copies of Dark Side of the Moon together under Pink Floyd? i.e. my original CD, 20th anniversary, 30th anniversary, 50th anniversary editions currently sit side by side. Or Peter Gabrielā€™s first four albums are all called Peter Gabriel.

It would be better if the media player can just pick up the cover.jpg from the same location as it finds the music files, no matter the name of the folder. Kinda like most other media players do. From old Winamp to my mobile phones it is a system that has been pretty consistent.

1 Like

I agree, if LMS can pick up my 286G of music in a matter of minutes from the tags and standard named files like cover.jpg, then why canā€™t MA?

Why is it going to the internet to scrape at all?

2 Likes

This isnā€™t scraping from the Internet. The current requirement for folder naming to match album name is being discussed.

1 Like

Well what is it that you had to rate limit?

Anyway, the metadata is in the tags, not in the folder name.

1 Like

Rate limits were applied to all calls for information that were not already supplied by tags, nfo files, local imagery etc.

Well it seems stupid unfortunate that lms can get it right while ma canā€™t. Perhaps I am just a moaner. :slight_smile:

1 Like

Please try beta 9 when it drops. Some changes have been made.

2 Likes

LMS exists for 25 years and we are just getting started. Bugs need time to be reported and fixed. Also be aware that the architecture of LMS is completely different than MA where LMS started with local files and later added (halfbaken) support for streaming providers, we started with a provider concept from the beginning.

We are working our way through all requests and edge cases so this will be improved step by step. One of the bugs was that it didnā€™t correctly detect the parent folder of the music files so it was not picking up the artwork and metadata within the folder in some cases.

You can imagine an error like that causing a snowball effect, metadata absent = triggering the fallback scraping which in turn is rate limited etc.

Like I said, give constructive feedback and Iā€™m pretty sure weā€™ll work our way through the issues and make it better than LMS at some point :wink:

If that is not the case for you, that is also fine. For me personally MA is already way better than LMS (and yes I used both LMS and Roon for years) but I guess everyone has their own usecases. Iā€™m for example not using local files that much anymore and more streaming.

3 Likes

Thank you for your reply @marcelveldt . I think MA is a great project. I was disappointed when I tried it, spouse acceptance dropped sharply. This was mainly due to difficulty with metadata.

As I said, I have a lot of music files. I really donā€™t want to change anything in my music storage.

I am thinking of spinning up another VM of HAOS to test MA more thoroughly, then Iā€™ll hopefully become a more useful member of the MA community.

4 Likes

@marcelveldt while I have your attention, this screenshot shows an annoyance. 2 similar update notifications, one for the addon, one for the integration. It is very difficult to tell which is what. Itā€™s as much a HA annoyance as a MA one.

I just got around to installing this and it seems to be working. I donā€™t use HAOS, my HA Core is in a container and I installed MA in a container. They seem to be connected but should I be seeing anything in HA other than the integration? I have the HACS package installed. However when I try, in MA, to setup HA as a provider, after entering my HA URL and then my credentials, all I get is a spinning cursor and nothing happens. Any ideas on what would cause this issue?

to clarify this is from MA Settings > Plugin Providers. Select Home Assistant, enter the HA URL and click (Re)Authenticate Home Assistant. That popups up the HA login dialog, I enter my credentials and then just get a spinning circle.