Empty the Play Queue via Websocket

Hi everyone,
Is there a way to empty the play queue via the websocket API I am missing? Unfortunately there’s no API endpoint for it. The only options I currently see are (in pseudocode):

forloop (0 to a very large number N): removeFromQueue N

or

playPlaylist "some_playlist" //which empties the queue stop

Thanks!

There are two options for clearing the queue.

  1. You can either use the REST API by simply issuing a GET request to volumio.local/api/v1/commands/?cmd=clearQueue like this (in Python):
urllib.request.urlopen("http://volumio.local/api/v1/commands/?cmd=clearQueue").read()
  1. You can use the (undocumented) websocket endpoint (yay!)
socketIO.emit('clearQueue')

The endpoint can be found here: github.com/volumio/Volumio2/blo … ex.js#L242