- Official Post
I read on previous posts that getting an appkey from that link can take several weeks. Is there any chance to speed up this process?
Ask Spotify
Apply for a key, nevertheless: every journey starts with a first step
I read on previous posts that getting an appkey from that link can take several weeks. Is there any chance to speed up this process?
Ask Spotify
Apply for a key, nevertheless: every journey starts with a first step
So I have been playing around with a USB DAC that I just bought HiFime Sabre 9018 USB DAC
It works fine with Kodi and Spotify after first setting it up and booting. I chose sysdefault:CARD=Audio from the Spotify Connect Web app and then PCM etc. Shows up instantly and doesn't even have to be connected during before you boot up LibreElec.
Here's the annoying part: if I reboot the LibreElec from the menu, it stops working. When I try to select a different audio device to use from the Spotify app i just get an error. I tried selecting the HDMI/Analog for Kodi in case they were having issues sharing the same output device, but this doesn't resolve the issue.
It works if I unplug the USB DAC and then do the following:
1. Reselect the integrated HDMI/ANALOG output device while the DAC is disconnected. Select OK
2. Insert the USB DAC again and go back to output device selection, then it will let me pick the DAC again and LibreElec almost instantly shows up on my Spotify app and works again.
I've taken a snippet of the log, the first is the device which seems to register as the default audio device for Spotify, hw:0. The next is the error after rebooting the Pi and it tries to use the USB DAC again and can't find it.
06:53:16.646 T:1961923696 NOTICE: Enumerated ALSA devices:
06:53:16.646 T:1961923696 NOTICE: Device 1
06:53:16.646 T:1961923696 NOTICE: m_deviceName : @:CARD=Audio,DEV=0
06:53:16.646 T:1961923696 NOTICE: m_displayName : SA9023 USB Audio
06:53:16.646 T:1961923696 NOTICE: m_displayNameExtra: Analog
06:53:16.646 T:1961923696 NOTICE: m_deviceType : AE_DEVTYPE_PCM
06:53:16.646 T:1961923696 NOTICE: m_channels : FL,FR
06:53:16.646 T:1961923696 NOTICE: m_sampleRates : 48000
06:53:16.646 T:1961923696 NOTICE: m_dataFormats : AE_FMT_S16NE,AE_FMT_S16LE
06:53:16.646 T:1961923696 NOTICE: m_streamTypes : No passthrough capabilities
06:56:29.041 T:1874850720 WARNING: CPythonInvoker(15): Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.
06:56:31.074 T:1874850720 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'alsaaudio.ALSAAudioError'>
Error Contents: No such file or directory [hw:0]
Traceback (most recent call last):
File "/storage/.kodi/addons/service.spotify-connect-web/wizard.py", line 42, in <module>
mixers = [mixer for mixer in alsa.mixers(cardindex=cardx, device=device)
ALSAAudioError: No such file or directory [hw:0]
-->End of Python script error report<--
Display More
I'm at a loss here and I realize this is probably not a priority, though I wanted to be able to use LibreElec hooked up to a sound system to stream spotify headlessly (no HDMI), so this kinda sucks
awiouy:
I've been trying to get spotifyconnectweb app working seperately on a headless installation and had quite a bit of problems creating a systemd service without a seperate script... What I've learned with help from your script and trial and error is that unless you create a sepearte script, it seems to be very picky about accepting arguments such as --username, --password, --key etc. It just produces an error when starting the service. It works fine if i use the chrooted version, but not the smaller one with built-in dependencies, which is preferrable.
So I solved this by specifying the locations manually, which worked perfectly.
ExecStart=/pathto/spotifyconnectweb -k /pathto/spotify_appkey.key -n "Spotify Connect" -b 320 -c /pathto/credentials.json
Just wanted to share this in case it helps anyone else.. Thank you again for your great implementation, my next issue to tackle will be starting avahi.
Would it be recommended to just add this line of code to /etc/rc.local ?
Hi
I am in trouble getting the addon started.
Pi2 Libreelec 7.95.1
In the addon Configuration wizard I do see 2 Alsa devices and Mixer PCM.
The addon does not start. ip:4000 not working also. Console says something with device not found.
But if i open putty cd to addon and typing ./spotify-connect-web -u USERNAME -p PASSWORD -o hw:0,1
then everything is running like a charm.
I think the problem is -o hw=0,1
what syntax is needed within the Addon Configuration to tell the addon that it should use hw=0,1 ?
Display More
HiI am in trouble getting the addon started.
Pi2 Libreelec 7.95.1
In the addon Configuration wizard I do see 2 Alsa devices and Mixer PCM.
The addon does not start. ip:4000 not working also. Console says something with device not found.
But if i open putty cd to addon and typing ./spotify-connect-web -u USERNAME -p PASSWORD -o hw:0,1
then everything is running like a charm.
I think the problem is -o hw=0,1
what syntax is needed within the Addon Configuration to tell the addon that it should use hw=0,1 ?
Weird, ALSA/PCM are known to work.
If not, try to set playback device manually to hw=0,1
can u please tell me how to set the device manually to hw=0,1
can u please tell me how to set the device manually to hw=0,1
Select the playback device input field in the addon settings (instead of configuration wizard)
I already tried this. Does not work.
Starting in putty manually as described is working.
I already tried this. Does not work.Starting in putty manually as described is working.
Please describe your hardware and software configuration, ie: playback device, LE release, outputs of aplay -l, amixer and journalctl -u service.spotify-connect-web
The addon works out-of-the-box on vanilla LE for RPi2, and your configuration seems to be special
got it
correct syntax is hw:0,1 in the playback device input field
thanks for help all running fine now
Hello and thank you awiouy for this plugin.
I had similiar problems to HelpMeSpotify getting it to work with a USB soundcard. I'm on LE8, milhouse build from 10.02.2017 on a raspi 2 with a miniDSP 2x4HD.
'amixer' showed "amixer: Mixer attach default error: No such file or directory". The problem was that the soundcard was recognized as card 1 not card 0 and executing amixer without the specification of the device with the '-c 1' flag resulted in this error. I fixed this by making the USB device the default in /storage/.config/asound.conf :
The name of the card is found out with 'aplay -L'. For me the output containes lines like this: "sysdefault:CARD=m2x4HD". So the card name is 'm2x4HD'.
Now I tested the connect server and worked out the correct parameters by starting it from the command line. The working command for me was
./spotify-connect-web --key /storage/.kodi/userdata/addon_data/service.spotify-connect-web/spotify_appkey.key --playback_device sys
default:CARD=m2x4HD --mixer_device_index 0 --mixer 'miniDSP 2x4HD ' -u myusername -p mypassword
The name of the mixer is obtained by the output of 'amixer'. The other parameters were chosen like descriped in the projects repo.
By inspecting 'journalctl -u service.spotify-connect-web' I noticed that the passed name of the mixer 'miniDSP 2x4HD ' was truncated to 'miniDSP'. Also notice the trailing space in the name. Thanks miniDSP.... Spaces in names never bring any luck.
I followed the passing of the argument through the sources. The truncation happens at the calling of spotify-connect-web in bin/spotify-connect-web.start. Changing it in the following way made it work correctly:
...
[ "$scw_b" == "-" ] && scw_b=""
[ "$scw_b" ] && scw_b="-b $scw_b"
#[ "$scw_m" ] && scw_m="-m $scw_m"
[ "$scw_p" ] && [ "$scw_u" ] && scw_p="-p $scw_p" && scw_u="-u $scw_u"
cd "$ADDON_DIR"
./spotify-connect-web $scw_b \
-c "$ADDON_HOME/credentials.json" \
-k "$ADDON_HOME/spotify_appkey.key" \
-m "$scw_m" \
-n "$HOSTNAME" \
-o "$scw_o" \
$scw_p \
$scw_u \
--mixer_device_index "$index"
Display More
I guess there is a more clever way to do this which preserves your check if $scw_m is specified. I don't need it for now. Maybe this is something for the next update.
Also the integration of the "--dbrange " option in the gui would be nice. Thanks.
I hope this helps people with the same issues.
Display More
Hello and thank you awiouy for this plugin.
I had similiar problems to HelpMeSpotify getting it to work with a USB soundcard. I'm on LE8, milhouse build from 10.02.2017 on a raspi 2 with a miniDSP 2x4HD.
'amixer' showed "amixer: Mixer attach default error: No such file or directory". The problem was that the soundcard was recognized as card 1 not card 0 and executing amixer without the specification of the device with the '-c 1' flag resulted in this error. I fixed this by making the USB device the default in /storage/.config/asound.conf :
The name of the card is found out with 'aplay -L'. For me the output containes lines like this: "sysdefault:CARD=m2x4HD". So the card name is 'm2x4HD'.Now I tested the connect server and worked out the correct parameters by starting it from the command line. The working command for me was
Code./spotify-connect-web --key /storage/.kodi/userdata/addon_data/service.spotify-connect-web/spotify_appkey.key --playback_device sys default:CARD=m2x4HD --mixer_device_index 0 --mixer 'miniDSP 2x4HD ' -u myusername -p mypassword
The name of the mixer is obtained by the output of 'amixer'. The other parameters were chosen like descriped in the projects repo.
By inspecting 'journalctl -u service.spotify-connect-web' I noticed that the passed name of the mixer 'miniDSP 2x4HD ' was truncated to 'miniDSP'. Also notice the trailing space in the name. Thanks miniDSP.... Spaces in names never bring any luck.
I followed the passing of the argument through the sources. The truncation happens at the calling of spotify-connect-web in bin/spotify-connect-web.start. Changing it in the following way made it work correctly:Code Display More... [ "$scw_b" == "-" ] && scw_b="" [ "$scw_b" ] && scw_b="-b $scw_b" #[ "$scw_m" ] && scw_m="-m $scw_m" [ "$scw_p" ] && [ "$scw_u" ] && scw_p="-p $scw_p" && scw_u="-u $scw_u" cd "$ADDON_DIR" ./spotify-connect-web $scw_b \ -c "$ADDON_HOME/credentials.json" \ -k "$ADDON_HOME/spotify_appkey.key" \ -m "$scw_m" \ -n "$HOSTNAME" \ -o "$scw_o" \ $scw_p \ $scw_u \ --mixer_device_index "$index"
I guess there is a more clever way to do this which preserves your check if $scw_m is specified. I don't need it for now. Maybe this is something for the next update.
Also the integration of the "--dbrange " option in the gui would be nice. Thanks.I hope this helps people with the same issues.
How long does ot take to get a spotify app key?
I send a request a couple of days ago but still nothing...
Hello, first of all, THANKS! Great Idea to bring SC to LE. Have a original Pi2, fresh LE 8.00, installed from repo ... set BitRate to 320, Playback Device: hw:0,1 (also hw:0,0), Mixer PCM... no sound and addon does not startup automatic; can start from shell so it appears on other devices .. controls on webinterface are working then if i select the device .. but bad silence
Got this from terminal:
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/confmisc.c:767:(parse_card) cannot find card 'default'
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/conf.c:4850:(snd_config_expand) Evaluate error: No such device
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM default:CARD=default
HowTo?
Thanks in advance for serving me
Display More
Hello, first of all, THANKS! Great Idea to bring SC to LE. Have a original Pi2, fresh LE 8.00, installed from repo ... set BitRate to 320, Playback Device: hw:0,1 (also hw:0,0), Mixer PCM... no sound and addon does not startup automatic; can start from shell so it appears on other devices .. controls on webinterface are working then if i select the device .. but bad silenceGot this from terminal:
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/confmisc.c:767:(parse_card) cannot find card 'default'
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/conf.c:4371:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/conf.c:4850:(snd_config_expand) Evaluate error: No such device
ALSA lib /home/chewitt/LibreELEC.80-official/build.LibreELEC-RPi2.arm-8.0.0/alsa-lib-1.1.2/src/pcm/pcm.c:2450:(snd_pcm_open_noupdate) Unknown PCM default:CARD=defaultHowTo?
Thanks in advance for serving me
Just use the Spotify Connect Web add-on
Just use the Spotify Connect Web add-on
i do :-)! But it does not as expected
i do :-)! But it does not as expected
Have you used the configuration wizard (click on the wizard button in the settings of the addon)?
Have you used the configuration wizard (click on the wizard button in the settings of the addon)?
Yes, also ... first the wizzard then manually
Is it possible to add this to LibreElec?: GitHub - shanemeagher/service.librespot: Spotify Connect Addon for LibreELEC