Lovelace: Mini Media Player

I did not…

Sorry for the compete newb question I am having a hard time getting my spotify shortcut to work it just sits idle and does not function. All my radio functions work great.

I have copied my ID from using the copy account link in the spotify app and taking out the URL to get my ID not sure if this is the right way of getting correct spotify:user ID? For playlist I just did the same.

Any help is greatly appreciated really pulling my hair out with this :frowning:

- title: Kitchen Echo
        type: custom:mini-media-player
        shortcuts:
          columns: 2
          buttons:
            - type: custom
              name: Wild Country Radio
              id: play wild 95.3 on tunein
              icon: mdi:radio
            - type: custom
              name: Virgin Hits Radio
              id: play virgin 98.5 on tunein
              icon: mdi:radio
            - type: custom
              name: Todays Hits Radio
              id: play todays hits on tunein
              icon: mdi:radio
            - type: playlist
              name: Top 50 Spotify
              icon: mdi:spotify
              id: spotify:user:xxxxxxxxx:playlist:37i9dQZEVXbMDoHDwVN2tF

I have a weird behaviour when I select “Swap volume slider for buttons”
This adds volume_stateless: true at the bottom.
When I do this, only the master responds to volume up/down. When using the slider, all of the grouped SONOS speakers respond. I prefer the buttons, as it’s easier on a touch screen.

Any way to retain the last cover from spotify? when the device is idle the last cover dissapear

Hi everyone has any of you created a media player to manage Volumio?
If you haven’t made it but you have a card with a media player, could you share the code?
Thanks

I found it much easier to use iframe right to volumio web server. Much easier and full function.

1 Like
  1. add the integration (as @nickrout mentioned)

  2. create playlists from your volumio instance

  3. create buttons or pick your playlists (from the drop down list) of your music/web radio through the mini-media-player lovelace card:

type: custom:mini-media-player
entity: media_player.volumio_rpi3b
group: true
hide:
  controls: false
  volume: true
  power: true
artwork: material
volume_stateless: false
info: scroll
sound_mode: full
source: full

beware, that volumio goes to v.3 this month, so all of the above configuration might brake

Thank you best regards

Hi guys,

At present i am running Plex Media server on my RP4 on my HASS. So that i can enjoy multi speaker grouping that is found on my Sonos Speakers.

I have recently stumble upon Logitech Media Server and found that I was able to to run an Airplay Bridge inside LMS with that i can access and group my Sonos and Bose Speakers together for multi-room audio finally.

So what I have done below is moded my existing on my mini-media-player to enable the grouping.
I now face a small hurdle, i used to link all my Music on Plex with easy shortcuts to play an Album.
I would like to know how can this be shortcuts link be done now to point to LMS library instead?

Appreciate guidance from anyone… :slight_smile:

  - type: custom:mini-media-player
    hide:
      power: true
      icon: true
    speaker_group:
      platform: squeezebox
      show_group_count: true
      entities:
        - entity_id: media_player.sonos_living
          name: Living Speaker
        - entity_id: media_player.bose_sb700
          name: Bose Bedroom
        - entity_id: media_player.bose_sb300
          name: Bose Kitchen
        - entity_id: media_player.sonos_dining
          name: Dining Speaker
    shortcuts:
      columns: 3
      buttons:
        - type: music
          name: TMS
          id: >-
            plex://{ "library_name": "Music", "artist_name": "TMS",
            "album_name": "TMS" }
          icon: mdi:music

You’ll need to play around with the squeezebox.call_method service, which allows you to use the Command Line Interface offered by LMS. (For a very detailed technical description of what you can do using the LMS CLI, see http://<your-lms-server-ip>:9000/html/docs/help.html).

For example, this should load (and play) an "<artist>" and "<album>" of the given "<genre>". You can leave any of these options blank by sending an * instead:

buttons:
  - type: service
    id: squeezebox.call_method
    data:
       entity_id: media_player.xxxxx
       command: playlist
       parameters: ["loadalbum", "<genre>", "<artist>", "<album>"]

You can replace loadalbum with addalbum if you don’t want to overwrite your existing playlist - it adds the tracks to the end of the playlist. Use insertalbum to add the album as the next item on the playlist.

I’m afraid I’m not familiar with how this card handles groups, so you may have to adapt the entity_id: parameter to suit your needs (I use the squeezebox.sync service to group my players rather than through the card), but I assume if the players are synced/grouped within LMS, then sending the album to just one of the players is sufficient to get it playing on all of them?

Thanks Chris,

I would give this option a try and see if i can get it working, looks much easier.

After much searching, I try to come out with a solution after looking through various forum posts and taking those concepts in.

I created a m3u playlist for all the songs i wanted to be in my Album using VLC. i then open the m3u file on text editor and ensured that the path that i am referencing my mp3s inside my HA media folder is correct.

Next i found this script in the forum to do a service call to play the playlist.

service: squeezebox.call_method
data:
  command: playlist
  parameters:
    - play
    - /media/Playlist/{{ playlist_name }}.m3u
target:
  entity_id: media_player.{{ squeezebox_player }}

Inside my mini-media-player i get the shortcuts program to launch the script with the appropriate value.

      buttons:
        - name: Jukebox
          icon: mdi:music
          type: script
          id: script.Test_Playlist
          data:
            squeezebox_player: dining_speaker
            playlist_name: Jukebox_Songs

Its a long step to get things done but it still works. I give a try on your code and let you know how it turned out.

Your code works perfectly… :sweat_smile: :joy:

@pdefoy my devices keep going into standby and the media player card’s entities like volume will show an old state. For example, the cover image which should show the cover for the music currently playing it instead shows the cover from music that played an hour earlier or even a day earlier. Have you had that problem and if so do you know of a solution?

Hi Guys,

I have the following setup below grouping range of Bose and Sonos speakers via squeezebox.

As shown below in my code, can I know how can i use a conditional card to hide the volume controls for each entity that is not part of the group.?

type: vertical-stack
cards:
  - type: custom:mini-media-player
    info: short
    hide:
      power: true
      icon: true
    speaker_group:
      platform: squeezebox
      sync_volume: true
      show_group_count: false
      entities:
        - entity_id: media_player.dining_speaker
          name: Dining Speaker
        - entity_id: media_player.bose_hall
          name: Bose Hall
        - entity_id: media_player.bose_kitchen
          name: Bose Kitchen
        - entity_id: media_player.sonos_speaker2
          name: Sonos Speaker
    artwork: cover
    name: Dining Speaker
    runtime_remaining: true
    entity: media_player.dining_speaker
  - type: custom:mini-media-player
    name: Bose Hall
    group: true
    hide:
      controls: true
      info: true
    icon: mdi:speaker
    entity: media_player.bose_hall
  - type: custom:mini-media-player
    name: Bose Kitchen
    group: true
    hide:
      controls: true
      info: true
    icon: mdi:speaker
    entity: media_player.bose_kitchen
  - type: custom:mini-media-player
    name: Dining Speaker
    group: true
    hide:
      controls: true
      info: true
    icon: mdi:speaker
    entity: media_player.dining_speaker
  - type: custom:mini-media-player
    name: Sonos
    group: true
    hide:
      controls: true
      info: true
    icon: mdi:speaker
    entity: media_player.sonos_speaker2

how can i use a conditional card to hide the volume controls for each entity that is not part of the group.?

@ thanasegar

No I haven’t had that issue.
Can’t help sotry

@kalkih are you working on getting Google Home/Nest clients working in the Speaker Group Management? If yes, how far is dev? If not, is it something that you have a plan with? :slight_smile:

If it for some reason already works, and Im the idiot behind the curtain, can you enlighten me on how to get it to work? :slight_smile:

Regards

3 Likes

I still have issues with icons not visible. I have v1.15 and 2021.11.5. I have reset the cache again and again. The icons will appear for a short period of time and then disappear. I reset the cache on chrome and the iPhone HA companion app. What am I doing wrong? Any help much appreciated!!

Has anyone managed to group several Bose Soundtouch speakers just like Sonos? I saw the squeezebox solution which is fine for my own collection but am also using spotify for my source?