Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


[HOW-TO] Spotify Connect Web for Moode
#31
I have just tried Rafas method and got 

cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
                     ^
    compilation terminated.
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
    
    ----------------------------------------

I'm lost as there were other errors before that one. Any ideas please?

Realised dependencies were missing I think. Just done the compile and config from https://github.com/RafaPolit/moode-spotify-connect-web and it is working.

Thanks to that man and those who have contributed.
Reply
#32
I can't express how happy I am that the GitHub instructions are working better now and with less confusion.

I have been developing a lot of services (for my personal use) around this implementation, and it mostly works. Eventually it can loose control of the Playback engine, but that happens once every 2 hours or so, so nothing really critical.

I have solved 90% of the issues around the lack of start / stop hooks with clever polling + sockets. I am happy with the current status of things. I'll try to compile a showcase of what I've been working on, maybe it can be turned into a contrib project.

Again, great to read things are working better and less confusing.

Best regards,
Rafa.
Ps: 'That man' is me! Smile LOL!
Reply
#33
@RafaPolit your method works better than librespot solution! There is no "silence" between songs or when starting one.

Thanks for all the work.
Reply
#34
(05-02-2018, 03:43 AM)gabmartini Wrote: @RafaPolit your method works better than librespot solution! There is no "silence" between songs or when starting one.

Thanks for all the work.

To finally have gapless spotify is fantastic Big Grin
Reply
#35
(04-11-2018, 04:43 AM)franz159 Wrote: I'm getting confused by all these "incarnations" of Spotify Connect developments.

Out of curiosity to experiment, I found this one
https://github.com/dtcooper/raspotify
which requires a 1 line installation:
curl -sL https://dtcooper.github.io/raspotify/install.sh | sh
I only changed a couple of lines in the "/etc/default/raspotify" configuration file:

# /etc/default/raspotify -- Arguments/configuration for librespot
# Device name on Spotify Connect
DEVICE_NAME="moodeXraspotify"
# Bitrate, one of 96 (low quality), 160 (default quality), or 320 (high quality)
BITRATE="320"

...and I was up and running in less than 10 minutes on Moode 4.0

Good to see the work going on to polish this up...   Here's some notes from my perspective.

FWIW,  I have been using the dtcooper Raspotify method with little problems for quite a while now.  Hadn't noticed the gap/start song issues,  but then,  I realized that I hadn't been listening to any albums that have gapless play.  I now notice there are a few seconds extra between tracks.  I haven't noticed major disconnects or other issues, when it works it's pretty stable.  For me.

And,  after getting to Clapton's "Unplugged" album on the interesting "DR+ altamontstudios"  playlist on Spotify (* check end of post for more info)  I can see the issue clearly.  I'm only getting 2-5 sec gaps even on my slow Pi 1B+ box.  Maybe my much faster than the 2.4Ghz Wi-fi internet connection helps to feed that buffer faster, and those with slower net access have to suffer longer. 

For overall setup and performance,   I've had the "it just works"  experience with my Allo Boss I2C DAC based system,  but had no sound when using my Creative Labs X-Fi HD USB soundcard.   I discovered that the ALSA address the X-Fi ended up on was different and needed manual setting,  like someone else reported. 
Code:
#
# To choose a different output device (ie a USB audio dongle or HDMI audio out),
# use `--device` with something like `--device hw:0,1`. Your mileage may vary.
#
#OPTIONS="--username <USERNAME> --password <PASSWORD>"

Logging into the Pi with SSH, I used the aplay -l  and aplay -L commands to get info on my audio devices,  and I then was able to edit in an OPTIONS= line as shown above,  with the right address.  I didn't quite figure out why an added DAC like the Allo comes up on a findable device port,  while my USB one didn't, and needed a specific line.  The other odd thing was that the example line above from the Raspotify readme didn't work either,  and instead of  
Code:
OPTIONS="--device hw:1,0"
I had to use OPTIONS= "--device plughw:1,0" ,  a slightly different command.   Tada...   music!


* - I ran across a comment by someone regarding the "Loudness Wars", etc... and they mentioned their playlist on Spotify.  All tracks are very high DR, >14, and nice to remind oneself how much difference a lot of dynamic headroom can make to a piece of music.  Search for "DR+"  the name will be altamontstudios.   I also just discovered a huge playlist called "High Dynamic Range",  with a picture of an old Marantz receiver.   If you are wondering what all this Loudness Wars / DR ratings stuff is, anyway,  google it, read a bit,  check out the Dynamic Range Database site.
Reply
#36
(04-29-2018, 10:26 AM)grasshopper Wrote: My first post here.  Good morning Big Grin 
Anyway, just to say I followed the instructions on Git to install this in V4.1 & it worked flawlessly.  Thank you to all involved.
Using an IQaudIO DAC Pro I just changed the reference from hw:1 to hw:0 in asound.conf.
I have a 2nd MoOde audio player, one in a bedroom for headphone use only & I will want it to have a different spotify-connect name, looking at the instructions it will just be a case of amending "spotify-connect.sh" accordingly:

Code:
spotify-connect.sh
Code:
#!/bin/sh

cd /
cd home/pi/spotify/spotify-connect-web
LD_LIBRARY_PATH=/home/pi/spotify/spotify-connect-web python main.py --playback_device softvol -m Master --mixer_device_index 0 --bitrate 320 --name "ENTERNAMEHERE" --key /home/pi/spotify/spotify-connect-web/spotify_appkey.key
cd /

Hmmm...  with the simple Raspotify method,  I haven't had to do any naming changes.  Without any editing, it ends up looking like this:
raspotify (name) ,  with the name being the moode player device (network?) name.   I have a couple different players with different names,  and it seems handy enough.
Did you have to do the above for it to work at all,  or does doing that give you a better name?

I will be looking into Ravi's method here soon.  For the gapless play goodness alone,  it sounds like a better solution.  But,  I imagine a simpler method is still pretty attractive to the masses who have never typed on a Linux command line before.

Other changes I make are the selecting of the BITRATE=320 audio quality shown earlier,  and setting the starting volume level to something lower than 100%:
Code:
# By default, the volume normalization is enabled, add alternative volume
# arguments here if you'd like, but these should be fine.
#VOLUME_ARGS="--enable-volume-normalisation --linear-volume --initial-volume=100"

Maybe I could write this all up in a procedure for Raspotify,  for those who want simple solutions.
Reply
#37
(05-03-2018, 03:05 AM)JonPike Wrote:
(04-29-2018, 10:26 AM)grasshopper Wrote: My first post here.  Good morning Big Grin 
Anyway, just to say I followed the instructions on Git to install this in V4.1 & it worked flawlessly.  Thank you to all involved.
Using an IQaudIO DAC Pro I just changed the reference from hw:1 to hw:0 in asound.conf.
I have a 2nd MoOde audio player, one in a bedroom for headphone use only & I will want it to have a different spotify-connect name, looking at the instructions it will just be a case of amending "spotify-connect.sh" accordingly:

Code:
spotify-connect.sh
Code:
#!/bin/sh

cd /
cd home/pi/spotify/spotify-connect-web
LD_LIBRARY_PATH=/home/pi/spotify/spotify-connect-web python main.py --playback_device softvol -m Master --mixer_device_index 0 --bitrate 320 --name "ENTERNAMEHERE" --key /home/pi/spotify/spotify-connect-web/spotify_appkey.key
cd /

Hmmm...  with the simple Raspotify method,  I haven't had to do any naming changes.  Without any editing, it ends up looking like this:
raspotify (name) ,  with the name being the moode player device (network?) name.   I have a couple different players with different names,  and it seems handy enough.
Did you have to do the above for it to work at all,  or does doing that give you a better name?

I will be looking into Ravi's method here soon.  For the gapless play goodness alone,  it sounds like a better solution.  But,  I imagine a simpler method is still pretty attractive to the masses who have never typed on a Linux command line before.

Other changes I make are the selecting of the BITRATE=320 audio quality shown earlier,  and setting the starting volume level to something lower than 100%:
Code:
# By default, the volume normalization is enabled, add alternative volume
# arguments here if you'd like, but these should be fine.
#VOLUME_ARGS="--enable-volume-normalisation --linear-volume --initial-volume=100"

Maybe I could write this all up in a procedure for Raspotify,  for those who want simple solutions.

I have 2x MoOde players, one going to an amp downstairs & another in a bedroom for headshone listening, I power them down when they are not needed & so they are never both on simultaneously, therefore I didn't change anything, both players have the same name.  They have different dacs so had to change the output settings, but that is all.
Reply
#38
I've asked the admin via PM if it could be possible to move this thread to the FAQ /Guides section, which makes more sense and was not available at the time I created this thread. Maybe a Mod can help also? Thanks,
Rafa.
Reply
#39
Sure, I can move it :-) I'll add "Web" to the title to distinguish it from other Spotify Connect projects that may be added in the future.

"Spotify Connect Web for Moode"

-Tim
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#40
Hi, i have an unusual setup, i have moode version 2.4 (see     ) this because it's altered by the builder of my Raspberry. https://nuxii.fr/ 
i can login as root or as Pi
as Pi i seem to have little rights to install/edit stuff
as root i run stuck on:
Code:
root@moode:~/spotify/spotify-connect-web# sudo pip install -r requirements.txt
sudo: pip: command not found

what can i do? does anybody want to help me out, perhaps via a remote session or so? i am a noob in code, i can understand a bit what is done, but not much. i would so like to have spotfiy connect on my distro.
Reply


Forum Jump: