Lovelace: Mini Media Player

So ive come across something i have no idea how to make, dont know if its best done within regard to this addon or not.

Id like to be able to resume whatever’s playing on alexa on my “multi room music”-groups on the tap of a button. Any ideas?

how can I get this card to display the artwork in box rather than the background from a .m3u stream via my MPD player?

also - how can I display a list ALL items in the playlist underneath?

any ideas appreciated

Is Google speaker groups likely to happen at any point like the Sonos works?

Not sure, I’m not familiar with alexa, so not sure how groups works but if they are similar to google cast you might be able to just call media_player.media_play on the alexa group entity.

Edit, maybe check with the guys/gals over at alexa_media_player

Check the artwork option, artwork: full-cover, should work as long as the MPD component picks up the artwork from the streams metadata.

Sorry, not sure what you mean, the shortcuts option? what items do you wanna list?

Not sure how likely it is but I’m a huge google cast user and would love dynamic cast groups as well!

See this answer, same goes for the cast component.

So If dynamic group management gets implemented to the cast component I’ll make sure to add support for it in this card.

I would suggest opening a feature request in the feature request forum section, since it’s a core HA component.

1 Like

Is it possible to use this without a ui-lovelace.yaml config for lovelace? I would like to use the ui configuration method for lovelace.

Sorry if this is answered, I did search!

You just add the resources using the raw edit mode - there is no difference in functionality between different lovelace methods.

Now that I have figured out where to access raw edit mode, your post makes sense, and has solved the problem. And it also makes sense of your answer in the other thread I posted this evening regarding lovelace. Many thanks.

For non-core cards like this one you can add them in the GUI editor OR the raw editor too. You have to add the resources in the raw editor but to add the card, you can add a manual card in the GUI editor and then cut/paste the card config… or use yaml or the raw editor. The end result is the same.

Yep I am getting the hang of it now :slight_smile:

1 Like

I figured it out - something like this. Is there anyway to add square thumb images to the buttons? how would you achieve that?

26

This card is great - thank you

1 Like

Not possible, I would recommend checking out the custom button card for more advanced button use cases.

1 Like

EDIT: Turns out I was trying to add buttons to the custom card type, not the media_player.spotify card.
Will continue to troubleshoot, unless someone has already got yaml for similar…


I seem to be getting myself confused, got the grouping (Google Home / Home Minis) setup ok, but looking to add buttons for Spotify playlists to play on the group.

Using the example doesn’t seem to work - although I’ve also only just set up the Spotify component so that may be where the issue lies…

type: entities
entities:
  - type: 'custom:mini-media-player'
    entity: media_player.home_group
    group: true
    source: full
    info: scroll
    hide:
      progress: true
      volume: true
      power: true
    shortcuts:
      columns: 2
      buttons:
        - icon: 'mdi:cat'
          type: playlist
          id: 'spotify:user:spotify:playlist:37i9dQZF1DWXJGulibxRbg'
        - icon: 'mdi:dog'
          type: playlist
          id: 'spotify:user:spotify:playlist:37i9dQZF1DZ06evO2O09Hg'
  - type: 'custom:mini-media-player'
    entity: media_player.kitchen_speaker
    group: true
    hide:
      controls: true
      progress: true
      info: true
      icon: true
  - type: 'custom:mini-media-player'
    entity: media_player.study_speaker
    group: true
    hide:
      controls: true
      progress: true
      info: true
      icon: true
  - type: 'custom:mini-media-player'
    entity: media_player.wine_speaker
    group: true
    hide:
      controls: true
      progress: true
      info: true
      icon: true

Capture
(image shows it already playing from asking GH to play music)

1 Like

Hi @kalkih this card is great thanks for your efforts. Do you have plans to implement the ability to directly input a URL to play? I have created buttons for internet radio etc and have successfully setup a script as a button. The script calls media_extrator.play_media which allows me to play youtube videos to my audio only devices / chromecasts.

I see you’ve implemented to ability to pass variables to the scripts which is great, but in this case I want to input the URL directly from the card.

Would this be something you’d be interested in implementing?

I would imagine it would be an optional input field which just passes the entered URL to the media_extractor.play_media service. Here is the script which I’ve been using.

test:
alias: Test2
sequence:

Spotify uri´s are not supported by the cast component (cast devices) unfortunately, you could however utlilize this component Spotcast - custom component to start playback on an idle chromecast device to start spotify playback on desired cast device/group.

Since the shortcuts in this card doesn’t support service calls (yet), You’d have to create a simple script with variables for uri & device which calls the spotcast service, then use this script in the mini-media-player shortcut buttons with the uri & device fed through the shortcut data option.

Thanks!
Don’t think this is something i’ll ever add to the card unfortunately, mostly because it can be achieved fairly easy already thanks to the flexibility of lovelace, an input_text, a button and a script and you’re ready. You could even utilize a mini-media-player shortcut button to trigger the script.

Yeah ok no worries. I have a button triggering the script but the URL is statically configured on the back end so was just checking if this was something ‘coming soon’ before looking for alternatives.

Thanks for the quick response!

@kalkih is it possible to implement speaker grouping for squeezebox?

1 Like

I’m not familiar with squeezebox so can’t say, but yeah, it’s not available in the squeezebox component.

So i’d need to replicate the sonos service sonos.join and sonos.unjoin?

Basically, yes.
It has to be supported in the backend in order for me to add support for it in the card,

But I’m not even sure if squeezebox has official multiroom support to begin with? If it doesn’t, it could be quite tricky/impossible to implement.

Oh yes it does! In the docs it is referred to as synchronisation. Basically any players synched together will play the same media, and you can control from any player, or over the API or web page. Works very well, and did long before sonos was even a thing.

1 Like