Can you play volumio functions through command line?

I know you can control volumio through mpc command line functions - can you do the same with volumio plugins, eg the spotify plugin? I.e. play a particular playlist through a command line function?

nope plugins are not a part of the core of volumio

It depends on how the plugin is programmed.
Spotify has no means for an external call via node.
A plugin like randomizer has, and you can call it from the terminal.

Just coming back here to say that I did find a way to do this - you can use curl commands from the command line to interact with the API

eg
curl -i --header “Content-Type: application/json” volumiop.local/api/v1/replaceAndPlay --data ‘{“service”: “webradio”, “type”: “webradio”, “title”: “Radio 4”, “uri”: “http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_med/ak/bbc_radio_fourfm.m3u8”}’

curl volumiop.local/api/v1/commands/?cmd=pause

curl volumiop.local/api/v1/commands/?cmd=toggle

curl volumiop.local/api/v1/commands/?cmd=next

curl volumiop.local/api/v1/getState

Works great!

1 Like

if you need more commands there are more :slight_smile:
ps if you have a streamdeck or pc i can give a plugin or rainmeter skin for those :slight_smile:

Thanks! I will have a think, but the one I am most interested in is how to play my liked songs, is that possible?

true a play list or just 1 song direct or add in the qeue so you have 3 options :stuck_out_tongue:

here you have a few:

if you want to controle it with a remote look for triggerhappy

play direct
http://volumio.local/api/v1/replaceAndPlay

addtoqueue
http://volumio.local/api/v1/addToQueue

play playlist
http://volumio.local/api/v1/commands/?cmd=playplaylist&name= << here your playlistname >>