Thank you for your donation!


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


[HOW-TO] Spotify Connect Web for Moode
#71
It appears either the .sh file is not actually where it is supposed to, or you may have built the spotify-connect-web in another directory (by default it should be inside the spotify directory)? (Perhaps one dir upwards?). You may have missed some of the 'cd spotify' (or similar) instructions?
Reply
#72
(05-23-2018, 09:45 PM)RafaPolit Wrote: It appears either the .sh file is not actually where it is supposed to, or you may have built the spotify-connect-web in another directory (by default it should be inside the spotify directory)? (Perhaps one dir upwards?).  You may have missed some of the 'cd spotify' (or similar) instructions?

Hi again Rafael 

Thanks for all you help. I finally got the spotify connect to work! I am so sorry because this was properly my fault doing the install. Your hint solved the problem because the files wasn't there.

I deleted the spotify folder:
Code:
$ sudo rm -rf home/pi/spotify
$ sudo rm -rf spotify-connect-web
So for everyone else just follow the very good guide from Rafael Smile 

I used the following settings(with help from Rafael) running the DDDAC1794 driver (PCM1794 DAC 24 bit):

In the spotify-connect.sh file (added Spotify infront of "Master", mixer_device_index 0):
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 SpotifyMaster --mixer_device_index 0 --bitrate 320 --name "moOde Connect" --key /home/pi/spotify/spotify-connect-web/spotify_appkey.key
cd /
Used this in asound.conf (HW:0 and SpotifyMaster):
Code:
pcm.softvol {
 type softvol
 slave {
   pcm "hw:0"
 }
 control {
   name "SpotifyMaster"
   card 0
 }
}
Thanks for all your help  Smile
Reply
#73
Hi again

I just installed your UI and i works great. Now I got introduced to Node-RED programming and thanks for that. That is a great tool.
Reply
#74
(05-17-2018, 03:30 AM)RafaPolit Wrote: What JonPike details is true, but this requires to edit the spotify connect name as well, not just the Moode name / URL.  The Spotify "speakers" get their name (the "connect" name) from the --name "xxx" parameter configured in the spotify-connect.sh file.  So be sure to edit that one as well to reflect the upstairs, downstairs scenario.

Best regards,
Rafa.

Hey Rafa...  

Are you meaning when using your setup scenario you need to also add names there?  Or, am I missing some extra naming feature beyond what I described?  Otherwise I'm confused,   since I had my results without any name addition in the spotify-connect.sh file,  with the basic dbcooper Raspotify method I used.

Jon
Reply
#75
John, there is a parameter that, for the sake of simplicity (and also as a 'thank you' to moOde), configures the service to appear as "moOde Connect" within spotify. This is the --name parameter in the spotify-connect.sh file.

If you are planning on running several moOde raspberry pi's, the spotify services need to also be given different names (unless you only plan of turning one at a time, obviously). So, for people looking for multi-system setups, it would be best to have descriptive names like: "Connect Bedroom", or "Connect Livingroom", so that it is clear.

I suggest leaving the 'Connect' in so that you can differentiate the 'Connect' service with, for example, the Airplay receiver. Since I have both, I have found that my wife get's confused by "moOde Connect" and "moOde Airplay" actually playing music on the same device. But, at least by naming, this suggests what one is vs. the other.

So, again, this is only necessary for multi-moode systems. For single systems, the defaults are perfectly fine.

Does that make sense?
Best regards,
Rafa.
Reply
#76
Hello to All,
I'm trying to install Spotify on my Moode, but I have met similar problem described prevoiusly and still I can't solve it.

After installation, the result of status is:

● spotify-connect-web.service
   Loaded: loaded (/lib/systemd/system/spotify-connect-web.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) since Sat 2018-06-02 13:22:19 CEST; 7s ago
  Process: 2625 ExecStart=/home/pi/spotify/spotify-connect.sh (code=exited, status=0/SUCCESS)
 Main PID: 2625 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/spotify-connect-web.service

But after, nothing viisble and detected on laptop, phone with installed Spotify app.

Running manual script:

$ cd /home/pi/spotify
$ ./spotify-connect.sh

the output show:

Traceback (most recent call last):
  File "main.py", line 12, in <module>
    from gevent.wsgi import WSGIServer
ImportError: No module named wsgi

And here I'm stuck, please could you help me to solve this issue?
Regards, Mateusz
Reply
#77
The solution that has worked for at least two people is a few pots back (Thanks to Platheo):
You need to go into the spotify-connect web directory and change a line in the main.py file:
$ cd /home/pi/spotify/spotify-connect-web

Then edit the file main.py with the editor of your choice and find the line that says:
from gevent.wsgi import WSGIServer

And change it to:
from gevent.pywsgi import WSGIServer

After that, the safer route is to restart the system. A service reload could work, but easier to just restart.
Please report back if this solves the issue and will add this option to the instructions.

Thanks,
Rafa.
Reply
#78
(05-24-2018, 04:30 PM)miklau Wrote: Hi again

I just installed your UI and i works great. Now I got introduced to Node-RED programming and thanks for that. That is a great tool.

How did I miss this! I am really glad it worked.

Node red is really fantastic for small projects, takes all the complexity of setting things up out of the equation.

Glad this is useful for others, best regards,
Rafa.
Reply
#79
(06-02-2018, 03:36 PM)RafaPolit Wrote: The solution that has worked for at least two people is a few pots back (Thanks to Platheo):
You need to go into the spotify-connect web directory and change a line in the main.py file:
$ cd /home/pi/spotify/spotify-connect-web

Then edit the file main.py with the editor of your choice and find the line that says:
from gevent.wsgi import WSGIServer

And change it to:
from gevent.pywsgi import WSGIServer

After that, the safer route is to restart the system.  A service reload could work, but easier to just restart.
Please report back if this solves the issue and will add this option to the instructions.

Thanks,
Rafa.

Hi Rafa,
Thank you, finally I did, it was a problem to me, to find main.py location, but after this little mod my Spotify Web connect start to work.
Thanks to Platheo of course also.
Now I would like to start use UI with your guide: https://github.com/RafaPolit/moode-spotify-connect-web, but friendly speaking is little more complicated to me Smile.

Is any possibility to use Display 2x20 with HD44780 diver to show Spotify infos on the LCD?
I have used previously this display with Tidal any everything works perfectly, of course during using Spotify Connect Web display "is blind", but maybe exist possibility to drive information from some source?

Thanks one more time, all the best.
Mateusz
Reply
#80
Glad to know!

The UI is just for the Moode web based UI. You would need to heavily mod the Node RED script to be able to manage a 2x20 Display: either write a file that is read by the OLED script, or modify the Moode or MPD database, etc.

It's an interesting project, but not one I'm able to tackle right now.
Reply


Forum Jump: