Spotify Connect autostart

Raspberry Pi related support

Spotify Connect autostart

Postby Lazerharp » 24 Mar 2016, 19:47

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
Lazerharp
 
Posts: 3
Joined: 24 Mar 2016, 19:29

Re: Spotify Connect autostart

Postby hondagx35 » 24 Mar 2016, 22:06

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
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

Re: Spotify Connect autostart

Postby Lazerharp » 24 Mar 2016, 23:37

Fantastic! It works perfect. Thank you so much for a fantastic software and support. I will make a donation as thanks.

Happy Easter,
Lars
Lazerharp
 
Posts: 3
Joined: 24 Mar 2016, 19:29

Re: Spotify Connect autostart

Postby Stert » 02 Apr 2016, 01:10

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
Stert
 
Posts: 7
Joined: 21 Jul 2015, 09:47

Re: Spotify Connect autostart

Postby Stert » 02 Apr 2016, 12:05

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!
Stert
 
Posts: 7
Joined: 21 Jul 2015, 09:47

Re: Spotify Connect autostart

Postby frakki » 19 Jul 2016, 20:32

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
frakki
 
Posts: 2
Joined: 12 Jun 2016, 20:12

Re: Spotify Connect autostart

Postby sholdn » 05 Mar 2017, 08:01

I want to know what is supposed to happen after typing this command

Code: Select all
systemctl start spotify-connect
sholdn
 
Posts: 2
Joined: 03 Mar 2017, 14:40

Re: Spotify Connect autostart

Postby zomtec » 25 Jul 2017, 19:15

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 10861 times
zomtec
 
Posts: 15
Joined: 17 Jun 2017, 19:39

Re: Spotify Connect autostart

Postby zomtec » 30 Jul 2017, 17:15

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 ~]#
zomtec
 
Posts: 15
Joined: 17 Jun 2017, 19:39

Re: Spotify Connect autostart

Postby hondagx35 » 31 Jul 2017, 09:34

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
User avatar
hondagx35
 
Posts: 3042
Joined: 11 Sep 2014, 22:06
Location: Germany

support RuneAudio Donate with PayPal

Next

Return to Raspberry Pi

Who is online

Users browsing this forum: No registered users and 11 guests