Lovelace: Mini Media Player

Never mind. Of course I figured it out 15 minutes after posting. For some reason, installing the module didn’t create the correct dashboard resource (which you can only see if you click on your name at the bottom left and enable advanced mode). It should have been /local/mini-media-player-bundle.js?hacstag=1485208381165, but instead it was /hacsfiles/mini-media-player/mini-media-player-bundle.js?hacstag=1485208381165. Dunno how that happened, but I’m good now.

1 Like

HACS uses that as an alias to detect what it installed and it points to the same location on disk. I think you just had a caching issue. Always clear your cache first with such strange issues.

Can anyone help me?

Hello

image

Is it possible to change the size of the shortcut image?

.mmp-shortcuts__button > div > img {
    height: 24px;

to height: 50px;

You already asked this.

Hi there,

i am struggling big time to get art/cover shown. I have checked my music files - their ID3 Tag includes the Cover and in the ID3Tagging App these covers are shown … i checked the Folder containing the albums … each one has a cover.jpg.
As all my music files are on my Synology (mount via System/Network as Media) i copied for a test a mp3 file with the cover.jpg to the local media folder.

But i can’t get any cover to be shown. Same when i choose Internet Radio.

For the last test i used the code from karaminder :

type: custom:state-switch
entity: media_player.soundstation_livingroom
states:
  unavailable:
    type: vertical-stack
    cards:
      - type: custom:mini-media-player
        entity: media_player.soundstation_livingroom
        group: true
        info: scroll
        idle_view:
          when_idle: true
          when_paused: true
          when_standby: true
          after: 5
        hide:
          name: true
          power: true
          controls: true
          prev: true
          next: true
          play_pause: true
          play_stop: true
          jump: true
          volume: true
          volume_level: true
          mute: true
          progress: true
          icon_state: true
          state_label: true
        card_mod:
          style: |
            ha-card { --ha-card-background: rgba(0, 0, 0, 0); 
                      --ha-card-box-shadow: none; }
  'off':
    type: vertical-stack
    cards:
      - type: custom:mini-media-player
        entity: media_player.soundstation_livingroom
        group: true
        name: HomePod Mini
        idle_view:
          when_idle: true
          when_paused: true
          when_standby: true
          after: 5
        hide:
          name: false
          power: false
          controls: true
          prev: true
          next: true
          play_pause: true
          play_stop: true
          jump: true
          volume: true
          volume_level: true
          mute: true
          progress: true
          icon_state: false
          state_label: false
        card_mod:
          style: |
            ha-card { --ha-card-background: rgba(0, 0, 0, 0); 
                      --ha-card-box-shadow: none; }
  standby:
    type: vertical-stack
    cards:
      - type: custom:mini-media-player
        entity: media_player.soundstation_livingroom
        group: true
        name: HomePod Mini
        idle_view:
          when_idle: true
          when_paused: true
          when_standby: true
          after: 5
        hide:
          power: true
          controls: true
          prev: true
          next: true
          play_pause: true
          play_stop: true
          jump: true
          volume: true
          volume_level: true
          mute: true
          progress: true
          icon_state: false
          state_label: false
        card_mod:
          style: |
            ha-card { --ha-card-background: rgba(0, 0, 0, 0); 
                      --ha-card-box-shadow: none; }
  idle:
    type: vertical-stack
    cards:
      - type: custom:mini-media-player
        entity: media_player.soundstation_livingroom
        group: true
        name: HomePod Mini
        idle_view:
          when_idle: true
          when_paused: true
          when_standby: true
          after: 5
        hide:
          power: true
          controls: true
          prev: true
          next: true
          play_pause: true
          play_stop: true
          jump: true
          volume: true
          volume_level: true
          mute: true
          progress: true
          icon_state: false
          state_label: false
        card_mod:
          style: |
            ha-card { --ha-card-background: rgba(0, 0, 0, 0); 
                      --ha-card-box-shadow: none; }
  paused:
    type: vertical-stack
    cards:
      - type: custom:mini-media-player
        entity: media_player.soundstation_livingroom
        group: true
        artwork: full-cover-fit
        scale: '1'
        hide:
          name: true
          icon: true
          info: true
          power: true
          source: true
          sound_mode: true
          controls: true
          prev: true
          next: true
          play_pause: true
          play_stop: true
          jump: true
          volume: true
          volume_level: true
          mute: true
          progress: true
          runtime: true
          runtime_remaining: true
          artwork_border: true
          power_state: true
          icon_state: true
          shuffle: true
          repeat: true
          state_label: true
        card_mod:
          style: |
            ha-card { --ha-card-background: rgba(0, 0, 0, 0); 
                      --ha-card-box-shadow: none; }
      - type: custom:mini-media-player
        entity: media_player.soundstation_livingroom
        group: true
        scale: '1.5'
        hide:
          name: true
          icon: true
          info: true
          power: true
          source: true
          sound_mode: true
          controls: true
          prev: true
          next: true
          play_pause: true
          play_stop: true
          jump: true
          volume: true
          volume_level: true
          mute: true
          progress: false
          runtime: true
          runtime_remaining: true
          artwork_border: true
          power_state: true
          icon_state: true
          shuffle: true
          repeat: true
          state_label: true
        card_mod:
          style: |
            ha-card { --ha-card-background: rgba(0, 0, 0, 0); 
                      --ha-card-box-shadow: none; }
      - type: markdown
        group: true
        content: >
          <center>

          <b>{{ state_attr('media_player.soundstation_livingroom','media_title')
          }}</b><br>

          {{ state_attr('media_player.soundstation_livingroom','media_artist') }}<br>

          </center>
        card_mod:
          style: |
            ha-card { font-size: 1.25em !important;
                      --ha-card-background: rgba(0, 0, 0, 0); 
                      --ha-card-box-shadow: none; 
                      --ha-card-border-width: 0; }
      - type: custom:mini-media-player
        entity: media_player.soundstation_livingroom
        group: true
        scale: 1.5
        hide:
          name: true
          icon: true
          info: true
          power: true
          source: true
          sound_mode: true
          jump: true
          volume: true
          volume_level: true
          mute: true
          progress: true
          runtime: true
          runtime_remaining: true
          artwork_border: true
          power_state: true
          icon_state: true
          shuffle: true
          repeat: true
          state_label: true
        card_mod:
          style: |
            ha-card { --ha-card-background: rgba(0, 0, 0, 0); 
                      --ha-card-box-shadow: none; }
      - type: custom:mini-media-player
        entity: media_player.soundstation_livingroom
        group: true
        scale: 1
        hide:
          name: true
          icon: true
          info: true
          power: true
          source: true
          sound_mode: true
          prev: true
          next: true
          play_pause: true
          play_stop: true
          jump: true
          progress: true
          runtime: true
          runtime_remaining: true
          artwork_border: true
          power_state: true
          icon_state: true
          shuffle: true
          repeat: true
          state_label: true
        card_mod:
          style: |
            ha-card { --ha-card-background: rgba(0, 0, 0, 0); 
                      --ha-card-box-shadow: none; }
    card_mod:
      style: |
        ha-card {
          aspect-ratio: 1 / 1;
        }
  playing:
    type: vertical-stack
    cards:
      - type: custom:mini-media-player
        entity: media_player.soundstation_livingroom
        group: true
        artwork: full-cover-fit
        scale: '1'
        hide:
          name: true
          icon: true
          info: true
          power: true
          source: true
          sound_mode: true
          controls: true
          prev: true
          next: true
          play_pause: true
          play_stop: true
          jump: true
          volume: true
          volume_level: true
          mute: true
          progress: true
          runtime: true
          runtime_remaining: true
          artwork_border: true
          power_state: true
          icon_state: true
          shuffle: true
          repeat: true
          state_label: true
        card_mod:
          style: |
            ha-card { --ha-card-background: rgba(0, 0, 0, 0); 
                      --ha-card-box-shadow: none; }
      - type: custom:mini-media-player
        entity: media_player.soundstation_livingroom
        group: true
        scale: '1.5'
        hide:
          name: true
          icon: true
          info: true
          power: true
          source: true
          sound_mode: true
          controls: true
          prev: true
          next: true
          play_pause: true
          play_stop: true
          jump: true
          volume: true
          volume_level: true
          mute: true
          progress: false
          runtime: true
          runtime_remaining: true
          artwork_border: true
          power_state: true
          icon_state: true
          shuffle: true
          repeat: true
          state_label: true
        card_mod:
          style: |
            ha-card { --ha-card-background: rgba(0, 0, 0, 0); 
                      --ha-card-box-shadow: none; }
      - type: markdown
        group: true
        content: >
          <center>

          <b>{{ state_attr('media_player.soundstation_livingroom','media_title')
          }}</b><br>

          {{ state_attr('media_player.soundstation_livingroom','media_artist') }}<br>

          </center>
        card_mod:
          style: |
            ha-card { font-size: 1.25em !important;
                      --ha-card-background: rgba(0, 0, 0, 0); 
                      --ha-card-box-shadow: none; 
                      --ha-card-border-width: 0; }
      - type: custom:mini-media-player
        entity: media_player.soundstation_livingroom
        group: true
        scale: 1.5
        hide:
          name: true
          icon: true
          info: true
          power: true
          source: true
          sound_mode: true
          jump: true
          volume: true
          volume_level: true
          mute: true
          progress: true
          runtime: true
          runtime_remaining: true
          artwork_border: true
          power_state: true
          icon_state: true
          shuffle: true
          repeat: true
          state_label: true
        card_mod:
          style: |
            ha-card { --ha-card-background: rgba(0, 0, 0, 0); 
                      --ha-card-box-shadow: none; }
      - type: custom:mini-media-player
        entity: media_player.soundstation_livingroom
        group: true
        scale: 1
        hide:
          name: true
          icon: true
          info: true
          power: true
          source: true
          sound_mode: true
          prev: true
          next: true
          play_pause: true
          play_stop: true
          jump: true
          progress: true
          runtime: true
          runtime_remaining: true
          artwork_border: true
          power_state: true
          icon_state: true
          shuffle: true
          repeat: true
          state_label: true
        card_mod:
          style: |
            ha-card { --ha-card-background: rgba(0, 0, 0, 0); 
                      --ha-card-box-shadow: none; }
    card_mod:
      style: |
        ha-card {
          aspect-ratio: 1 / 1;
        }

and i am getting all but the cover :frowning:

any help is much appreciated.

This has been mentioned before in this thread. I have deleted my cache, tried reloading the integration. The GUI still doesn’t work for me. I am now stumped.

Feel free to point out where you said it. I could’ve missed it.

What integration? This is a custom card.

EDIT: Remove incorrect quote.

What integration is that media player? What are its attributes when playing?

Thank you nick,

its a up2stream pro.
Where/how to get the attributes?

thats the integration GitHub - nagyrobi/home-assistant-custom-components-linkplay: LinkPlay based media devices integration for Home Assistant. Supports multiroom, Media Browser, and snapshot and restore functionality for TTS. Compatible with Mini Media Player card.

Yes but which integration does it use? One of these Integrations - Home Assistant (or maybe a custom integration)

To get it’s attributes go to your dev tools and click on states, or in fact click here Open your Home Assistant instance and show your state developer tools.

Use the filter to get your media_player.soundstation_livingroom and the attributes will be in the right hand panel like this

Hi,

so the integration is linkplay based media devices (see my last post). I had to put :smiley:

media_player:
    - platform: linkplay
      host: 192.168.x.x
      name: Soundstation Livingroom
      icecast_metadata: 'StationNameSongTitle'
      multiroom_wifidirect: False
      sources: 
        {
          'optical': 'TV sound', 
          'bluetooth': 'Bluetooth',
          'udisk': 'USB stick',
          'http://94.199.183.186:8000/jazzy-soul.mp3': 'Jazzy Soul',
        }

in my configuration.yaml.

here are the attributes (idle):

and here with Internet radio playing :

thank you for your help

That integration doesn’t seem to provide an entity_picture attribute.

Do you see an image in the standard media control card? Media Control Card - Home Assistant

nope … i have the player also as HA-DLNA player but there is also no image aswell no entity_picture entry

i found something related to the picture entity and the linkplay integration : Pass by url the entity_picture attribute of a media player

i can´t figure it out how that could help … i guess thats when you want the urlk of the actual playing song.

also there is this picture showing linkplay and mini-media-player :

and i got a picture when playing music from spotify (hint from the linkplay thread)

got you the attribute whjen playing spotify:

source_list:
  - TV sound
  - Bluetooth
  - USB stick
  - Jazzy Soul
sound_mode_list:
  - Classic
  - Jazz
  - Normal
  - Pop
  - Vocal
group_members: null
volume_level: 0.53
is_volume_muted: false
media_content_type: music
sound_mode: Normal
shuffle: true
repeat: 'off'
master: false
uuid: FF31F09E1991EAB2E2A28D85
tts_active: false
snapshot_active: false
snapshot_spotify: false
debug_info: ' _playing_spotify'
firmware: 4.6.415145.35
device_class: speaker
icon: mdi:cast-audio
friendly_name: Soundstation Livingroom
supported_features: 1039935
media_duration: 138
media_position: 112
media_position_updated_at: '2023-10-10T15:04:45.482353+00:00'
source: Spotify
media_title: Canggu Laundry Club
media_artist: Iron Curtis
media_album_name: Moon II
stream_uri: spotify:album:3xRV4gGRWtSkRpHJqvo6vL
track_current: spotify:track:30HBmHsnDmhOMAddMCMbPo
entity_picture: >-
  /api/media_player_proxy/media_player.soundstation_livingroom?token=ca8cd7145c49802c05c5c22655916e5197201d6d77b97d3fba52a1b4fcf1a128&cache=bfff6f2fe09f6f16

anyway thank you for the 5* support :slight_smile:

Hello,
I’ve had a problem for a long time when I click for a playlist, the playlist launches and beeps on the google home player, then the Mini Media Player pauses.
Any solution?
Animation

Sorry I missed your last post, I don’t get any picture on ibiza global radio when I play it on lms.

me neither … i believe i do not understand the mechanics

Just for the understanding …

only spotify and LastFM have pictures?

Does anyone has pictures when playing a mp3 from local or a mounted folder?

Is there a support for ID3 Tags?

and which instance is “responsible” for the picture entity? file/radio or the player or mini-media.player?

thx :slight_smile:

I think in the case of a radio stream, you won’t get a picture unless there is one embedded in the stream. But some integrations may have a static pic for a radio station, eg the logo.

In an mp3 file, again it depends I think on whether the device itself decodes an embedded pic, and then passes it on to home assistant.

2 Likes

Can you give an example?

There’s an example in the universal media player docs.

I know, but something isn’t working for me
What is wrong with this configuration?

media_player:
  platform: universal
  name: Test Universal
  children:
    - media_player.volumio
  commands:
    turn_on:
      service: media_player.turn_on
      target:
        entity_id: switch.0xa4c138db8ae96f3f
    turn_off:
      service: media_player.turn_off
      target:
        entity_id: switch.0xa4c138db8ae96f3f

  attributes:
    state: switch.0xa4c138db8ae96f3f