The Spotify media player integration allows you to control Spotify playback from Home Assistant.
- Add Spotify To Google Home
- Free Google Speaker Spotify Link
- Spotify Google Assistant Free Courses
- Spotify Google Assistant Free Music
- Spotify Google Assistant Free Training
- Google Assistant Download For Pc
That status page now says All Systems Operational, but playing music from Spotify via Google Assistant still isn’t working for me. Are you using a Spotify “premium” subscription service (not the 'free' service, which isn’t supported) and have you ensured that the same Spotify credentials are being used within your Sonos App and that the same service/credentials are 'linked' to your. Terms and conditions apply. 1 month free not available for users who have already tried Premium. Get the family on the Spotify family plan 6 Premium accounts for family members under one roof.
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
To add Spotify to Home Assistant, add the following to your
configuration.yaml
file: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.
Playing Spotify playlists
You can send playlists to Spotify using the
'media_content_type': 'playlist'
, which is part of themedia_player.play_media service, for example: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
- Sonos: Although Sonos is a Spotify Connect device, it is not supported by the official Spotify API.
The
google_assistant
integration allows you to control things via Google Assistant on your mobile, tablet or Google Home device.Automatic setup via Home Assistant Cloud
With Home Assistant Cloud, you can connect your Home Assistant instance in a few simple clicks to Google Assistant. With Home Assistant Cloud you don’t have to deal with dynamic DNS, SSL certificates or opening ports on your router. Just log in via the user interface and a secure connection with the cloud will be established. Home Assistant Cloud requires a paid subscription after a 30-day free trial.
For Home Assistant Cloud Users, documentation can be found here.
Manual setup
The Google Assistant integration (without Home Assistant Cloud) requires a bit more setup than most due to the way Google requires Assistant Apps to be set up.
To use Google Assistant, your Home Assistant configuration has to be externally accessible with a hostname and SSL certificate. If you haven’t already configured that, you should do so before continuing. If you make DNS changes to accomplish this, please ensure you have allowed up to the full 48 hours for DNS changes to propagate, otherwise, Google may not be able to reach your server. Once you have confirmed you can reach your Home Assistant from outside your home network, you can set up the Google integration:
- Create a new project in the Actions on Google console.
- Click
New Project
and give your project a name. - Click on the
Smart Home
card, then click theStart Building
button. - Click
Name your Smart Home action
underQuick Setup
to give your Action a name - Home Assistant will appear in the Google Home app as[test] <Action Name>
- Click
Build your Action
, then clickAdd Action(s)
. - Add your Home Assistant URL:
https://[YOUR HOME ASSISTANT URL:PORT]/api/google_assistant
in theFulfillment URL
box, replace the[YOUR HOME ASSISTANT URL:PORT]
with the domain / IP address and the port under which your Home Assistant is reachable. - Click
Save
. - Click on the
Overview
tab, which will lead you back to the app details screen.
- Click
Account linking
is required for your app to interact with Home Assistant.- Set this up by clicking on
Setup account linking
under theQuick Setup
section of theOverview
page. - If asked, leave options as they default
No, I only want to allow account creation on my website
and selectNext
. - Then if asked, for the
Linking type
selectOAuth
andAuthorization Code
. ClickNext
- Enter the following:1. Client ID:
https://oauth-redirect.googleusercontent.com/r/YOUR_PROJECT_ID
. (Find your YOUR_PROJECT_ID by clicking on the three little dots (more) icon in the upper right corner of the console, selectingProject settings
, your Project ID will be listed on theGENERAL
tab of theSettings
page.)2. Client Secret: Anything you like, Home Assistant doesn’t need this field.3. Authorization URL (replace with your actual URL):https://[YOUR HOME ASSISTANT URL:PORT]/auth/authorize
.4. Token URL (replace with your actual URL):https://[YOUR HOME ASSISTANT URL:PORT]/auth/token
.ClickNext
, thenNext
again. - In the
Configure your client
Scopes
textbox, typeemail
and clickAdd scope
, then typename
and clickAdd scope
again. - Do NOT check
Google to transmit clientID and secret via HTTP basic auth header
. - Click
Next
, then clickSave
- Set this up by clicking on
- Select the
Develop
tab at the top of the page, then in the upper right hand corner select theTest
button to generate the draft version Test App. If you don’t see this option, go to theTest
tab instead, click on theSettings
button in the top right below the header, and ensureOn device testing
is enabled (if it isn’t, enable it). - Add the
google_assistant
integration configuration to yourconfiguration.yaml
file and restart Home Assistant following the configuration guide below. - (Note that app versions may be slightly different.) Open the Google Home app and go to
Settings
. - Click
Add..
,+ Set up or add
,+ Set up device
, and clickHave something already setup?
. You should have[test] your app name
listed under ‘Add new’. Selecting that should lead you to a browser to login your Home Assistant instance, then redirect back to a screen where you can set rooms and nicknames for your devices if you wish.
If you’ve added Home Assistant to your phone’s home screen, you have to first remove it from home screen, otherwise, this HTML5 app will show up instead of a browser. Using it would prevent Home Assistant redirecting back to the Google Home app.
Allow Other Users
If you want to allow other household users to control the devices:
- Open the project you created in the Actions on Google console.
- Click
Test
on the top of the page, then clickSimulator
located to the page left, then click the three little dots (more) icon in the upper right corner of the console. - Click Manage user access. This redirects you to the Google Cloud Platform IAM permissions page.
- Click ADD at the top of the page.
- Enter the email address of the user you want to add.
- Click Select a role and choose Project < Viewer.
- Click SAVE
- Copy and share the Actions project link (
https://console.actions.google.com/project/YOUR_PROJECT_ID/simulator
) with the new user.
- Have the new user open the link with their own Google account, agree to the Terms of Service popup, then select “Start Testing”, select VERSION - Draft in the dropdown, and click “Done”.
- Have the new user go to their
Google Assistant
app to add[test] your app name
to their account.
Enable Device Sync
If you want to support active reporting of state to Google’s server (configuration option
report_state
) and synchronize Home Assistant devices with the Google Home app (google_assistant.request_sync
service), you will need to create a service account. It is recommended to set up this configuration key as it also allows the usage of the following command, “Ok Google, sync my devices”. Once you have set up this component, you will need to call this service (or command) each time you add a new device in Home Assistant that you wish to control via the Google Assistant integration. This allows you to update devices without unlinking and relinking an account (see below).- In the GCP Console, go to the Create Service account key page.
- At the top left of the page next to “Google Cloud Platform” logo, select your project created in the Actions on Google console. Confirm this by reviewing the
project_id
and it ensure it matches. - From the Service account list, select New service account.
- In the Service account name field, enter a name.
- In the Service account ID field, enter an ID.
- From the Role list, select Service Accounts > Service Account Token Creator.
- For the Key type, select the JSON option.
- Click Create. A JSON file that contains your key downloads to your computer.
- Use the information in this file or the file directly to add to the
service_account
key in the configuration. - Go to the Google API Console.
- Select your project and click Enable HomeGraph API.
- Try “OK Google, sync my devices” - the Google Home app should import your exposed Home Assistant devices and prompt you to assign them to rooms
Configuration
Now add your setup to your
configuration.yaml
file, such as:Configuration Variables
Project ID from the Actions on Google console (looks like
words-2ab12
)Pin code to say when you want to interact with a secure device.
Your HomeGraph API key (for the
google_assistant.request_sync
service). This is not required if a service_account is specified. This has been deprecated and will be removed in 0.105, you must setup a service_account
now.Service account information. You can use an include statement with your downloaded JSON file, enter data here directly or use secrets file to populate.
Private key in PEM format
Service email address
Actively report state changes on entities. This speeds up response time for actions affecting multiple entities since Google Assistant knows pre-hand what state they are. It is also required for some features on visual controls.
expose_by_default boolean (Optional, default: true)
Expose devices in all supported domains by default. If
exposed_domains
domains is set, only these domains are exposed by default. If expose_by_default
is set to false, devices have to be manually exposed in entity_config
.List of entity domains to expose to Google Assistant if
expose_by_default
is set to true. This has no effect if expose_by_default
is set to false.Entity specific configuration for Google Assistant
Entity to configure
Name of the entity to show in Google Assistant
Add Spotify To Google Home
Force an entity to be exposed/excluded.
Aliases that can also be used to refer to this entity
Allows for associating this device to a Room in Google Assistant.
Available domains
Currently, the following domains are available to be used with Google Assistant, listed with their default types:
- alarm_control_panel (arm/disarm)
- camera (streaming, requires compatible camera)
- group (on/off)
- input_boolean (on/off)
- input_select (option/setting/mode/value)
- scene (on)
- script (on)
- switch (on/off)
- fan (on/off/speed)
- light (on/off/brightness/rgb color/color temp)
- lock
- cover (on/off/set position)
- media_player (on/off/set volume (via set volume)/source (via set input source)/control playback)
- climate (temperature setting, hvac_mode)
- vacuum (dock/start/stop/pause)
- sensor (temperature setting for temperature sensors and humidity setting for humidity sensors)
- humidifier (humidity setting/on/off/mode)
Some of these devices may not display correctly in the Google Home app, such as media_player, however voice commands will still work. https://rentclever522.weebly.com/blog/mass-download-every-song-in-your-spotify-playlist.
Secure Devices
Certain devices are considered secure, including anything in the
lock
domain, alarm_control_panel
domain and covers
with device types door
, garage
or gate
.By default these cannot be opened by Google Assistant unless a
secure_devices_pin
is set up. To allow opening, set the secure_devices_pin
to something and you will be prompted to speak the pin when opening the device. Closing or locking these devices does not require a pin.For the Alarm Control Panel if a code is set it must be the same as the
secure_devices_pin
. If code_arm_required
is set to false
the system will arm without prompting for the pin.Room/Area support
Entities that have not been explicitly assigned to rooms but have been placed in Home Assistant areas will return room hints to Google with the devices in those areas.
Climate Operation Modes
There is not an exact 1-1 match between Home Assistant and Google Assistant for the available operation modes.Here are the modes that are currently available:
- off
- heat
- cool
- heatcool (auto)
- fan-only
- dry
- eco
Troubleshooting
404 errors on request sync
Syncing may fail after a period of time, likely around 30 days, due to the fact that your Actions on Google app is technically in testing mode and has never been published. Eventually, it seems that the test expires. Control of devices will continue to work but syncing may not. If you say “Ok Google, sync my devices” and get the response “Unable to sync Home Assistant” (or whatever you named your project), this can usually be resolved by going back to your test app in the Actions on Google console and clicking
Simulator
under TEST
. Regenerate the draft version Test App and try asking Google to sync your devices again. If regenerating the draft does not work, go back to the Action
section and just hit the enter
key for the URL to recreate the Preview.The
request_sync
service requires that the initial sync from Google includes the agent_user_id
. If not, the service will log an error that reads something like “Request contains an invalid argument”. If this happens, then unlink the account from Home Control and relink.The
request_sync
service may fail with a 404 if the project_id
of the HomeGraph API differs from the project_id
of the Actions SDK found in the preferences of your project on Actions on Google console. Resolve this by:- Removing your project from the Google Cloud API Console.
- Add a new project to the Actions on Google console Here you get a new
project_id
. - Run through the previously mentioned [Actions on Google console] setup instructions until the step to create a
service_account
. - Once you begin to create a new
service_account
in the [Google Cloud API Console], ensure you select the project created in [Actions on Google console] by verifying theproject_id
. - Enable HomeGraph API to the new project.
Verify that the Google Assistant is available on
https://[YOUR HOME ASSISTANT URL:PORT]/api/google_assistant
If it is working it should return 405: Method Not Allowed
How do you download a song from spotify. Do rogers customers get free spotify. when opened in a browser or via curl.403 errors on request sync
The
request_sync
service may fail with a 403 if the HomeGraph API is not enabled. Go to Google API Console and verify that HomeGraph API is enabled for your project.404 errors on report state
If you receive 404 errors linked to reporting state in your log, Home Assistant is reporting state for entities that were never synced to Google. Ask your Google Home to
Sync my devices
or run the service google_assistant.request_sync
.Error during linking: “Could not update the setting. Please check your connection”
Free Google Speaker Spotify Link
Your fulfillment URL may be invalid or unreachable. Recheck the
Fulfillment URL
as specified in Manual Setup and verify that it’s publicly reachable.NGINX
Spotify Google Assistant Free Courses
When using NGINX, ensure that your
proxy_pass
line does not have a trailing /
, as this will result in errors. Your line should look like:Spotify Google Assistant Free Music
Unlink and relink
If you’re having trouble with Account linking failed after you unlinked your service, try clearing the browser history and cache.
Spotify Google Assistant Free Training
Failed linking - Could not update the setting. Please check your connection
Google Assistant Download For Pc
If you’re having trouble linking your account, with the error message
Could not update the setting. Please check your connection
after logging into your Home Assistant instance, try setting expose_by_default: false
then exposing a single simple device (light or switch preferably). It is also worth checking if any home ad blocker is disabled if you are having issues.