Hi,
I am making some progress. I have rudimentary voice control working with Amazon Echo, but before i share anything I would like to know the best way to programmatically add songs to the playlist and play them.
For example:
User says ‘Alexa tell volumio to play the album {album name}’, then the Volumio skill sends a request into my Volumio automation plugin asking it to play the album.
I search for the album name and get back a result as an item describing the album
e.g.
Found album: {
"service": "mpd",
"type": "folder",
"title": "Houses Of The Holy",
"artist": "Led Zeppelin",
"album": "",
"uri": "albums://Houses%20Of%20The%20Holy",
"albumart": "/albumart?web=Led%20Zeppelin/Houses%20Of%20The%20Holy/large&path=%2Fmnt%2FNAS%2FNeptune%2FLed_Zeppelin%2FHouses_Of_The_Holy&icon=fa-tags"
}
What is the best way to the clear the playlist add this album and play it?
I have tried
self.commandRouter.serviceClearAddPlayTracks(item, 'mpd');
but the mpd music service method does not seem to be implemented correctly - the implemented method is called ‘clearAddPlayTrack’ with the ‘s’ missing and never gets called.
I tried
self.commandRouter.executeOnPlugin('music_service', 'mpd', 'clearAddPlayTrack', item);
but this doesn’t work either.
What is the recommended way to do this?