Setup Spotify Connect on Hifiberry Digi+ & Allo DigiOne:
Many thanks to domars@volumio & triton@vnav about this tip.
Step 1. Edit file connect.py:
nano /root/spotify-connect-web-chroot/usr/src/app/connect.py
Find and replace:
mixer_volume = int(mixer.getvolume()[0] * 655.35)
to:
mixer_volume = 1 #int(mixer.getvolume()[0] * 655.35)
Step 2. Edit file console_callbacks.py:
nano /root/spotify-connect-web-chroot/usr/src/app/console_callbacks.py
Find and replace:
#1:
playback_device_group.add_argument('--device', '-D', help='alsa output device (deprecated, use --playback_device)', default='default')
to:
playback_device_group.add_argument('--device', '-D', help='alsa output device (deprecated, use --playback_device)', default='0')
#2:
playback_device_group.add_argument('--playback_device', '-o', help='alsa output device (get name from aplay -L)', default='default')
Hifiberry Digi+:
playback_device_group.add_argument('--playback_device', '-o', help='alsa output device (get name from aplay -L)', default='snd_rpi_hifiberry_digi')
Allo DigiOne:
playback_device_group.add_argument('--playback_device', '-o', help='alsa output device (get name from aplay -L)', default='sndallodigione')
#3:
if self._args.playback_device != 'default':
Hifiberry Digi+:
if self._args.playback_device != 'snd_rpi_hifiberry_digi':
DigiOne:
if self._args.playback_device != 'sndallodigione':
#4:
corected_playback_volume = int(min_volume_range + ((volume / 655.35) * (100 - min_volume_range) / 100))
to:
corected_playback_volume = 1 #int(min_volume_range + ((volume / 655.35) * (100 - min_volume_range) / 100))
Step 3. Create service:
nano /usr/lib/systemd/system/spotify-connect.service
[Unit]
Description=Spotify Connect
After=network.target
[Service]
ExecStart=/usr/bin/sh /root/spotify-connect-web.sh --name RuneAudio --username abc --password xyz --bitrate 320
Restart=always
RestartSec=10
StartLimitInterval=30
StartLimitBurst=20
[Install]
WantedBy=multi-user.target
Step 4. Test the service execute:
systemctl start spotify-connect
Step 5. If everyting OK, enable service (start on boot):
systemctl enable spotify-connect
Done!