Volumio - How to play specified files or playlist or shuffle songs?

ok, first of all, make sure, that the ssh command is working. you have to use exactly the same command as i posted and you have to prepare your pi’s so that a ssh connection without pw is working. follow this guide: http://linuxproblem.org/art_9.html

further, the shell command is an extra entry and not under the entry media player.
the shell_command can be triggered by a script.

it should look like this:

media_player:
  - platform: volumio
    host: 192.168.0.185
    port: 3000

shell_command:
  volumio_fatfreddys: 'curl 192.168.0.185/api/v1/commands/\?cmd\=playplaylist\&name\=Fat%20Freddys%20Drop'

EDIT: Ah sorry, i mixed it up. You don’t have to follow the ssh-guide. I’m sorry, i don’t know why it isn’t working for you :confused:

Hi, I’m trying to create some playlists in VOlumio. At the moment, however, it still does not work.
My config:
config.yaml

![36|468x156]
script.yaml
36

can you Help me?
Thank’s!

Oh yes, now i see whats wrong.
Delete %20drop at the end of the command.
Because that‘s part of my playlist name, which is „Fat Freddys Drop“ in volumio.

no work.
now my config is:

media_player:

  • platform: volumio
    host: 192.168.178.64
    port: 3000

    shell_command:
    curl 192.168.178.64/api/v1/commands/?cmd=playplaylist&name=prova1


script:

volumio_playlist:
alias: prova1
sequence:
- service: shell_command.volumio_prova1

have you any idea?

can you post the code in the proper way? with the function “preformatted text”? otherwise, post again a screenshot. i don’t know why it isn’t working. in volumio, the playlist is also called “prova1”?

Hi, now WORKS. I see the playlist.

2 Questions:
In your opinion is it possible to insert an input_select to group the scripts?

You could better explain how to insert the Random function. I wrote this but it doesn’t work.

THANK’S!!!

I never used the input_select function and i don’t know how to use it… unfortunately, i’m not a programmer :slight_smile:

For shuffle, i use this shell command:

volumio_shuffle: 'curl 192.168.0.185/api/v1/commands/?cmd=random'

Edit: I guess you use the right command, but forgot the ’ ’ around the command

thank’s for your support!

Hello, I was trying to configure input numbers for Volumio’s playlist. Did you succeed? Could you tell me how?

FYI, playing predefined playlists works even easier.

They appear as mediaplayer “source” and can be started from the UI out of the box:

Alternatively, there is a service that can be called to switch sources: media_player.select_source

I added some picture entity cards to lovelace with the station’s logos that start the playlist on press:

  - cards:
      - image: /local/media_fm4.jpg
        type: picture
        tap_action:
          action: call-service
          service: media_player.select_source
          service_data:
            entity_id: media_player.volumio
            source: FM4

I’m just curious… is it possible to set a playlist or song to repeat from UI?

I would like to put a media player of some inexpensive kind in each of my kids rooms and, at bedtime, have it play a local playlist of relaxation music.

Ideally, i would just like something like a Pi that I can hook to some cheap desktop speakers and remotely control the audio playback and volume. Icing on the cake would be audio sync but they don’t have to be since they are in different rooms and won’t be so loud that it would be noticeable.

Thanks

Yes, everything you want to realize should be possible.

Setting volumio to repeat is possible with this shell command:

volumio_repeat: 'curl 192.168.0.185/api/v1/commands/?cmd=repeat'

Playing a certain playlist is described above.
Syncing them isn’t supported by volumio (i guess), but using a script, whichs fires two shell commands playing the same playlist should be a good workaround.

Hi, i would also be interested in this since alexa doesn’t work locally. In fact I would like to create a wifi speaker using a raspberry zero and volumio to be able to use it locally.

Hi Jochen,

how did you manage to add a radio station in volumio to a playlist?
I’m not able to and this post says it shouldn’t https://forum.volumio.org/radio-station-playlist-t11200.html.

Did you create the playlist somewhere else?

No I did it exactly that way. Add to queue and save queue.
I’m running volumio 2.555 at the moment though.

Thanks for the hint, it’s working fine :slight_smile:

Hi,

Being a complete novice and messing around with my HA setup and this plugin, I still can’t get it to work! Where should I put what, I figured out that I need to edit the configuration.yaml and the scripts,yaml files, but what should I put where?

Thank you in advance!

Kind regards

Richard

Since one of the recent releases the Volumio integration can be setup via UI, so no more yaml configuration necessary.

In case anyone could be interested, I’ve found a way to directly play Tidal mixes without recurring to the REST API. Here is an example service call:

service: media_player.play_media
data:
  media_content_id: '{"uri": "tidal://mymusic/mixes/00248f6b59848bcbde1b47fc1695be", "service": "tidal"}'
  media_content_type: music
target:
  entity_id: media_player.volumio

You can find your mixes IDs by opening Tidal, then going to the mix context menu and copying the link.

FYI, I’ve found the media_content_id string format by enabling the Home Assistant logger integration, then manually choosing and playing a mix from the media browser, finally looking at the logs.

It would be interesting to get the media_content_id format to play Tidal playlists, albums, and so on.

Sorry to bump an old topic, but leaving this here in case anyone else googles the same thing that I did:

To play a file stored locally on volumio’s internal storage, you can do so using the media_player.play_media service with the following payload:

{
    "media_content_id": "{\"service\": \"mpd\", \"type\": \"song\", \"title\": \"your-sound-file.mp3\", \"uri\": \"music-library/INTERNAL/your-sound-file.mp3\"}",
    "media_content_type": "music"
}

the full service call looks like this:

service: media_player.play_media
data:
  media_content_id: '{"service": "mpd", "type": "song", "uri": "music-library/INTERNAL/my-file.mp3"}'
  media_content_type: music
target:
  entity_id: media_player.volumio
2 Likes