Spotify Connect Web

  • Spotify Connect Web is replaced by Librespot, and is not further maintained.


    Team LibreELEC is pleased to announce that Spotify Connect Web is available as an addon from the LibreELEC repository.


    Unfortunately, the spotify-connect-web project, on which the addon is based, does not run on every LibreELEC project, and overcoming this limitation lies with the spotify-connect-web project. As a consequence thereof, Spotify Connect is only available for Raspberry Pi 2 and 3, Wetek Core and Wetek Play.


    Operation
    1. Install the addon
    2. Get your spotify_appkey.key from here
    3. Place the spotify_appkey.key in the addon home folder, usually smb://libreelec.local/userdata/addon_data/service.spotify-connect-web
    4. Optionally enter your Spotify username and password
    5. Configure ALSA with the wizard
    6. Save the settings
    7. Check the service with the web interface at port 4000
    8. Play Spotify through the service, using a Spotify app as a remote
    9. Enjoy!


    Further Reading
    spotify-connect-web README.md
    Spotify Connect forum thread


    Feedback
    Please share your feedback on this thread.


    Enjoy!

    @

    The post was edited 2 times, last by awiouy ().


  • Sorry this is not working...


    8.0.90 worked fine... Ever since the submission to libreelec repo, the addon updated to 8.0.100 and now I cannot see the device available from my iPhone spotify app.


    If I revert back to 8.0.90 then it works perfectly again.



    RPi 3 - latest Milhouse nightlies
    Iphone - ios 9.3.3



    Cheers,
    Loggio.


  • Sorry this is not working...


    8.0.90 worked fine... Ever since the submission to libreelec repo, the addon updated to 8.0.100 and now I cannot see the device available from my iPhone spotify app.


    Hello Loggio,


    I am sorry to read that it is not working for you, and glad you could find a solution.
    I could maybe help you fix the problem if you provide me with more details.


    Would you please be so kind to uninstall the addon and then reinstall it from the repository.
    Then check the bit rate in the settings: it should be blank, 90, 160 or 320, but not 30005.
    If the addon from the repository still does not work, could you please send me a log, edited to remove userid and password, by private mail.
    To produce a log in the downloads folder, type the following command at the console:

    Code
    1. journalctl -u service.spotify-connect-web > /storage/downloads/scw.log


    Thank you in advance



  • Working now, It was indeed set to 30005. Set to 320 works fine now.


    Also, if this addon requires docker, then it should be downloaded as a dependencey for this addon.


    Thanks!


    Awesomeness


  • I am glad the addon works for you now.
    The problem obviously lies in the transition from preview release 90 to a later release, as already reported by Dom4Jack in the other thread.
    I will update the first post to instruct uninstalling preview release 90 before installing release 100 or later.


    This addon does not require Docker, yet, but that may change in the future.


    Thank you for your feedback

    @

    The post was edited 1 time, last by awiouy ().

  • Hi,
    sorry, maybe stupid question, but in which repository and in which subcategory can I find the addon? I am running LE 7.0.2 on RbPi 2 and I have looked under "LibreELEC Add-Ons" in all subcategories, but was not able to find it. Do I need to update something before I can see the addon?


    BTW, I was looking for an addon like this since long time, hence many thanks for your work


    Cheers
    Chunki


  • Hello chunki!


    The addon should be in the LibreELEC Add-ons repository, in section Services.
    You might have to update the repository.


    Please report if you still can not find it.

  • Hi,
    thansk for your quick reply. I now found it, many thanks!
    Now lets see I will get it working with my USB soundcard


    Cheers
    Chunki
    [hr]
    Hi,
    my USB soundcard output basically does work , with setting "hw:1,0". Unfortunately, I cannot control the volume (neither via Spotify client nor via RBPi remote). Which mixer do I need to configure?


    My USB soundcard config looks as follows (aplay -l output):
    card 1: Device [USB Sound Device], device 0: USB Audio [USB Audio]


    The LE audio config is as follow:
    ALSA: USB Sound Device (@:Card=Device,Dev=0),Analog


    Accordingly, I have set the config to "hw:1,0" and playback route to "auto detect". But no mixer configured yet.


    Any idea? Many thanks!


    Chunki

    The post was edited 1 time, last by chunki ().


  • First, the playback route setting was only designed to work with the onboard ALSA audio interface.
    It is therefore unlikely that it will work with your USB soundcard.


    Then, for the mixer, the amixer command will provide the names of the available mixers, if any.
    Try to find the most pertinent, and enter its name in the mixer setting (eg, for my hifiberry-dacplus, the appropriate mixer is called Digital).
    If you need more help about this, please provide the output of amixer.


    Last, would you please be so kind to provide the output of aplay -L, and the name of the mixer, if you find it.
    I could use this information to document known settings in the first post, and maybe code them in the addon.


  • Ok, understood, thanks for the explanation! My amixer says:


    Simple mixer control 'PCM',0


    ...hence I used 'PCM' as mixer entry in settings.xml field 'scw_m', but I still cannot control the volume. Also, obviously the "auto detect" setting for 'playback route' (settings.xml field 'pcm_3') is not working reliably for my USB sound config (as you have already assumed), it only works from time to time, when I stop and restart Spotify app on my Android tablet.


    Any idea which settings I can use for the settings fields 'pcm_3' (playback route) and 'scw_m' (mixer) given my USB device config (all details see below)? Many thanks for your help!


    Here's is the lsusb output:
    Bus 001 Device 004: ID 145f:0143 Trust


    Here is the full amixer output:
    Simple mixer control 'PCM',0
    Capabilities: pvolume pvolume-joined pswitch pswitch-joined
    Playback channels: Mono
    Limits: Playback -10239 - 400
    Mono: Playback -10239 [0%] [-99999.99dB] [off]


    This is the dump of aplay -l:
    **** List of PLAYBACK Hardware Devices ****
    card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
    Subdevices: 8/8
    Subdevice #0: subdevice #0
    Subdevice #1: subdevice #1
    Subdevice #2: subdevice #2
    Subdevice #3: subdevice #3
    Subdevice #4: subdevice #4
    Subdevice #5: subdevice #5
    Subdevice #6: subdevice #6
    Subdevice #7: subdevice #7
    card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    card 1: Device [USB Sound Device], device 0: USB Audio [USB Audio]
    Subdevices: 0/1
    Subdevice #0: subdevice #0


    Here is the dump of aplay -L:
    null
    Discard all samples (playback) or generate zero samples (capture)
    default:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
    sysdefault:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
    default:CARD=Device
    USB Sound Device, USB Audio
    Default Audio Device
    sysdefault:CARD=Device
    USB Sound Device, USB Audio
    Default Audio Device
    front:CARD=Device,DEV=0
    USB Sound Device, USB Audio
    Front speakers
    surround21:CARD=Device,DEV=0
    USB Sound Device, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
    surround40:CARD=Device,DEV=0
    USB Sound Device, USB Audio
    4.0 Surround output to Front and Rear speakers
    surround41:CARD=Device,DEV=0
    USB Sound Device, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
    surround50:CARD=Device,DEV=0
    USB Sound Device, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
    surround51:CARD=Device,DEV=0
    USB Sound Device, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
    surround71:CARD=Device,DEV=0
    USB Sound Device, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
    iec958:CARD=Device,DEV=0
    USB Sound Device, USB Audio
    IEC958 (S/PDIF) Digital Audio Output


    And finally this is my choosen Audio device config in LE:
    ALSA: USB Sound Device (@:Card=Device,DEV=0), Analog


    Again, many thanks for your help!


    Cheers
    Chunki


  • Hello Chunki!


    According to the information you have provided, you have two active audio cards:
    card 0: the onboard ALSA audio device
    card 1: the USB sound device


    The default settings (device hw:0,1 or default:CARD=ALSA, mixer empty or PCM) and playback route should work for the onboard ALSA.


    Note that the settings, eg the playback route, are only activated when the settings are changed, with the OK button.
    Clicking on the OK button restarts the service with the new settings.


    You should be able to output to the USB sound device by setting playback device hw:1,0 or default:CARD=Device.
    The USB sound device has however no mixer, and you will therefore not be able to set the volume.
    You may find a way to define a sofware volume control for your card, on the Internet, but this is out of the scope of the addon.

    To determine the mixers for the USB sound device, use command amixer -c 1


    I hope you will find a way to make the addon work at your convenience.

    @

    The post was edited 1 time, last by awiouy ().


  • Hi,
    my amixer -c 1 output is as follows:


    Simple mixer control 'Speaker',0
    Capabilities: pvolume pswitch pswitch-joined
    Playback channels: Front Left - Front Right - Rear Left - Rear Right - Front Center - Woofer - Side Left - Side Right
    Limits: Playback 0 - 197
    Mono:
    Front Left: Playback 197 [100%] [0.00dB] [on]
    Front Right: Playback 197 [100%] [0.00dB] [on]
    Rear Left: Playback 197 [100%] [0.00dB] [on]
    Rear Right: Playback 197 [100%] [0.00dB] [on]
    Front Center: Playback 197 [100%] [0.00dB] [on]
    Woofer: Playback 197 [100%] [0.00dB] [on]
    Side Left: Playback 197 [100%] [0.00dB] [on]
    Side Right: Playback 197 [100%] [0.00dB] [on]
    Simple mixer control 'PCM',0
    Capabilities: cvolume cswitch cswitch-joined
    Capture channels: Front Left - Front Right
    Limits: Capture 0 - 6928
    Front Left: Capture 6928 [100%] [11.06dB] [on]
    Front Right: Capture 6928 [100%] [11.06dB] [on]
    Simple mixer control 'PCM Capture Source',0
    Capabilities: enum
    Items: 'Mic' 'Line' 'IEC958 In' 'Mixer'
    Item0: 'Mic'
    Simple mixer control 'Line',0
    Capabilities: pvolume cvolume pswitch pswitch-joined cswitch cswitch-joined
    Playback channels: Front Left - Front Right
    Capture channels: Front Left - Front Right
    Limits: Playback 0 - 8065 Capture 0 - 6928
    Front Left: Playback 6144 [76%] [-0.01dB] [off] Capture 4096 [59%] [-0.01dB] [on]
    Front Right: Playback 6144 [76%] [-0.01dB] [off] Capture 4096 [59%] [-0.01dB] [on]
    Simple mixer control 'Mic',0
    Capabilities: pvolume cvolume pswitch pswitch-joined cswitch cswitch-joined
    Playback channels: Front Left - Front Right
    Capture channels: Front Left - Front Right
    Limits: Playback 0 - 8065 Capture 0 - 6928
    Front Left: Playback 0 [0%] [-24.00dB] [off] Capture 0 [0%] [-16.00dB] [on]
    Front Right: Playback 0 [0%] [-24.00dB] [off] Capture 0 [0%] [-16.00dB] [on]
    Simple mixer control 'IEC958 In',0
    Capabilities: cswitch cswitch-joined
    Capture channels: Mono
    Mono: Capture [on]


    Sounds like as if mixer setting 'Speaker' (or 'Line') could work regarding volume control, what do you think? Didn't try yet since I am not at home currently.


    Cheeers
    Chunki


  • Indeed, Speaker and Line have the pVolume capability. Maybe one of them will work ;)

  • Back at home I have tried both values 'Line' and 'Speaker' as setting for "mixer", but afterwards the service didn't start, hence the device was not visible anymore. I am happy to provide error log dumps if you guide how to get. Thanks!


    Cheers
    Chhnki


  • Back at home I have tried both values 'Line' and 'Speaker' as setting for "mixer", but afterwards the service didn't start, hence the device was not visible anymore. I am happy to provide error log dumps if you guide how to get. Thanks!


    Cheers
    Chhnki


    Hello Chunki,


    I have been working on the addon, and while testing, I experienced the same problem as you.
    Namely, spotify-connect-web appears to be able to manage only the mixer of card0, which usually is the first activated.


    spotify-connect-web is able to play on further cards, when the mixer is left blank, but not to set the volume.
    The issue likely lies with spotify-connect-web, and I will open an issue with them to ask about it.


    In the mean time, you may try to solve your problem by disabling the onboard sound device, or by activating your USB sound device before the onboard ALSA.
    [hr]
    Well, the issue is known.
    I will test if --mixer_device_index works.
    If it does, expect an update of the addon, soon: my pull request already computes it.
    Cheers

    @

    The post was edited 1 time, last by awiouy ().

  • Release 101 Preview


    Summary
    This release greatly simplifies correct ALSA configuration: select the configuration wizard and let it guide you.
    This release moreover:
    - uses mixers corresponding to the selected card
    - supports card index changes (eg activation sequence) provided names are used (eg via the wizard)


    Provisional changelog
    - Add instructions to the addon settings
    - Add a configuration wizard to assist with ALSA configuration
    - Use the mixer card index setting
    - Activate the onboard audio if ALSA is inactive
    - Activate the onboard audio interface if it selected but inactive
    - Only set the playback route if the onboard audio interface is active and selected
    - Redefine default settings


    Files
    LE7
    LE8


    Thank you for testing it.


  • I don't know but I think the sound is a bit overmodulated? Also I have a problem when I start/stop my vpn, spotify connect breaks and doesn't come back up.