How to use the addToQueue-Api?

I’m Marco from North-Germany. So I say: Sorry for my broken English. :wink:

My Project:
Raspberry Pi 4b 1GB RAM with Volumio Ver 2.657 Oct 18th 2019
There is a FAT32-HDD at USB mounted as /var/lib/mpd/music/INTERNAL
On the HDD is my CD-Collection in FLAC-Format.
Volumio works fine.

Before I used Volumio, i have used an Ubuntu-Server-System with Apache as WebUI and MPD. Than with Multiroom with Snapcast. It was complicated. Then I have found Volumio.

All my CDs have RFID-Cards inside. The RFID-Sensor is an USB-Keyboard simulator, that sends ten digits and the ENTER-Key.
Every Album have the RFID-Code in the Album-Title-Tag, like This:

“Oxygene [0001754447]”
“Six Feet Under [0003481036]”
“Road To Revolution - Live At Milton Keynes [0003467970]”

The eaysiest way: Volumio starts at the shell - not with the GUI and make a login, followed from the shell script, that’s waiting for the keyboard input, like this:

while true
read -p "Scan the Disk: " rfid
volumio clear; mpc clear; mpc search album ${rfid} | mpc add; mpc play

But I’ve tried all things, to boot in text-mode … no success.

Via SSH it works but it talks with MPD … not with volumio.

other Way:

I could install an second Raspberry Pi (Zero?) with the RFID-Sensor and the script. This one could send commands to the Volumio-Pi.

I think, the right way is the REST-API. If I say:


it gives me the search result:

    isSearchResult	true
        title	"gefunden 1 Album '0001754447'"
            0	"list"
            1	"grid"
                service	"mpd"
                type	"folder"
                title	"Oxygene [0001754447]"
                artist	"Jean-Michel Jarre"
                album	""
                uri	"albums://Jean-Michel%20Jarre/Oxygene%20%5B0001754447%5D"

Then there is API /api/v1/addToQueue

At the documentation I read, that it want to have data via POST. But there are no examples, what addToQueue wants to “hear”. So I have tried:

curl -X POST -d

the Result at the shell:


But no effect to the queue.

So I ask you: How I can speak to Volumio to

  1. search the album for the ID and
  2. add it to the queue

Nice Greetings from North-Germany!


I have the same problem. I use successfully the REST api for sending simple commands that fit on one line.
I can browse the library, etc

However I do not understand how to use the following command :

How should I add the ‘payload’ argument ?

Many thanks for your support.