Giter Site home page Giter Site logo

hassio-addons / addon-spotify-connect Goto Github PK

View Code? Open in Web Editor NEW
161.0 7.0 50.0 762 KB

Spotify Connect - Home Assistant Community Add-ons

Home Page: https://addons.community

License: MIT License

Dockerfile 41.17% Jinja 58.83%
spotify spotify-connect spotify-client home-assistant homeassistant addon addons

addon-spotify-connect's Introduction

Home Assistant Community Add-on: Spotify Connect

GitHub Release Project Stage License

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

Github Actions Project Maintenance GitHub Activity

Discord Community Forum

Sponsor Frenck via GitHub Sponsors

Support Frenck on Patreon

Play Spotify music on your Home Assistant device.

The Spotify Connect add-on

About

The Home Assistant 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!

📚 Read the full add-on documentation

Support

Got questions?

You have several options to get them answered:

You could also open an issue here GitHub.

Contributing

This is an active open-source project. We are always open to people who want to use the code or contribute to it.

We have set up a separate document containing our contribution guidelines.

Thank you for being involved! 😍

Authors & contributors

The original setup of this repository is by Franck Nijhof.

For a full list of all authors and contributors, check the contributor's page.

We have got some Home Assistant add-ons for you

Want some more functionality to your Home Assistant instance?

We have created multiple add-ons for Home Assistant. For a full list, check out our GitHub Repository.

License

MIT License

Copyright (c) 2018-2024 Franck Nijhof

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

addon-spotify-connect's People

Contributors

askalice avatar dependabot[bot] avatar frenck avatar giannello avatar mrbaloghakos avatar renovate[bot] avatar tjorim avatar wapeety avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

addon-spotify-connect's Issues

16:05:49 [ERROR] (BCaught panic with message: called `Result::unwrap()` on an `Err` value: MercuryError

INFO: Starting the Spotify daemon
16:31:54 [INFO] �(BUsing software volume controller.
16:31:54 [WARN] �(BFailed to register IPv6 receiver: Os { code: 19, kind: Other, message: "No such device" }
16:31:54 [INFO] �(BNo backend specified, defaulting to: alsa.
16:31:54 [INFO] �(BConnecting to AP "gew1-accesspoint-b-6417.ap.spotify.com:4070"
16:31:55 [INFO] �(BAuthenticated as "ps|frostpanda" !
16:31:55 [INFO] �(BUsing alsa sink
16:31:55 [INFO] �(BCountry: "DE"
16:31:55 [WARN] �(Berror 400 for uri hm://remote/3/user/ps|frostpanda/
16:31:55 [WARN] �(Berror 400 for uri hm://remote/3/user/ps|frostpanda/
16:31:55 [ERROR] �(BCaught panic with message: called Result::unwrap() on an Err value: MercuryError
INFO: Starting the Spotify daemon

Log warning for "Reducing normalisation factor to prevent clipping. Please add negative pregain to avoid."

Problem/Motivation

Got the following log warning:

[WARN] (BReducing normalisation factor to prevent clipping. Please add negative pregain to avoid.

Expected behavior

For the log event to not happen.

Actual behavior

There was a log event.

Steps to reproduce

Not sure... play music?
Running Spotify Connect 0.3.0 on Hassio 0.84.2, using a Raspberry Pi 3 B and the inbuilt 3.5mm output jack to a speaker.

Proposed changes

Support more configuration options from spotifyd?
https://github.com/Spotifyd/spotifyd#configuration

Slow song

I don't know why but if I try to put a song it seems that is going too slow, I have Spotify premium

Add Dac support

Problem/Motivation

Able to use dac to improve sound quality. The pie audio jack is famous for bad audio quality,

Proposed changes

Able to use a different type of hats and generic soundcard via io pins. Probably a config for change different amps.

No sound - RasPi 3b+

Problem/Motivation

No sound plays despite spotify connect getting track information. I have confirmed my speakers are working. This ticket is identical to #6 in every way - there was just no way to necro it since it was closed as stale

"Connection reset by peer"

Problem/Motivation

The Spotify Connect always stops playing and disappears from Spotify after minutes or hours..

Last log:

13:21:51 [DEBUG] �(Btokio_core::reactor: loop poll - Duration { secs: 0, nanos: 11999621 }
13:21:51 [DEBUG] �(Btokio_core::reactor: loop time - Instant { tv_sec: 856475, tv_nsec: 863244412 }
13:21:51 [DEBUG] �(Btokio_core::reactor: loop process, Duration { secs: 0, nanos: 330573 }
13:21:51 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable | Error | Hup Token(16777220)
13:21:51 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
13:21:51 [DEBUG] �(Blibrespot_core::session: Invalidating session[0]
13:21:51 [DEBUG] �(Blibrespot_core::session: drop Dispatch
13:21:51 [ERROR] �(BOs { code: 104, kind: ConnectionReset, message: "Connection reset by peer" }
13:21:51 [TRACE] �(Bmio::poll: [<unknown>:905] deregistering handle with poller
13:21:51 [DEBUG] �(Btokio_reactor: dropping I/O source: 4
13:21:51 [DEBUG] �(Btokio_core::reactor: loop poll - Duration { secs: 0, nanos: 23846327 }
13:21:51 [DEBUG] �(Btokio_core::reactor: loop time - Instant { tv_sec: 856475, tv_nsec: 887542874 }
13:21:51 [DEBUG] �(Btokio_core::reactor: loop process, Duration { secs: 0, nanos: 232917 }

Fails to start

Problem/Motivation

Starting the add on says it has started, but refreshing the page or opening it in another tab shows that it has not started.

Steps to reproduce

Click Start
Nothing happens?

I am presented with this 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... 
[cont-init.d] 00-banner.sh: exited 267.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
s6-maximumtime: warning: child process crashed
[cont-finish.d] 99-message.sh: exited 111.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.

http://hassio.local:8123/api/hassio/addons/xxxxxxxxxx_spotify/start returns with {"result": "ok", "data": {}}

Some information about my device:

arch: "armhf"
channel: "stable"
last_version: "128"
timezone: "UTC"
version: "128"
wait_boot: 5
hostname: "hassio"
kernel: "4.14.66"
operating_system: "HassOS 2.2"
chassis: "embedded"
cpe: "cpe:2.3:o:home_assistant:hassos:2.2:*:development:*:*:*:rpi:*"
deployment: "development"

The only other add on I have installed is Configurator. In the Add-ons list it shows the add-on with a grey puzzle piece, and Configuator has a green one.

Alsa output disappear on output

Problem/Motivation

No alsa in rpi3 b+ to choise only "Built-in Audio Digital Stereo (IEC958)",

Glitch sound freezing

Expected behavior

Choise alsa sound and normal music on 3.5 mm jack

Actual behavior

I'ts working normalny yesterday. Today my output disappear. (Raspbian buster)
Screenshot_20200304-014031

how do I use it without a .io install? im running my hass on VM

Problem/Motivation

(Why the issue was filed)

Expected behavior

(What you expected to happen)

Actual behavior

(What actually happened)

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Configuration Issue

Hi, Thanks for sharing this with the community !

I tried to configure the Spotify Connect in Home Assistant (latest build) according to the documentation. This is my config : (exact user data changed for security reasons)

name: HomeAssistant
bitrate: 160
username: 123457890
password: mysecretpassword

When I press save I get the following error message :

Failed to save addon configuration, not a valid value for dictionary value @ data['options']. Got {'name': 'HomeAssistant', 'bitrate': 160, 'username': 123457890, 'password': 'mysecretpassword'}

Any idea what I do wrong here ?

Thanks & kind regards,

Tony

Lost connection after some time

After some time (5-10minutes) I am no longer able to use Spotify connect. If I play music when it happens it continues to play chached music then stops. Logs only states “connection reset by peer”
Restart the add on service and then all is good for a few more songs. Also happens if I stop playing and then return later to play music.

Anyone else seen this?

Launch spotifyd in discovery mode

Problem/Motivation

Spotify Connect is invisible to other accounts on the same network. Librespot doesn't have this limitation and from what I gather spotifyd can also be launched in discovery mode when the username and password are left empty. They do mention that there is a known issue with that, but I'm not sure what's the current status.

Expected behavior

Spotify Connect is discoverable on the network.

Actual behavior

Spotify Connect is linked to a specific account.

Steps to reproduce

By design, so no steps to reproduce.

Proposed changes

I propose that your add-on should allow launching spotifyd in discovery mode by not providing a username and password. If it doesn't work users can always just launch it with a username and password like before.

You might have already tried this, but I could only find issues saying that this is not (yet) possible with the spotifyd backend.

Bluealsa output

Problem/Motivation

I have bluetooth speaker connected to my Rasberry through bluealsa. And I'm searching for way how to add bluealsa output to this plugin. Maybe you can advice?

(Why the issue was filed)

Expected behavior

(What you expected to happen)

Actual behavior

(What actually happened)

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

BadCredential error if # in password

Problem/Motivation

If the password have a # in it, the authentication fail with a BadCredential error.

Probably link to the fact that # is use for comment in bash and some other programming language.

Expected behavior

Password with # character should be accepted.

Actual behavior

Having a # in the password give a BadCredential error.

Steps to reproduce

add a # at any position in the password to reproduce the behavior

Proposed changes

Issue with escaping character?

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Pick other Spotify Connect devices

Motivation

As I see this addon only allows to use your Hass.io instance as a Spotify Connect device. It'd be very useful for it to also add a UI card and/or expose a service to pick another Spotify Connect device from the available list.

My use case for this: I have a Yamaha AV receiver that is Spotify Connect capable, I can select it manually from the Spotify app but I would love to be able to tell my Google Home to play something on Spotify on that device (which I can't because it's not a chromecast). If this addon allowed me to pick a device I could expose a switch to Google Home that when flipped would call a service to select the Yamaha AV as the current Spotify Connect device.

Prevent a CEC-enabled TV from coming out of standby

Problem/Motivation

First of all, great add-on to Home Assistant! Thanks for bringing this to Hass.io! I'm slowly migrating from Raspbian to the Hass.io platform and I'm now switching from Raspotify to this new add-on. I installed the add-on and plugged it into my receiver. As the Raspberry Pi 3 Model B+ is sending a CEC signal on boot, my TV and receiver will both turn on after a reboot of the Raspberry Pi. This also switches the TV channel to the Raspberry Pi input, which is annoying as I'm only using the Pi for music and Home Assistant.

Expected behavior

The TV should not turn on by CEC.

Actual behavior

The TV turned on and switched channel to the Raspberry Pi.

Steps to reproduce

Connect the Raspberry Pi with the latest Hass.io and Spotify module to a CEC-enabled TV. Restart the Raspberry Pi. It should turn on the TV and switch channels to the Raspberry Pi.

Proposed changes

With Home Assistant running on Raspbian, I used hdmi_ignore_cec_init=1 in the boot/config.txt to get this fixed. I don't see a possibility to do this now with Hass.io. (More info)

As some users might also use plug-ins that requires CEC, it should be an easy to enable/disable setting in the plug-in or in Home Assistant.

Thanks!

Login through Facebook Account

Problem/Motivation

I created my account using facebook (big mistake) and I don't have a password for spotify.

Expected behavior

Login to spotify Connect

Actual behavior

Don't have the requested credentials

Steps to reproduce

Make a facebook spotify account (?)

Proposed changes

Integrate Oauth or client id and client secret just like how home assistant does it.

Enable Multiple accounts with same device with multiple spotifyd instances

As I can't comment on #5:

It is possible to use multiple instances of this add-on to archive multiuser "support". It creates overlapping sounds which is fine for me.

So, what I did was creating my own add-on repository (https://github.com/maurice-schleussinger/repository, up to date as of 01.03.2019) and add just another instance of this add-on.

It would be nice to have at least this dirty hack workaround out of the box (you could spawn multiple instances of spotfiyd if there are multiple username/password blocks in the config for example.

GitHub
Community Hass.io Add-ons for Home Assistant. Contribute to maurice-schleussinger/repository development by creating an account on GitHub.

No sound - RasPi 3b+

Problem/Motivation

No sound plays despite spotify connect getting track information. I have confirmed my speakers are working.

Steps to reproduce

Hardware: RasPi 3b+
Software:

  • Spotify connect 0.1.0
  • HassOS 1.7
  • Supervisor 123

I have tried restarting the device and setting both bcm2835_alsa - bcm2835 ALSA: 0 and bcm2835_alsa - bcm2835 ALSA: 1 as the audio output devices. I'm not sure how to list alsa devices on HassOS.

Logs

Info log level

[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
20:50:12 [INFO] �(BUsing software volume controller.
20:50:12 [WARN] �(BFailed to register IPv6 receiver: Os { code: 19, kind: Other, message: "No such device" }
20:50:12 [INFO] �(BNo backend specified, defaulting to: alsa.
20:50:12 [INFO] �(BConnecting to AP "gae2-accesspoint-b-7jk7.ap.spotify.com:4070"
20:50:13 [INFO] �(BAuthenticated as "######" !
20:50:13 [INFO] �(BUsing alsa sink
20:50:13 [INFO] �(BCountry: "##"
21:46:32 [INFO] �(BLoading track "#################" with Spotify URI "spotify:track:#################"
21:46:34 [INFO] �(BTrack "#################" loaded
21:48:37 [INFO] �(BLoading track "#################" with Spotify URI "spotify:track:#################"
21:48:39 [INFO] �(BTrack "#################" loaded
21:48:59 [INFO] �(BLoading track "#################" with Spotify URI "spotify:track:#################"
21:49:02 [INFO] �(BTrack "#################" loaded

Debug log level

20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:198] frame decoded from buffer
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:198] frame decoded from buffer
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:198] frame decoded from buffer
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:198] frame decoded from buffer
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_write: [<unknown>:188] flushing framed transport
20:48:09 [TRACE] �(Btokio_io::framed_write: [<unknown>:208] framed transport flushed
20:48:09 [DEBUG] �(Btokio_core::reactor: loop poll - Duration { secs: 0, nanos: 147469707 }
20:48:09 [DEBUG] �(Btokio_core::reactor: loop time - Instant { tv_sec: 2149, tv_nsec: 18767059 }
20:48:09 [DEBUG] �(Btokio_core::reactor: loop process, Duration { secs: 0, nanos: 273588 }
20:48:09 [TRACE] �(Blibrespot_audio::fetch: [/root/.cargo/git/checkouts/librespot-06fda9f186b35c32/431be9e/audio/src/fetch.rs:296] chunk 83 / 87 complete
20:48:09 [TRACE] �(Blibrespot_audio::fetch: [/root/.cargo/git/checkouts/librespot-06fda9f186b35c32/431be9e/audio/src/fetch.rs:173] requesting chunk 84
20:48:09 [DEBUG] �(Btokio_core::reactor: loop poll - Duration { secs: 0, nanos: 1092998 }
20:48:09 [DEBUG] �(Btokio_core::reactor: loop time - Instant { tv_sec: 2149, tv_nsec: 20259267 }
20:48:09 [DEBUG] �(Btokio_core::reactor: loop process, Duration { secs: 0, nanos: 270463 }
20:48:09 [TRACE] �(Btokio_io::framed_write: [<unknown>:188] flushing framed transport
20:48:09 [TRACE] �(Btokio_io::framed_write: [<unknown>:191] writing; remaining=53
20:48:09 [TRACE] �(Btokio_io::framed_write: [<unknown>:208] framed transport flushed
20:48:09 [DEBUG] �(Btokio_core::reactor: loop poll - Duration { secs: 0, nanos: 842066 }
20:48:09 [DEBUG] �(Btokio_core::reactor: loop time - Instant { tv_sec: 2149, tv_nsec: 21564865 }
20:48:09 [DEBUG] �(Btokio_core::reactor: loop process, Duration { secs: 0, nanos: 136352 }
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:198] frame decoded from buffer
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:198] frame decoded from buffer
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:198] frame decoded from buffer
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:198] frame decoded from buffer
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_reactor: [<unknown>:371] event Readable | Writable Token(16777220)
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:198] frame decoded from buffer
20:48:09 [DEBUG] �(Btokio_reactor: loop process - 1 events, 0.000s
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:198] frame decoded from buffer
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:198] frame decoded from buffer
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:198] frame decoded from buffer
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:198] frame decoded from buffer
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:198] frame decoded from buffer
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:198] frame decoded from buffer
20:48:09 [TRACE] �(Btokio_io::framed_read: [<unknown>:195] attempting to decode a frame

Using spotify-connect with multiple accounts

Problem/Motivation

Hi there. Thank you for a great add-on! We are now enjoying Spotify in multiple rooms. I'm wondering wether it would be somehow possible to change this add-on so it can be controlled by more than one premium account. We all have our own Spotify premium (family) account at home, but only the one who has entered his/her username and pw in the spotify-connect addon is able to connect to it. The only option at the moment is to all use the same Spotify account.

Regards,
John

hassio entity not appearing, add-in running well

Hi,

Fairly new to hassio in general, so I'm very aware this may be me being newbie.

I have installed the Spotify connect add-in in hass.io, configured the config file and started, the log looks happy (even at debug level), but I cannot seem to add the entity in dashboard etc.

Any thoughts?

Thanks in advance

Not possible to select the device from other Spotify instances

Problem/Motivation

I hope this issue is not related to this one: home-assistant/plugin-audio#7 (comment)
From my prospective after upgrading to "HassOS Release-3 build 12 (Stable)" I am not able to select this add-in device from other instance (like spotify app on my phone).

(Why the issue was filed)

Expected behavior

I should be able to select "HomeAssistant" (default device name in configuration file of the add-on) from any my other Spotify app running on the same network.

(What you expected to happen)

Actual behavior

Now I can see this device but it is "gray" and not possible to select it, see picture below:
obraz

(What actually happened)
I have uninstalled and installed add-one, restarted hassio, restarted laptop. No change.
Here is the log from add-on:

 Hass.io Add-on: Spotify Connect
 Play Spotify music on your Home Assistant device
-----------------------------------------------------------
 Add-on version: 0.8.0
 You are running the latest version of this add-on.
 System: HassOS 3.12  (armv7 / raspberrypi4)
 Home Assistant Core: 0.106.5
 Home Assistant Supervisor: 209
-----------------------------------------------------------

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

start fail

after the big hass.io update the spotify add on wont start

this is the 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...
[cont-init.d] 00-banner.sh: exited 267.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing...
s6-maximumtime: warning: child process crashed
[cont-finish.d] 99-message.sh: exited 111.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.

Add configuration option for linear volume

Problem/Motivation

librespot supports a --linear-volume option that allows a - subjectively - better user experience. The default volume scale is precise at low volumes, and blows up speakers as soon as the dial is turned past a certain point, and the problem gets worse with more powerful DACs/amps.

Expected behavior

Allow using linear-volume as a configuration parameter

Discovery Mode needs access to local network

Problem/Motivation

Recently discovery mode was added but it doesn't seem to work #33 (comment)

Expected behavior

If you leave username and password empty, a spotify connect instance should be discoverable on the local network instead of establish a connection with spotify api.

Actual behavior

The instance is not discoverable on the local network BUT appears on the bridged (private) hassio network (i can see the HA discovers the instance but its an unknown type, so it discards it)

Steps to reproduce

Run addon in discovery mode (empty user/pass)

Proposed changes

librespot uses mDNS to publish the listening port. mDNS uses IP multicast but is bounded to the internal private network, so it doesn't propagate to the users/clients .

A possible solution could be set host_network: true in the addon config

Requires restart every time I use it

Problem/Motivation

Every day I need to restart the addon in hassio for it to show up in spotify. The green icon indicating it is running is on but the log doesn't show anything until I restart. I've had this add-on for a long time and have always updated it but nothing has changed. It's not the worst thing, I really like this add-on, but it would be great if I didn't have to go through the hassio panel every time I want to use it. Has anyone else encountered this?

Feature Request - Enable Pipe Audio Output

Would it be possible to add the option to play the audio to a named FIFO pipe?
According to the spotifyd issue #198 (Spotifyd/spotifyd#198) this can be achieved by changing the spotifyd.service file and and append to the ExecStart line.

With a named pipe the playing audio could be used in conjunction with a multiroom player like snapcast server, pushing the Spotify Audio into all the rooms in sync.

Music sounds like demons are getting slayed

Problem/Motivation

I tried to setup Spotify Connect on my Hass.io installation but when I try to play music it sounds weird. I can't even recognize the songs it just plays weird sounds. It sounds like demons are getting slayed. Maybe the speed of the tracks is much too slow, I can't say.

Expected behavior

Normal music.

Actual behavior

Weird sounds. It doesn't really sounds like music but if I stop/start a track those weird sounds stop/start.

Steps to reproduce

It randomly appeared, can't say.

I am using Spotify 8.5.3.716 on Android 10 (LOS17) and the newest version of Hass.io and Spotify Connect. (The problem also appears by using different Spotify clients eg. on my laptop).

The logs:

[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
 Play Spotify music on your Home Assistant device
-----------------------------------------------------------
 Add-on version: 0.6.1
 You are running the latest version of this add-on.
 System: HassOS 2.12  (armv7 / raspberrypi3)
 Home Assistant version: 0.103.5
 Supervisor version: 193
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] spotifyd.sh: executing... 
[cont-init.d] spotifyd.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[16:41:45] INFO: Starting the Spotify daemon...
16:41:45 [INFO] �(BUsing software volume controller.
16:41:45 [WARN] �(BFailed to register IPv6 receiver: Os { code: 19, kind: Other, message: "No such device" }
16:41:45 [INFO] �(BNo backend specified, defaulting to: alsa.
16:41:46 [INFO] �(BConnecting to AP "<sthHere>.ap.spotify.com:443"
16:41:46 [INFO] �(BAuthenticated as "<myUsernameHere>" !
16:41:46 [INFO] �(BUsing alsa sink
16:41:46 [INFO] �(BCountry: "DE"

No playback after update to 0.6.0

After upgrade to version 0.6.0 i get no playback but error:

21:22:12 [ERROR] �(BAlsa error PCM open ALSA function 'snd_pcm_open' failed with error 'ENOENT: No such file or directory'
21:22:12 [ERROR] �(BCould not start audio: Alsa error: PCM open failed

It is possible to downgrade to 0.5.2?

Disconnect after 24h or if router get's a new IP

Problem/Motivation

After 24h or if the route receives a new IP address by the provider, which usally happens in the night after 24h, the plugin keps active but is no longer reachable through Spotify. I switched on the logs "error" to see what happens, but did not found anything in the logs pointing in the right direction yet.

Expected behavior

The plugin should stay active and reachable.

Actual behavior

The plugin runs, but Spotify can't see it as a client.

Steps to reproduce

Difficult. I only see the behaviour after the route get a new lease (receives a new external IP address by the provider.

Proposed changes

I do not have a propose for change, besides the question. Is possible to extract all logs from the plugin besides the extract via the webUI?

Sound distortion on RPi4

Problem/Motivation

Spotify add-on not possible to use - music played with "terrible" distrotion.

(Why the issue was filed)

Expected behavior

Normal music played

(What you expected to happen)

Actual behavior

And afternoon tried to use Spotify plugin - possible to connect from laptop but no music. I have uninstalled and installed again and this made music played but with strange distortion - actullay not possible to listen.

(What actually happened)
2 days ago I have upgraded to version 0.8.0 and new functionality (disocvery) was working great and music was playing with no problems.
Yesterdau I have upgarded hass.io core to 0.106.4 and today to 0.106.5. - maybe this is the problem ?
When I check the hardware from Supervisor/SYSTEM/HARDWARE option i see the following on audio:
audio:

0:
    name: bcm2835_alsa - bcm2835 ALSA
    type: ALSA
    devices:
        [object Object]
        [object Object]
        [object Object]

I think some time ago I coudl see some devices...

Steps to reproduce

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

RPI4 volume issue

Problem/Motivation

When streaming with my RPI4 the audio on full volume, the sound is just full off noice. Like the speakers can't handle the audio.

Proposed changes

By setting the volume of spotify to 25% the audio is fine. Any louder through the app and the music quality is terrible.

ChannelError. Next song not loaded.

So I was listening to spotify via my Hassio installed on Docker through a USB DAC without problems for a long while, but suddenly it stopped. The next song could not be loaded. In the add-on log for Spotify Connect the following error appeared every time i tried to load a song. The issue had resolved itself after some time, because when I tried to load a song after dinner, it played my requested songs without problems.

Anyone a clue how this issue can be resolved?

I inserted {my-own-username} for the sake of privacy.

[19:17:55] INFO: Starting the Spotify daemon...
Loading config from "/etc/spotifyd.conf"
No proxy specified
Using software volume controller.
Connecting to AP "gew1-accesspoint-b-7q0z.ap.spotify.com:443"
Authenticated as "{my-own-username}" !
Using alsa sink
Country: "NL"
Loading <Home> with Spotify URI <spotify:track:0ZUMBOzlwNXfVE4Z8lSrsd>
channel error: 2 1
Caught panic with message: called `Result::unwrap()` on an `Err` value: ChannelError
Caught panic with message: called `Result::unwrap()` on an `Err` value: "SendError(..)"
Player thread panicked!

This is my configuration of the add-on:

name: ZwoelStation
bitrate: 320

[WARN] Failed to resolve Access Point: HTTP error

Problem/Motivation

Spotify Connect not running on Ubuntu 18.04 VM (on Proxmox) with USB DAC.

[ERROR] �(BCaught panic with message: called `Result::unwrap()` on an `Err` value: Custom { kind: Other, error: StringError("failed to lookup address information: Temporary failure in name resolution") }
INFO: Starting the Spotify daemon

(Why the issue was filed)

Expected behavior

(What you expected to happen)

I hoped it would work 😄

Actual behavior

(What actually happened)

Log Output: https://ghostbin.com/paste/eefoz

Hassio does not show up as a device on Spotify Connect.

Steps to reproduce

(How can someone else make/see it happen)

Run an Ubuntu 18.04 VM with Hass.io on Proxmox
Map the USB DAC to the VM
Run the Spotify Connect plugin
See the error log

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

it seems like the container is having DNS(?) issues because it says failure in Name Resolution ?
Is the container having issues connecting to the internet/spotify for authentication?
Is it something on my end that I can fix either on the VM or on Proxmox?

rPI4 sound only over HDMI

Problem/Motivation

Using a rPI 4, When playing sound from spotify, the jack keep silent.
If plugin a hdmi on hdmi0 port and turning on the TV, the sound is played on the TV.

I did try with the 3 available output shown in the addon page, but the result is always the same.

Expected behavior

Being able to play sound using the jack.

Actual behavior

Sound played only through hdmi

Steps to reproduce

add the 'spotify connect' addon,
provide your credential for the service to login
select any of the 3 output
Plug a hdmi cable (if not plug qnd play, rPI need to be restarted with the cable plugged)
turn the TV on
select the home-assistant playback device in spotify
play sound on spotify

Music come from the TV

Proposed changes

None

Does not show up in spotify.

Problem/Motivation

After some time, the connect instance is not shown in spotify. Before that no problem playing via the server.

Expected behavior

To always show up in spotify, when started on hass.io

Actual behavior

After some time (unclear how long) the server is not showing up in spotify. No info in the log.
This might be a spotify issue, but restarting the server in hass.io fixes it every time..

Steps to reproduce

Unclear.

Proposed changes

Is there a heartbeat function, to keep the server alive?

Request: have spotify player as a device or entity in HA

Problem/Motivation

The add-on works great! Thanks for making it and investing the time to make it work so flawlessly.

As a feature request, I'd like to trigger an automation based on the play/pause state and am hence looking to have it exposed in HA: My HA is connected to a classic amp + loudspeaker pair and I'd like to turn on the amp using a remote-controlled wall-socket as soon as the player comes on. Whenever it's done playing for a minute or two, I want to turn the amp off again.

Expected behavior

Have the spotify player appears as a (restricted) media_player in HA. If that's not possible, at least expose its state or play events so automations can be triggered based on it.

Actual behavior

The spotify player works fine but does not expose its state to the HA instance it runs on

Steps to reproduce

Start the add-on, notice it doesn't appear in Entities, Devices or Integrations

Proposed changes

Wire the controls of a media_player to the add-on so it's fully integrated into HA. Alternatively, offer events that indicate what happened, allowing a reaction inside HA.

Can't choose USB soundcard

I just installed latest stable hass.io, 1.9, and installed the connect addon, but i can't choose my usb-soundcard as playback device. it's available as input device

image

The add-on tries to read packets from shelly devices

I updated the system to 0.115.3 and now I'm not able to see the device in Spotify, searching in logs I found this:

couldn't parse packet from V4(192.168.1.4:5353): type 47 is invalid

In my network on that address there's a Shelly with original firmware, as MQTT broker I use on my raspberry Mosquitto broker

Revise/improve all log messages

Problem/Motivation

There are several reasons for this:

  • Not all log messages are consistent across all add-ons.
  • Some messages are unclear to the novice user.

Automations: check state of Spotify Connect

I’ve installed Hass.io on my Raspberry Pi 3b+ and installed the Spotify Connect add-on and linked a smart plug that is connected to my amplifier. Next challenge is to automate: I want the switch of the amplifier to turn on if the Raspberry Pi is playing audio (e.g. via Spotify Connect).

Does the spotify connect add-on offer states I can check to see if audio is playing?

Error after update to 0.3

After update can't hear any sound and log is full of:
09:23:18 [ERROR] �(BAlsa error PCM open -16
09:23:18 [ERROR] �(BCould not start audio: Alsa error: PCM open failed

Not showing in other Spotify accounts on same wifi?

Problem/Motivation

My girlfriends Iphone has never seen the hass.io spotify speakers, and can not use them, but i can with my android..

Expected behavior

I am guessing that this is due to that we are logged in to different accounts? But i thought that she would see the speakers and use my account to play music?

Actual behavior

She can't se the speakeras

Steps to reproduce

Share a speaker in hass.io with one account. Try to see it (using the same wifi) on a phone with spotify logged in with a different account..

Proposed changes

Is it possible to use multiple accounts in configuration?

Bluetooth audio device

Problem/Motivation

Can i use bluetooth audio device with this addon? I have hass on my rpi and bluetoothctl on it.

Next song ‘event’

Would it be possible to have events for the next song. In the log of the integration you see which song is currently playing and which songs have been played already.

I would love it if I could create automations based on that data!

logs from spotify install, not seeing it in interface, log in credentials are correct.am I missing somerthing?

Problem/Motivation

hi, not seeing spotift in main view, account and password are correct?

INFO: Starting the Spotify daemon
08:38:34 [INFO] �(BUsing software volume controller.
08:38:34 [WARN] �(BFailed to register IPv6 receiver: Os { code: 19, kind: Other, message: "No such device" }
08:38:34 [INFO] �(BNo backend specified, defaulting to: alsa.
08:38:35 [INFO] �(BConnecting to AP "gew1-accesspoint-b-sxp5.ap.spotify.com:4070"
08:38:35 [INFO] �(BAuthenticated as "7777777777" !
08:38:35 [INFO] �(BUsing alsa sink
08:38:35 [INFO] �(BCountry: "GB"

Noisy sound output on Raspi3 after Hassos , HA update ( same addon version 0.80)

Problem/Motivation

distorted audio on Rpi after Hassos update

(Why the issue was filed)

Expected behavior

the addon was working perfect prior to hassos 3.12 , unsure what is generating the incompatibility

(What you expected to happen)

Actual behavior

the audio is totally distorted like being received at a very low bpm rate .

(What actually happened)

Steps to reproduce

just use a PI3 , with hassos 3.12 and HA 106.5

(How can someone else make/see it happen)

Proposed changes

(If you have a proposed change, workaround or fix,
describe the rationale behind it)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.