Home Assistant Community Add-on: Spotify Connect

This add-on is provided by the Home Assistant Community Add-ons project.

GitHub Release GitLab CI Project Stage Project Maintenance

Supports armhf Architecture Supports armv7 Architecture Supports aarch64 Architecture Supports amd64 Architecture Supports i386 Architecture

Play Spotify music on your Home Assistant device.

About


The Hass.io Spotify Connect add-on allows you to use your device, running Home Assistant, to play your Spotify music. This add-on uses the Spotify Connect protocol, which makes it a device that can be controlled by all the official clients.

For example; Running Home Assistant on a Raspberry Pi with this add-on installed will allow you to play your Spotify music on the Pi. So all you’ll have to do is hook up your sound system to the Pi and start booming!

Installation


The installation of this add-on is pretty straightforward and not different in comparison to installing any other add-on.

  1. Search for the “Spotify Connect” add-on in the add-on store and install it.
  2. Select your audio output device and hit Save on that as well.
  3. Start the “Spotify Connect” add-on.
  4. Check the logs of the “Spotify Connect” to see if everything went well.
  5. Ready to go!

Support


You can always try to get support from the community here at the Home Assistant community forums, join the conversation!

Questions? You have several options to get them answered:

You could also open an issue on GitHub, in case you ran into a bug, or maybe you have an idea on improving the addon:

:information_source: At this moment our Home Assistant Community Add-ons Discord chat server and GitHub are our only official support channels. All others rely on community effort.

Repository on GitHub


Looking for more add-ons?


The primary goal of our add-ons project is to provide you (as a Home Assistant user) with additional, high quality, add-ons that allow you to take your automated home to the next level.

Check out some of our other add-ons in our Home Assistant Community Add-ons project.

6 Likes

About the author of this add-on

Hi there!

I am Franck Nijhof, and I have 30 years of programming experience, in many languages. I am using this experience to work on the Home Assistant project by giving back my knowledge and time to the open source community.

The add-on you are currently looking at right now was developed/packaged by me. It is not the only add-on I have created; there are many many more :wink:

However, I have a problem… I am an addict. A :coffee: addict that is. Lucky for you, I turn that C8H10N4O2 (caffeine molecule) into code (and add-ons)!

If you want to show your appreciation, consider supporting me for buying a cup of high octane wakey juice via one of the platforms below! :heart:

Sponsor Frenck via GitHub Sponsors

Support Frenck on Patreon

Enjoy your add-on, while I enjoy the brain juice. :coffee:

Thanks for all the :two_hearts:

…/Frenck

Join our Discord server Follow me on Twitter Flollow me on Instragram Follow me on GitHub Follow me on YouTube Follow me on Twitch patreon-icon

P.S.: In case you want to ask me a question: AMA (Ask Me Anything). Most of the time I am online at the Discord chat. (I go by @Frenck in there as well).

Hi thanks for this great add-on, I will try it on my orange pi.
By the way, why the name of the add-on is not “Spotify Player” ?
Because the name looks likes an add-on to manage spotify connect but it’s more a player.

hi, i got my account linked to facebook how can i log in?

All you have to do is “Set device password” from Spotify Web interface. Use the generated device username and the password you just set in Spotify Connect config.

Thanks got the username, but the password?

From Spotify wd interface “Set device password”, click “SEND EMAIL TO SET PASSWORD”. One you receive the email, click the hyperlink to set the password you own.

Use the now set password ub Spotify Connect config.

Works for me…

Hello!
I am interested if it is possible to install this addon on Home assistant running on docker instead of Hass.io?

Hi,

My Rasperry PI is connected to my home cinema amplifier. The output volume seems a bit low. Is there a way to set the default volume to 100%?

Thanks.

1 Like

At this point I’m not sure of that is a bug or something else.
If you change the volume on your Spotify client, it should affect the volume of the add-on as well.

Something you could try / check. Use the community ssh add-on, ensure it has the same audio device mapped in its settings. Run apk update && apk add alsa-utils, try to check if the system volume is at 100%

Nevermind, found a bug! Thank you! Will update soon.

Hi, thanks for the addon.
I just tried it, it looks like it is playing on the Raspberry Pi, but there is no sound (using Jack output). :frowning:
I got this warning:

    INFO: Starting the Spotify daemon
    22:45:16 [INFO] e(BUsing software volume controller.
    22:45:17 [WARN] e(BFailed to register IPv6 receiver: Os { code: 19, kind: Other, message: "No such device" }
    22:45:17 [INFO] e(BNo backend specified, defaulting to: alsa.
    22:45:17 [INFO] e(BConnecting to AP "gew1-accesspoint-b-lff6.ap.spotify.com:4070"
    22:45:17 [INFO] e(BAuthenticated as "8dxxxxxxxxxxxxxxxxxxxxxx6t1" !
    22:45:17 [INFO] e(BUsing alsa sink
    22:45:47 [INFO] e(BLoading track "Georgia" with Spotify URI "spotify:track:6Fha6tXHkL3r9m9nNqQG8p"
    22:45:48 [INFO] e(BTrack "Georgia" loaded
1 Like

Can you please let me know how to stream the spotify music to a google play music device instead? If this works, it would be supergreat!

1 Like

Hi version,

I had same problem. RPi wasn’t sending any audio through Jack output. Reboot your device with Jack plugged. It should resolve problem.

1 Like

Congratulations on the add-on, how do I install on homeassistant? many people do not use hassio.

You cannot install this add-on in that case. Add-ons are a Hassio only feature.

Are you able to make Xonar u7 work? I’ve connected via USB and selected output as Xonar by there is no sound :frowning:

’ Log
[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] 00-banner.sh: executing…

Hass.io Add-on: Spotify Connect v0.1.0
Play Spotify music on your Home Assistant device
From: Community Hass.io Add-ons
By: Franck Nijhof [email protected]

[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing…
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing…
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing…
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 20-config.sh: executing…
[cont-init.d] 20-config.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
INFO: Starting the Spotify daemon
17:24:31 [INFO] e(BUsing software volume controller.
17:24:31 [WARN] e(BFailed to register IPv6 receiver: Os { code: 19, kind: Other, message: “No such device” }
17:24:31 [INFO] e(BNo backend specified, defaulting to: alsa.
17:24:31 [INFO] e(BConnecting to AP “gew1-accesspoint-b-k4kn.ap.spotify.com:4070”
17:24:32 [INFO] e(BAuthenticated as “e69qencheeu7wnygr0kawcmxx” !
17:24:32 [INFO] e(BUsing alsa sink
17:24:32 [INFO] e(BCountry: “PL”
17:24:33 [INFO] e(BLoading track “I’m A Mess” with Spotify URI “spotify:track:0xCA70t1ZA4fa9UOE0lIJm”
17:24:34 [INFO] e(BTrack “I’m A Mess” loaded
ALSA lib pcm.c:8306:(snd_pcm_recover) underrun occurred
ALSA lib pcm.c:8309:(snd_pcm_recover) cannot recovery from underrun, prepare failed: File descriptor in bad state
17:25:16 [ERROR] e(BCaught panic with message: called Result::unwrap() on an Err value: -77`

HI, just to clarify, is it possible to use Hass.io Scripts to start to playback a spotify playlist with this, or do i need to use the spotify app on the phone manually?

There is a Spotify component in Home Assistant available.

Hello @frenck

Another wonderful Addon! what a streak!
I just wanted to ask if it would be possible, as someone asked before, to stream the sound to another device, like Sonos or Google cast or google home (obviously not supported right now…)

Thanks a lot for this hard work!

1 Like

That is not how Spotify Connect works, so: nope.