04-17-2018, 09:01 PM
(This post was last modified: 04-17-2018, 10:09 PM by airdronian.
Edit Reason: clarity
)
(04-09-2018, 04:58 PM)pinkdot Wrote: The current Librespot-org implementation is very solid. I installed it on Moode 3.8.4 and Moode 4.0. Both installations run without big issues. It's worth a try!Hello pinkdot,
Code:cd /home/pi
sudo apt-get install build-essential portaudio19-dev git
git clone https://github.com/librespot-org/librespot.git
cd librespot/
curl https://sh.rustup.rs -sSf | sh
#from the given options choose 1
source $HOME/.cargo/env
sudo reboot
#Login again
cd /home/pi/librespot/
cargo build --release --features alsa-backend
#this will take a while, 30 minutes plus
# after this process is done, create a spotify-connect.service
sudo su
nano /etc/systemd/system/spotify-connect.service
#add the following to the spotify-connect.service file
#change --device depending on the device you are using
#change --name to your liking
#add if needed --username <your spotify username>
#add if needed --password <your spotify password>
[Unit]
Description=Spotify Connect
Requires=network-online.target
After=network-online.target
[Service]
User=root
ExecStart=/home/pi/librespot/target/release/librespot --name MoodeSpot --initial-volume 75 --cache /tmp --bitrate 320 --backend alsa --device hw:1
Restart=always
RestartSec=10
StartLimitInterval=30
StartLimitBurst=20
[Install]
WantedBy=multi-user.target
#save and close the file by 'ctrl x' -> 'y' -> enter
#start and enable the service
systemctl enable spotify-connect.service
systemctl start spotify-connect.service
#Make sure Moode is stopped before using Librespot and vise versa.
#to update
cd /home/pi/librespot
git pull
cargo build --release --features alsa-backend
sudo reboot
I've tried installing this and it all seemed to go well but MoodeSpot does not show up as a device option from other computers. I tried running the systemctl enable spotify-connect.service manually as root and get an "Invalid Argument" response. I suspect I've missed something here.
I ran systemctl status spotify-connect.service and got a response of [/etc/systemd/system/spotify-connect.service:18] Missing '='.
I thought this might refer to line 18 of the spotify-connect.service file but that line is "systemctl enable spotify-connect.service" without quotes.
Any suggestion to troubleshoot ?