-
Notifications
You must be signed in to change notification settings - Fork 4
Frequently Asked Questions
Welcome to the SpotifyPlus custom component integration for Home Assistant frequently asked questions (FAQ) wiki.
Use the following index to quickly find what you are looking for.
- Why does the media player support turn_on / turn_off?
- What is a
SAM1010E
Deprecated Error Message? - How do I find the device_id value required by various service calls?
- How do I find the Spotify "Daily Mix n" playlist id?
There are a few reasons why the integration supports the turn_on
/ turn_off
features by default.
-
The Spotify Web API will not be queried when the media player is turned off - this is by design. It reduces traffic on your local network, as well as the extra load placed on Spotify Web API servers (and your Home Assistant instance) that service the request.
-
Executes the Turn On Script option (if specified) when the player is turned on. This option allows you to specify a script that will be executed when a
turn_on
service request is made to power on the integration. The script can be used to prepare the audio output device(s) (e.g. speaker, AV receiver, etc) for playing Spotify Connect Player content. -
Executes the Turn Off Script option (if specified) when the player is turned off. This option allows you to specify a script that will be executed when a
turn_off
service request is made to power off the integration. The script can be used to shut down the audio output device(s) (e.g. speaker, AV receiver, etc) after playing Spotify Connect Player content.
If you prefer "always on" functionality, you can disable the turn on / off features using the Always On configuration option.
The following error message is displayed when trying to retrieve information from various Spotify Web API endpoints:
SAM1010E - The "x" endpoint has been deprecated by Spotify without prior notice as of November 27th 2024, and the supporting functionality is no longer available.
The Spotify Developer Team deprecated (aka removed) the following functionality without any sort of warning or grace period. This was announced on the Spotify Developer Forum Blog on Thursday November 27th 2024 (US Thanksgiving holiday - definitely not worth giving thanks for IMHO!) AFTER the changes were already implemented. The Spotify Web API will no longer be able to access or use the following endpoints and functionality in third-party applications (SpotifyPlus being one of them):
- Related Artists
- Recommendations
- Audio Features
- Audio Analysis
- Get Featured Playlists
- Get Category's Playlists
-
30-second preview URLs, in multi-get responses (
SimpleTrack
object) - Algorithmic and Spotify-owned editorial playlists (e.g. "Made For You", etc)
What these changes mean for SpotifyPlus Integration and SpotifyPlus Card Dashboard users is that the corresponding functions that access the above features will no longer work, and in most case will return the SAM1010E
error message.
Unfortunately, this is out of my control as the Spotify developers just decided to make the change to their API without prior notice, and my (and many other) complaints fall on deaf ears. Let's just say I lost a LOT of respect for the Spotify platform after over the past few days after realizing what they did and their lack of communication!
You don't. However ...
You can make your voice and opinion heard by posting a reply on the Spotify Community Forum. Let them know that this change is not acceptable and how disappointed you are. Please be respectful in the process; scream and shout with your internal voice if you have to (like I did).
Most of the integration custom services require a device_id
argument in order to process a command. The device_id
argument is usually passed to the corresponding Spotify Web API endpoint for the specified service. The device_id
is also referred to as the Spotify Connect device id, and in some instances the Spotify Connect device name. Most services will allow you to specify either the name (e.g. Office Speaker
) or the id (e.g. f87342b3ad455375317d5af8aabde64a28bd49d0
).
The Spotify Connect device name can be found in the Spotify Mobile / Desktop App “Connect to a device” menu:
You can also find the device name and device id via the Get Spotify Connect Devices service output. Use the HA Developer Tools \ Services to call the service and display the results.
Example: Get Spotify Connect Devices
service: spotifyplus.get_spotify_connect_devices
data:
entity_id: media_player.spotifyplus_todd_l
Sample Output
The result id
value is the device id, the result name
is the device name.
user_profile:
display_name: Todd L
...
result:
- id: 30fbc80e35598f3c242f2120413c943dfd9715fe
is_active: false
is_private_session: false
is_restricted: false
name: Bose-ST10-1
supports_volume: false
type: SPEAKER
volume_percent: 0
- id: 3756903295ba7b47f8c36fc9a4ff7d833431a667
is_active: false
is_private_session: false
is_restricted: false
name: Bose-ST300
supports_volume: false
type: SPEAKER
volume_percent: 0
- id: 10e64fcf9695bd2796ce62b84d688558e39cd311
is_active: false
is_private_session: false
is_restricted: false
name: HAVM-SpotifyConnect
supports_volume: false
type: Speaker
volume_percent: 0
- id: f87342b3ad455375317d5af8aabde64a28bd49d0
is_active: false
is_private_session: false
is_restricted: false
name: Office
supports_volume: false
type: SPEAKER
volume_percent: 0
The Spotify generated Daily Mix n
entries are just playlists, with an assigned playlist id. I believe the playlist id's remain the same, even though the content automatically changes (not sure of change frequency).
To find out the playlist id (and it's uri value), do the following:
- open Spotify Web Site in a new desktop browser window.
- click on the desired "Daily Mix ?" entry to display it's details; this will display the playlist id in the url (playlist id is circled in red in the following example):
- formulate the Spotify uri value for the playlist; in the example above, the uri would be
spotify:playlist:37i9dQZF1E39DIjrju3A9t
.
Use the Spotify playlist uri value in the call to SpotifyPlus player_media_play_context
service:
service: spotifyplus.player_media_play_context
data:
entity_id: media_player.spotifyplus_john_s
context_uri: spotify:playlist:37i9dQZF1E39DIjrju3A9t