Home Assistant Community Add-on: Spotify Connect

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!

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

Sorry for that. The question was more in the line of “is it doable somehow?”

Don’t be sorry, that is a perfectly valid question.
Doable, sure if you are running Hassio on a Generic Linux machine (e.g., Ubuntu) I guess you could create some kind of virtual audio device that actually sends it out. (But that is just tinkering, and not actually tried by myself).

The Google Home is already a Spotify Connect enabled device btw, so you don’t need anything special for that.

Sure it is, but Sonos´sound quality is superior by far.

I hope integration with GA comes soon, otherwise I´m looking into Volumio and a new sound setting.

Maybe you missed my point, Google Home already support Spotify Connect, since it is actually a Spotify client itself. Adds Spotify to your Google Home, and it will popup just like this add-on does.

If you use librespot, the actual library I imagine @frenck is using, you can output to a named pipe. Then you find a tool that accepts a named pipe as input and can cast to Sonos.

I use forked-daapd to do this with Airplay, for example.

Sounds promising, but I don´t know squat about programming. I was looking into consumer level stuff, thanks!

:tada: Release v0.2.0

Full Changelog

This release adds password checks against the HaveIBeenPwned password database and now supports the use of your Home Assistant secrets file! So you can now use !secret spotify_password as your password and the add-on will fetch the actual password from your secrets file.

Added

  • Secrets support and HaveIBeenPwned checks

Changed

  • Upgrades base image to v2.1.0
  • Sets default Shell
  • Less aggressive cleanup
  • Sets default Shell
  • Pins Ubuntu packages to specific versions
  • Updates README and links

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

:tada: Release v0.2.1

Full Changelog

Changed

  • Upgrades base image to v2.1.1

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

Is it possible to use this addon with multiple spotify-users?

So that the device pops up in my account and in the account of my wife? (linked in one family-account of spotify)

That is not yet possible, nevertheless, it is under development at the upstream project.

Hey Frenck, thanks for the great add on. Just wondering if this can output to a chromecast audio device? My goal is to use Alexa to stream audio to my speakers which are connected with the Chromecast Audio. Please let me know if this is possible already?

Discourse had this handy search button at the top: Home Assistant Community Add-on: Spotify Connect

Do you know of any other solution I can achieve this then, mate?