ZyberSE
December 21, 2016, 8:20pm
1
I’m trying to figure out what link and where to get it so I can start Spotify albums/play lists on a media player (in my case Sonos).
I have figures out how to start radio stations and single tracks, but I can’t find links to albums or play lists.
Have anyone done this before?
Example (radio station):
- service: media_player.play_media
data:
entity_id: media_player.bathroom_upper
media_content_id: x-rincon-mp3radio://fm03-icecast.mtg-r.net/fm03_mp3
media_content_type: music
ih8gates
(Scott Reston)
December 21, 2016, 8:25pm
2
Does the Sonos know what to do when it receives a Spotify URI? My Squeezebox does, so I can pass it URIs for albums, tracks or playlists. Example:
This can be adapted to various media_player’s I’m sure. I’m running Logitech Media Server with the official Spotify Plugin plus the Triode protocol handler. That allows me to use Spotify URIs.
The secret sauce is that Jinja templates can return a random item from an array. I got excited when I figured that out.
The script I’m posting also makes an API call to turn on shuffle-by-song so that the playlists are shuffled. Source for that below as well.
Keep in mind that you’ll need to change the …
ZyberSE
December 21, 2016, 8:28pm
3
I don’t know
I actually found the thread you link to 30min ago and tested one of the links but no luck.
fdicarlo
(Fabrizio Di Carlo)
March 6, 2017, 11:17am
4
Sorry to use another thread, I didn’t want to open a new one, browsing on HackerNews I found this project: https://github.com/pwittchen/spotify-cli-linux I think it could be useful to integrate Spotify in HA
amplitur
(Lutz Lademann)
August 30, 2021, 3:01am
5
Use: spotify:playlist:playlistid. Example:
- service: media_player.play_media
data:
entity_id: media_player.bathroom_upper
media_content_id: spotify:playlist:6Gmf7DVGQ167rXL9NF5ba5
media_content_type: music
You can use open.spotify.com to identify the playlist id of the playlist you want to play.