hass-music-assistant icon indicating copy to clipboard operation
hass-music-assistant copied to clipboard

Add support for Universal Media player

Open erkr opened this issue 2 years ago • 3 comments

The Universal media player is now working as a source for MA. But I noted some issues. My universal media player wrapped a normal Chromecast, where mainly power is redirected to a power plug.

The issues: Minor: Name in MA is the entity_id , not the (friendly) name as defined in the template Bug: after the first MA reload the mass player became unavailable, this was not fixed after a restart or unhide

image

erkr avatar Jun 19 '22 14:06 erkr

In 2022.6.4, the unavailability problem is solved. More testing I now only have the child players wrapped in the universal media player, the group player is still the real one! Results:

  • Adopting the name of the source is not solved.
  • Mute now works independently for power :-)
  • When streaming to the real CC group: The child players have the right states, BUT no media art; This will be the result of MA not recognizing the relation between these players. As I cast to a real CC group
  • Casting to a universal media player doesn't work. See only a warning in the log. The media art appears in the MA player, but pressing play doesn't start
Logger: music_assistant.players.stream
Source: /usr/local/lib/python3.9/site-packages/music_assistant/controllers/streams.py:383
First occurred: 17:14:55 (1 occurrences)
Last logged: 17:14:55

Abort: client(s) did not connect within 10 seconds.

erkr avatar Jun 20 '22 15:06 erkr

Using a Universal player as player in Music Assistant is not possible. In the beta version for MA 2022.8 I've even added it to the blacklist to prevent people from using it as it can cause serious side effects due to the "wrapped" nature of the universal player.

I am going to try to add support later but my first attempt to do so failed so it needs more thinking. I may fix this for the final 2022.8 version of MA but it may also take me longer or never at all if I keep hitting too many roadblocks.

marcelveldt avatar Aug 03 '22 06:08 marcelveldt

I will stop using it for now as suggested, but just to make the 'buglist' complete, for me the unavailable issue is also still there (the OP says it is fixed for him).

sophof avatar Aug 11 '22 11:08 sophof

@erkr do you know where this is at?

OzGav avatar Apr 21 '23 21:04 OzGav

I close this issue as it was very specific for MAv1. Marcel promised to have some options on using other HA entities for volume or power control in the new HA integration.

erkr avatar Apr 23 '23 12:04 erkr