Volumio API

Hey all, discovered Volumio a couple of weeks ago and so far lovin it! I think it would be perfect for a small project I’m planning at the office, but I’m wondering if there is some Web API that I could use to fetch the currently playing track? Great would be if this information would be available regardless if the music is coming over airtunes or from a local playlist, altough I’m not sure if the airtunes protocol supports this.

I looked through the source code for the webui, and it looks like _player_engine.php might be an entry point, but I couldn’t find any command that would fetch the information for the currently playing track. If there is no API yet, I wouldn’t mind giving it a go, but I’d need some information on what the available commands are.

There was a thread in the forums a while back about ‘web commands’. Maybe that might be what you are looking for?

web-http-commands-steer-volumio-player-t125.html

Thanks! That does help a bit. However, it seems the /command/ url only sends commands to mpd, it does not return responses from it. I’m actually looking for something that would perhaps return JSON or XML, which would be somewhat easy to handle on the other end regardless of the device. Based on the link you provided and further digging into the code I think I could try to build my own though. Maybe a project for the weekend :slight_smile:

Sounds like the stuff Michelangelo is supposed to be looking at for the new Web-GUI, using node.js and socket.io to do asyncychronous messaging,i…e connect to mpd in the background and pull information from it, maybe sending it back as JSON, as you suggest.

I think as you say the ‘web-commands’ thing is just a one-way method of passing commands to mpd.