When you have installed and set-up Spotify binding, you can make use of “spotify_track_to_play”:
//Spotify_Load_playlist_BAD//
rule spotify_play_BAD_SOV
when
Item KNX_CastHovedsov_Play received update ON or
Item KNX_CastBad_Play received update ON
then
logInfo("Bathroom", "Received command PLAY")
if(SpotifyPlayerBridge_SpotifyConnectDeviceName.state!="Audio Gruppe" && SpotifyPlayerBridge_SpotifyConnectDeviceName.state!="Bathroom"){
logInfo("Cast", "No cast devices in use, starting Playback on Bathroom")
sendCommand(Spotify_Bathroom_TrackToPlay, "spotify:user:YOURUSER:playlist:YOUR_PLAYLIST_URI")
sendCommand(Spotify_Bathroom_DeviceShuffle, ON)
logInfo("Bathroom", "Playing YOUR_PLAYLIST on Bathroom and Shuffle Activated" )
}
else
//logInfo("Cast", "Bathroom or Audio Gruppe already in use")
if(SpotifyPlayerBridge_SpotifyConnectDeviceName.state=="Audio Gruppe" && SpotifyPlayerBridge_SpotifyTrackPlayerControl.state != PLAY){
logInfo("Audio Gruppe", "Active and State NOT play")
sendCommand(SpotifyPlayerBridge_SpotifyTrackPlayerControl, PLAY)
logInfo("Audio Gruppe", "Starting playback")
}
end
My Chromecast is not always available and even if I save his device ID if the Chromecast didn’t play something for the last 5 minutes it won’t change the device for my chrome cast
Does this also work when the spotify connect device thing (chromecast) is not currently playing spotify?
I installed the bindings and configured some rules. When I am already streaming to chromecast I am able to start a playlist from url with the “track_to_play” command. However when I am not casting anything, chromecast will not receive commands…
How did you manage this?
The Spotify binding is available in the Eclipse market place. Enable the market place with debug access level in PaperUI and it becomes available for install.
I have a Chromecast device on the same network as openHAB. If I connect my phone to that network, so that it sees the Chromecast, then I can use the Spotify binding in openHAB to control Spotify and play music on the Chromecast.
But as soon as I disconnect my phone from the WiFi network, the Chromecast thing (that came through the Spotify binding) goes offline, and – obviously – I can’t play music on it anymore, unless I connect my phone to the WiFi network again.
Is it possible to make openHAB discover the Chromecast device through the Spotify binding, so that it wouldn’t rely on my phone being available? Or is there any other way I can play music from Spotify on the Chromecast?
Hi All,
I installed the binding (2.4) without any hitch, I can read all the values from the Thing, and I can discover any devices that Spotify streams to.
Unfortunately, I can’t seem to control my Spotify account.
I have a:
Bridge @ spotify_player_Paul_trackPlayer, and a
Device @ spotify_device_Paul_3c3c_devicePlayer
Can you control from PaperUI or any other openHAB UI, starting/stopping?
According to the binding documentation you need a premium account, although I heard Spotify changed this. But I don’t know if that is true, so I’m assuming a premium account is still needed.
If you have a Premium subscription of Spotify, you can connect Spotify with Google Chromecast and then stream Spotify to Chromecast. This is the traditional method to cast Spotify to Chromecast. However, you could have a try of the ultimate solution to play Spotify music on Chromecast or Chromecast Audio. You could download Spotify playlist to mp3 with TunesKit tool.
To get started to listen to the Spotify playlist via Chromecast, there are two ways to do this. The most common way is to cast Spotify to Chromecast from iPhone or Android devices with the help of the Spotify app and Spotify Connection. The way is available for Spotify Premium users.
Another way for free users is to use a professional Spotify Downloader to convert Spotify songs offline and transfer them to Google Play Music and then use Chromecast to stream Spotify for playback.
Do you have Spotify Premium or not ? if you have Premium,it could easily to achieve,but is you are using the free account you may need to settle for the right tool, that is, Tunelf Spotify Music Converter. It will carefully convert Spotify music to a playable format, suitable for any media player or device.