Page 1 of 2

Spotify Connect autostart

PostPosted: 24 Mar 2016, 19:47
by Lazerharp
Hi,

I have successfully installed Spotify Connect on my PI 3 with IQAudIOs PI-DAC+ and the latest version of Runeaudio. Running excellent with the built in WiFi.

I have used this guide for Volumio (using google translate):
http://powerpi.de/spotify-connect-auf-d ... bedienung/

I love the result and it sounds fantastic. But I can't get it to auto start as Volumio is using another OS. I need to make this line to run on startup:
/root/spotify-connect-web.sh --name Volumio --username xyz --password 123456 --bitrate 320

Any ideas?

Best regards,
L

Re: Spotify Connect autostart

PostPosted: 24 Mar 2016, 22:06
by hondagx35
Hi Lazerharp,

Any ideas?


Store this service file as /usr/lib/systemd/system/spotify-connect.service
Code: Select all
[Unit]
Description=Spotify Connect
After=network.target

[Service]
ExecStart=/usr/bin/sh /root/spotify-connect-web.sh --name Volumio --username xyz --password 123456 --bitrate 320
Restart=always
RestartSec=10
StartLimitInterval=30
StartLimitBurst=20

[Install]
WantedBy=multi-user.target


To test the service execute:
Code: Select all
systemctl start spotify-connect


If all works, you can enable the service (start on boot):
Code: Select all
systemctl enable spotify-connect


Frank

Re: Spotify Connect autostart

PostPosted: 24 Mar 2016, 23:37
by Lazerharp
Fantastic! It works perfect. Thank you so much for a fantastic software and support. I will make a donation as thanks.

Happy Easter,
Lars

Re: Spotify Connect autostart

PostPosted: 02 Apr 2016, 01:10
by Stert
I have this working with a Hifiberry DAC using the file below. I followed the Volumio guide but stopped after step 2 - applying the 'fix' is unnecessary and doesn't work!

There are a couple of problems left:

I have to stop the process before playing anything on mpd. Is there a way to get spotify-connect to release the alsa device when playback is stopped? Or is it possible to use Spotify connect as the target of the Spotify button inRuneUI?

Secondly volume controls do not work as the DAC has no software volume control- is there a way to,route through the Rune software control?

Here's some extra info: https://github.com/Fornoth/spotify-connect-web


Code: Select all
[Unit]
Description=Spotify Connect
After=network.target

[Service]
ExecStart=/usr/bin/sh /root/spotify-connect-web.sh --name Stereo --device 1 --mixer PCM  --username lalala --password lalala --bitrate 320
Restart=always
RestartSec=10
StartLimitInterval=30
StartLimitBurst=20

[Install]
WantedBy=multi-user.target

Re: Spotify Connect autostart

PostPosted: 02 Apr 2016, 12:05
by Stert
Sorry for thread hijack - found a fix for the also issue by replacing console_callbacks.py with this version: https://github.com/JozoVilcek/spotify-c ... llbacks.py

mpd & spotify are usable without reboots as long as you switch your spotify connect device when done!

Re: Spotify Connect autostart

PostPosted: 19 Jul 2016, 20:32
by frakki
Hey guys, ive tried the autostart as well but it isnt working. Nevertheless it seems that the service is starting but not working properly.

if i try to manually run the spotify connect putty gives me this:

Code: Select all
 [root@runeaudio ~]# sudo /root/spotify-connect-web.sh --name Rune --username XXXXXXX --password XXXX --bitrate 320
mount: proc is already mounted or /root/spotify-connect-web-chroot/proc busy
       proc is already mounted on /proc
       proc is already mounted on /root/spotify-connect-web-chroot/proc


If I use

Code: Select all
systemctl stop spotify-connect


and after this the manual method, everything is working.

Does anyone know where the problem is?

Im runnig an rpi3 with pifiberry dac+ and the latest rune0.4 beta

Re: Spotify Connect autostart

PostPosted: 05 Mar 2017, 08:01
by sholdn
I want to know what is supposed to happen after typing this command

Code: Select all
systemctl start spotify-connect

Re: Spotify Connect autostart

PostPosted: 25 Jul 2017, 19:15
by zomtec
I have problem to install the script.
What is wrong?

thx

Code: Select all
login as: root
root@192.168.100.39's password:
===============  RuneOS distribution  ===============
  ____                      _             _ _
 |  _ \ _   _ _ __   ___   / \  _   _  __| (_) ___
 | |_) | | | | '_ \ / _ \ / _ \| | | |/ _` | |/ _ \
 |  _ <| |_| | | | |  __// ___ \ |_| | (_| | | (_) |
 |_| \_\\__,_|_| |_|\___/_/   \_\__,_|\__,_|_|\___/

================  www.runeaudio.com  ================
RuneOs: 0.3-beta (build 20141029)
RuneUI: 1.3
Hw-env: RaspberryPi

Last login: Tue Jul 25 20:04:38 2017 from tobias-pc.fritz.box
[root@runeaudio ~]# curl -O http://spotify-connect-web.s3-website.eu-central-1.amazonaws.com/spotify-connect-web.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0   2730      0 --:--:-- --:--:-- --:--:--  2761
[root@runeaudio ~]# chmod u+x spotify-connect-web.sh
[root@runeaudio ~]# ./spotify-connect-web.sh install
./spotify-connect-web.sh: line 9: sudo: command not found
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (23) Failed writing body (1232 != 2864)
[root@runeaudio ~]#


install.JPG
install.JPG (82.76 KiB) Viewed 8830 times

Re: Spotify Connect autostart

PostPosted: 30 Jul 2017, 17:15
by zomtec
I have problem to install the script.
What is wrong?

What means
./spotify-connect-web.sh: line 9: sudo: command not found

thx

Code: Select all
login as: root
root@192.168.100.39's password:
===============  RuneOS distribution  ===============
  ____                      _             _ _
 |  _ \ _   _ _ __   ___   / \  _   _  __| (_) ___
 | |_) | | | | '_ \ / _ \ / _ \| | | |/ _` | |/ _ \
 |  _ <| |_| | | | |  __// ___ \ |_| | (_| | | (_) |
 |_| \_\\__,_|_| |_|\___/_/   \_\__,_|\__,_|_|\___/

================  www.runeaudio.com  ================
RuneOs: 0.3-beta (build 20141029)
RuneUI: 1.3
Hw-env: RaspberryPi

Last login: Tue Jul 25 20:04:38 2017 from tobias-pc.fritz.box
[root@runeaudio ~]# curl -O http://spotify-connect-web.s3-website.eu-central-1.amazonaws.com/spotify-connect-web.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   497  100   497    0     0   2730      0 --:--:-- --:--:-- --:--:--  2761
[root@runeaudio ~]# chmod u+x spotify-connect-web.sh
[root@runeaudio ~]# ./spotify-connect-web.sh install
./spotify-connect-web.sh: line 9: sudo: command not found
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (23) Failed writing body (1232 != 2864)
[root@runeaudio ~]#

Re: Spotify Connect autostart

PostPosted: 31 Jul 2017, 09:34
by hondagx35
Hi zomtec,

What means
./spotify-connect-web.sh: line 9: sudo: command not found

It means that command "sudo" from line 9 in "spotify-connect-web.sh" is not found.

So it is most likely not installed at all.

Frank