Spotify control

Hi,

Is there a smart app to play Spotify source on speakers connected to my ST hub (sonos or other media renderer) ?

None that I know of. I just use the Spotify app connected to Alexa.

Whats your use case? Just play/pause controls? Or full playlist selection.

Play/pause works with my Sonos speakers. But I’d like to select Spotify list as source.

1 Like

Through the SmartThings app? I don’t think that is possible. Think it would be fairly hard for a custom smartapp to do it to. There are limitations to having dynamic content in Smartthings.

I know with the Echo. if I use Spotify it just opens up the Spotify app on my phone for playlist selection and uses the Echo as a remote player.

Someone knows a way to do something like:

Trigger: Press a button or call a webservice api or other event whatever
action: *Play Spotify song/playlist at speaker XXXX (Registered at spotify already, EX: Android phone, computer, Alexa, sonos, etc)

?

Thanks

I’ve done this using the SmartThings API with the Sonos API, but it’s done in a custom web control panel, not a SmartThings app.

It would be possible to do via an app, a lot of work though.

where is your app ?

There is no app available.

ok:)
what’s available ?

I’ve knocked something together for iTunes and Spotify control via Smartthings, can be automated or use a simulated remote https://github.com/ijaspley/HAM-Bridge-Smartthings-Media-Control

I think you might have to add something like the Logitech Harmony which is designed to integrate AV sources into you whole house system.

That would be good, I’ve only added Spotify to harmony as separate devices (plugs for play/pause, skip and previous) using HAM bridge, I tried using remote buddy and it works well but turns everything else off if you add it as an activity so wasn’t for me

Anybody know if it’s possible to use voice to tell Spotify to select certain device.
Just a thought. The use would be to select a device recognized by Spotify and showing under devices. I’d like to ask smartthing to play music on any device shown in the (connected devices) in Spotify.

google home works well with chromecast but I also have some AudioCast devices that I cannot add to google or smartthings. I’ve installed the MediaRenderer Connect successfully but I can only turn off or stop music.

I figured maybe there is a smart app to control Spotify devices.

:slight_smile:
Thank you for your time.

There’s a skill for Alexa that allows you to choose device 1 etc, but I think the order changes when you use mobile devices

I have a system set up as follows

ST linked to Harmony, Harmony linked to Sonos ( there is a reason to do it this way) In Sonos app create favorites for all your playlists, then in the Harmony app link the favorites when you set up the Sonos link - the Favorites are available to set up as activities in the Harmony app. These activities can then be pulled into Smartthings to trigger via any action - i.e coming home etc. to take this further i then setup Google home to trigger the activities via ST ( again its best to do this in ST than Harmony for the following to work ) now i can activate any playlist with my voice via google home that in turn can trigger other things in ST like lights to set a mood etc and get the music over my sonos system. The second use case i am using im pretty proud of - i have a foldable glass door for my shower, and i like to listen to music when in the shower, so i set up a contact sensor that is left in “open” mode, but when i get into shower and close the door the sensor “closes” and the house knows im in the shower keeps lights on in the bathroom ( lights normally go out due to inactivity on motion sensors) it also then virtually presses play in the sonos app effecting only in bathroom - when the door is re-opened it it pauses the music, but again only on the sonos app side, not spotify - so when i re close door playlist starts again - the clever twist is that shuffle is set on the sonos app side for spotify playlists so it’s always starts with something fresh - and when in showers i can just quick open/shut door to skip the song. these pause/play actions also trigger house routines etc. with a bit of thought on what kinda playlist you might want to play im sure you can set up this config and use it in same way i have my google home and shower set up done. If your just using Google home to play music then no need to do any of this, however if you want to utilise Sonos and spotify this is best way i have found to get it working and have predictable control via triggers like contact sensors or via voice.

Spotify has an API that supports commands to all connect devices via rest commands so it should be doable… (i posted this in another channel too, but I’m hoping to get all the help on this app as i can)


I suck at developing tho, so I just keep getting “groovyx.net.http.HttpResponseException: Unauthorized @line 116 (pause)”
I would appreciate help if anyone smarter than me is willing!
def pause() {
log.debug “Executing Pause”
httpPut(

    uri: "https://api.spotify.com/v1/me/player/pause",

    body: [contentType: "application/json", token_type: "bearer", access_token:"NotMyRealTokenObviously"] 

)

}

1 Like