cpu

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • 27. April 2017 at 17:52 #28599

    Small update:

    5. Paste the following into the empty file:

    [Unit]
    Description=Librespot
    Requires=network-online.target
    After=network-online.target

    [Service]
    User=root
    Restart=always
    RestartSec=10
    ExecStart=/root/librespot –name SpotiPi –username <username> –password <password> –cache /tmp –bitrate 320 –device plughw:CARD=Pro > /dev/null 2>&1

    [Install]
    WantedBy=multi-user.target

    Removed –disable-discovery as it’s easier to find device on Android device.
    Also output as plughw – in this case it’s doing output to USB DAC Matrix Mini-i Pro – to find yours just use aplay -L.
    In my case I’m using USB for MPD and coaxial through I2S Hifiberry Digi Pro for squeezelite and spotify.

    24. April 2017 at 0:31 #28426

    @ZeroZorro

    1. Either use android Spotify app or desktop on your windows machine (windows build showed everything faster)
    2. No, just put your username and password, you can check status with
    systemctl status Spotify-connect.service
    You need premium account
    3. Do this via browser – use max2play IP to get to config page, then move to audioplayer tab -> edit advanced options under squeezelite and add -C 10 to make sure once you’ll turn off squeezelite your card will be free to be taken over by Spotify connect. BTW make sure you’ll turn off squeezelite in LMS web page with power button!
    4. Try to reconnect to WiFi or it worked for me faster without any tricks on desktop Spotify client.

    • This reply was modified 7 years, 8 months ago by cpu.
    23. April 2017 at 20:45 #28420

    This is how I did this – I think it should be quite an easy to implement this as plugin in max2play.

    Step by step (you need to be root):
    1. Look up the most recent release of librespot and copy the link to the latest ZIP-file
    2. SSH into your Pi and get the ZIP (example; copy your own link after ‚wget‘):
    wget https://github.com/herrernst/librespot/releases/download/v20170413-d95c0b3/librespot-linux-armhf-raspberry_pi.zip
    3. Unzip:
    unzip librespot-linux-armhf-raspberry_pi.zip
    4. Create the service definition:
    nano /etc/systemd/system/spotify-connect.service
    5. Paste the following into the empty file:

    [Unit]
    Description=Librespot
    Requires=network-online.target
    After=network-online.target
    
    [Service]
    User=root
    Restart=always
    RestartSec=10
    ExecStart=/root/librespot --name SpotiPi --username renebouwmeester --password ******** --disable-discovery --cache /tmp --bitrate 320 --device hw:0 > /dev/null 2>&1
    
    [Install]
    WantedBy=multi-user.target

    6. Save with CTRL-X, Y
    7. Reload daemons:
    systemctl daemon-reload
    8. Enable your new service:
    systemctl enable spotify-connect.service
    9. Enable and activate your new service:
    systemctl start spotify-connect.service

    This works for me on two max2play installations:
    1. Hifiberry Digi+ Pro (multisuqeeze – hw:0 is my Hifiberry – hw:1 is USB DAC)
    You need to add -C <sec> option to squeezelite command line
    -C 10
    2. IQAudio DigiAmp+
    You need to add -C <sec> option to squeezelite command line
    -o hw:CARD=IQaudIODAC -V Digital -C 10
    (I’ve removed -Q option as after closing output device alsa volume was set to 0 – librespot does only software volume)
    3. For USB DAC you need to use plughw:CARD=<name> – use aplay -L to get this name, in my case it’s:
    plughw:CARD=Pro
    That’s for Matrix Mini-i Pro 2014

    Other options worth mentioning:
    Enable I2S-MMAP (Mixerdevice for Soundcards) – ON
    Disable IPv6 – OFF (this gave me error as it’s turned ON as default)
    Disable Build-In-Audio on RPI3 – ON

    Credits:
    https://github.com/herrernst/librespot
    https://community.roonlabs.com/t/spotify-connect-on-your-roonbridged-pi-the-quick-n-easy-way/17896
    https://github.com/herrernst/librespot/releases/

    • This reply was modified 7 years, 8 months ago by cpu.
    • This reply was modified 7 years, 8 months ago by cpu.
    • This reply was modified 7 years, 8 months ago by cpu. Reason: updated
    22. Februar 2017 at 14:19 #27122

    Thumb up for implementing this as Spotify plugin in lms is deprecated and no longer maintained, using old library that Spotify can turn off anytime since they switched to connect mode.

    24. September 2015 at 13:40 #15804

    Whay about FLAC 24/96 ? You can convert this ALAC without losses and try FLAC – should be less CPU consuming… Or try DAC ant send in native format to be decoded by DAC.

Viewing 5 posts - 1 through 5 (of 5 total)