Hello and thank you awiouy for this plugin.
I had similiar problems to HelpMeSpotify getting it to work with a USB soundcard. I'm on LE8, milhouse build from 10.02.2017 on a raspi 2 with a miniDSP 2x4HD.
'amixer' showed "amixer: Mixer attach default error: No such file or directory". The problem was that the soundcard was recognized as card 1 not card 0 and executing amixer without the specification of the device with the '-c 1' flag resulted in this error. I fixed this by making the USB device the default in /storage/.config/asound.conf :
The name of the card is found out with 'aplay -L'. For me the output containes lines like this: "sysdefault:CARD=m2x4HD". So the card name is 'm2x4HD'.
Now I tested the connect server and worked out the correct parameters by starting it from the command line. The working command for me was
./spotify-connect-web --key /storage/.kodi/userdata/addon_data/service.spotify-connect-web/spotify_appkey.key --playback_device sys
default:CARD=m2x4HD --mixer_device_index 0 --mixer 'miniDSP 2x4HD ' -u myusername -p mypassword
The name of the mixer is obtained by the output of 'amixer'. The other parameters were chosen like descriped in the projects repo.
By inspecting 'journalctl -u service.spotify-connect-web' I noticed that the passed name of the mixer 'miniDSP 2x4HD ' was truncated to 'miniDSP'. Also notice the trailing space in the name. Thanks miniDSP.... Spaces in names never bring any luck.
I followed the passing of the argument through the sources. The truncation happens at the calling of spotify-connect-web in bin/spotify-connect-web.start. Changing it in the following way made it work correctly:
...
[ "$scw_b" == "-" ] && scw_b=""
[ "$scw_b" ] && scw_b="-b $scw_b"
#[ "$scw_m" ] && scw_m="-m $scw_m"
[ "$scw_p" ] && [ "$scw_u" ] && scw_p="-p $scw_p" && scw_u="-u $scw_u"
cd "$ADDON_DIR"
./spotify-connect-web $scw_b \
-c "$ADDON_HOME/credentials.json" \
-k "$ADDON_HOME/spotify_appkey.key" \
-m "$scw_m" \
-n "$HOSTNAME" \
-o "$scw_o" \
$scw_p \
$scw_u \
--mixer_device_index "$index"
Display More
I guess there is a more clever way to do this which preserves your check if $scw_m is specified. I don't need it for now. Maybe this is something for the next update.
Also the integration of the "--dbrange " option in the gui would be nice. Thanks.
I hope this helps people with the same issues.