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

One more thing, how to have the current playlist? There are REST API command : https://volumio.github.io/docs/API/REST_API.html
How to use them?

hey,
good to hear that it works!
if you want to play a certain playlist, you have to create a scipt and a shell command.
both is described in my post, which is directly above your first post!
if you need further help, just tell me!

I just discovered Volumio and Iā€™m excited to get into it.
Itā€™s probably over kill for this purpose, but do any of you use it to play MP3 files as actions for Automations? Like Dog bark sounds when motion detected and no one is homeā€¦

2 Likes

No, but when you add the component you can already use it as text-to-speach target.

Hello, in which section of the config in HOME ASSISTANT go to write the code:

ā€¦volumio_playlist1:
alias: Fat Freddys Drop
sequence:
- service: shell_command.volumio_fatfreddys

in configuration.yaml ?

Hi, you can tell me how to call a Volumio radio station from HA? Thankā€™s!

Hi nek1970,
yes for sure. I made a playlist with only the radiostation and play it with a shell command. itā€™s the same command i use for other playlists.
here is the command for my favourite (austrian) radiostation FM4

shell command:   
  volumio_fm4: 'curl 192.168.0.185/api/v1/commands/\?cmd\=playplaylist\&name\=FM4'

I created a playlist called Classic FM and I saved a radio inside it. In configuration.yaml
I also added the command for the random function to my mp3 playlists. That does not work either.
My yaml config looks like this:

media_player:

  • platform: volumio
    host: 192.168.178.64
    port: 3000

    shell command:
    volumio_classic_fm: ā€˜curl 192.168.178.64/api/v1/commands/?cmd=playplaylist&name=Classic_FMā€™
    curl 192.168.178.64/api/v1/commands/?cmd=random

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.