You can use the following command to remotely start music playing on XBMC. The examples below were sent while I was SSH’ed into the XBMC machine. As you’ll notice from the music paths, I am using some of the ‘special’ paths which call up the LastFM tags of Rap and Alternative.
Start the LastFM Rap tag playing:
xbmc-send -a "PlayMedia(lastfm://globaltags/rap)"
Start the LastFM Alternative tag playing:
xbmc-send -a "PlayMedia(lastfm://globaltags/alternative)"
To play a tag that contains a space in it’s name, you must URL encode the space in your request (eg. replace all the spaces with %20). For example:
Start the LastFM ‘Classic Rock’ tag playing:
xbmc-send -a "PlayMedia(lastfm://globaltags/classic%20rock)"
I should note that each LastFM request is mutually exclusive of the other. Meaning each time you send a new PlayMedia request, the old genre/tag will stop playing and the new one will start playing.
I’ll add to this later when I start documenting some of the various URLs and functions that can be used to start playing music. A list of functions that can be sent can be found on the XBMC wiki.