The Spotify media player integration allows you to control Spotify playback from Home Assistant.
Whitelist a Redirect URI. In Redirect URIs enter one or more addresses that you want to whitelist with Spotify. This URI enables the Spotify authentication service to automatically re-launch your app every time the user logs in. To Enter URI for an App on iOS: Verify that: All the characters are lowercase. The prefix must be unique to your. The ui is a bit misleading. It's very easy to think you've saved your redirect uri by pressing add button, and since the page is a bit long, you might not see the warning and the save button. That happened to me. If someone from Spotify put a similar warning right under redirect uri section in that page when a change is made, that would avoid confusion imho. – keune Jan 1 '16 at 18:34.
Prerequisites
- Spotify account
- Spotify application configured for Home Assistant (see below)
Spotify integrated media controls (pause, play, next, etc.) require a Premium account.If you do not have a Premium account, the frontend will not show the controls.
Create a Spotify application
- Login to Spotify Developer.
- Visit the My Applications page.
- Select Create An App. Enter any name and description.
- Once your application is created, view it and copy your Client ID and Client Secret, which are used in the Home Assistant configuration file below.
- Enter the Edit Settings dialog of your newly-created application and add a Redirect URI:
- If you are not using SSL:
http://<your_home_assistant_url_or_local_ip>:<port>/auth/external/callback
- If you are using SSL:
https://<your_home_assistant_url_or_local_ip>:<port>/auth/external/callback
- If you are not using SSL:
- Click Save after adding the URI.
Your Home Assistant instance does not need to be exposed to the internet. It works just fine with local IP addresses.
Configuration
Spotify premium free xbox. To add Spotify to Home Assistant, add the following to your
configuration.yaml
file: Poptarts enter to win spotify free for a year.Configuration Variables
Client ID from your Spotify Developer application.
Client Secret from your Spotify Developer application.
Activating the Spotify integration
- Go to the Configuration page in the Home Assistant frontend.
- Click on Integrations.
- Click the orange + on the bottom-right.
- Click on “Spotify”.
- Once the new Spotify tab opens, enter your Spotify credentials and allow Home Assistant to access your Spotify account.
If you receive an
INVALID_CLIENT: Invalid redirect URI
error while trying toauthenticate with your Spotify account, check the Redirect URI inthe address bar after adding the new integration. Compare this value with theRedirect URI defined in the Spotify Developer Portal.Using multiple Spotify accounts
This integration supports multiple Spotify accounts at once. You don’t need tocreate another Spotify application in the Spotify Developer Portal and nomodification to the
configuration.yaml
file is needed. Multiple Spotifyaccounts can be linked to a single Spotify application.To add an additional Spotify account to Home Assistant, go to the Spotify website and log out, then repeat only the stepsin the Activating the Spotify integration section.
Spotify Uri Link
Playing Spotify playlists
Spotify Playlist Uri
You can send playlists to Spotify using the
'media_content_type': 'playlist'
, which is part of themedia_player.play_media service, for example:![Mp3 Mp3](/uploads/1/3/4/1/134170012/489716886.png)
Spotify Uri To Mp3
The
media_content_id
value can be obtained from the Spotify desktop app by clicking on the more options (”…”) next to the album art picture, selecting “Share” and then “Copy Spotify URI” or “Copy Playlist Link” (also available in the Spotify phone and web app).Unsupported Devices
What Is Redirect Uri
- Sonos: Although Sonos is a Spotify Connect device, it is not supported by the official Spotify API.