Hi there smart guys…
I’m trying to achieve a “simple” implementation having a Sharptools.io Consolle able to activate different playlists on My Echo Speakers… for this reason I added the Echo Speaks smart app which allows me using the SearchMusic methods to activate my wanted playlist… which works… BUT…
-
if I’m using Amazon Music playlists i’m able to activate the shuffle function randomly using the String parameter “shuffle xxx playlist”… this for some strange reasons works only with some playlist and lot with others…
-
if I’m using Spotify which I would prefer there is no way to add the shuffle command in the same string as the search 'cause it invalidates the request and then the playlist would not play…
Browsing the forums and the wed I found out this method from Spotify: https://api.spotify.com/v1/me/player/shuffle (documentation here:https://developer.spotify.com/console/put-shuffle/?state=true&device_id=) using the simulator I’m able to create and invoke a curl which enable the shuffle on Spotify.
In this way, if I add a Virtual switch with this capability on Smartthings, and I activate it from Sharptools just after starting my playlist I would be able to shuffle the playlist, at least from the second song on… does that make sense?
My issue is: how can I call a cURL from smartthing device handler? I was not able to find a already available app or handler doing that.
My second issue: in the web interface above I need to get a OAuth token every time I make the call… how could i do the same from the handler?
Thanks all who’d like to help