Thank you for your donation!


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


[HOW-TO] Spotify Connect Web for Moode
It's a copy / paste of the contents of the flow into Node Red. You copy the entire flow, then go to the node red web interface and within the menu select "clipboard", then paste the contents and choose "new flow".

If you haven't used node red at all, perhaps following a very small how-to somewhere may help getting familiar with some of the concepts?

Rafa.
Reply
Thank you, I understand I was missing something. i will find a howto.
Reply
Rafa, is it possible to use the "update"-functionality within moode 4.2 without breaking the spotify-connect setup?
Reply
As long as you haven't implemented the UI overrides, and only the service avahi and spotify, I don't think there would be a problem.
Reply
I also upgraded from 4.3 and successfully restored the UI mod. 

Here's what I did:

- did a wget for spotifylib.js
- edited footer.php
- Reboot
Reply
Friends, there appears to be an issue with the newer versions of the PIP packages installed with recent installations (due to newer pip versions appearing, nothing to do with MoOde itself!).

Please, log in via ssh to the moode RPi and type:
Code:
$ top
Take a look if there is a python command that is hogging around 80 ~ 90% of the processor.
For me the python command run by the spotify-connect-web.service crept to around that value over a few hours.
I am not sure if it is the gevent package that got some of its functionality deprecated, or the pylast package that is reported no longer working with python 2.7.

At any rate, if you are seeing this issue, here are instructions to fixing this:
Code:
$ sudo systemctl disable spotify-connect-web.service
$ sudo systemctl stop spotify-connect-web.service
$ pip uninstall gevent
$ pip uninstall pylast
$ cd /home/pi/spotify/spotify-connect-web/
$ rm requirements.txt
$ rm main.py
$ wget https://github.com/RafaPolit/spotify-connect-web/raw/master/requirements.txt
$ wget https://github.com/RafaPolit/spotify-connect-web/raw/master/main.py
$ pip install -r requirements.txt
...(this may take a while)
$ sudo systemctl start spotify-connect-web.service
$ sudo systemctl enable spotify-connect-web.service

What I have done is downgraded the requirements to the packages that the original spotify-connect-web repo depended upon, and reverted the pywsgi to the wsgi package in the main.py.
With this, I exhibit no CPU usage creep, and everything is, apparently, working as expected.  Obviously, your mileage may vary, so please report any issues.
For new users, there is no need to worry, I have changed the instructions to point to the new corrected repositories, so for new installations just following the instructions should be enough.
Hope this helps, best regards,
Rafa.
Reply
No idea how you would do this. Probably a similar approach to that plugin: do it intercepting ALSA. But, as is also the case with that plugin, you would need to not use the softvol approach and select the card directly, at which point you would have both Moode and Spotify wrestling for volume control of the device, which I wouldn't recommend.

You are in for a rough ride here.
Reply
Hi. During long listening spotify the cache size (/var/local/www/spotify_cache/files) increases and takes up all the free space on the memory card, because of this, the system stops working stably, is there any solution to limit the cache size ? I try to clean this folder on my own through cron, it looks like it works.

P.S. Moode 4.3 (with native Spotify support)
Reply
This is really the wrong place to ask this question. Here we are discussing a non-native installation of a different package which takes care of Spotify with Spotify Connect Web.

For the native Spotify support, please address this question in the support forum, probably starting a new thread. It will get Tim's attention much quicker!
Reply
(11-06-2018, 08:51 PM)abigor Wrote: Hi. During long listening spotify the cache size (/var/local/www/spotify_cache/files) increases and takes up all the free space on the memory card, because of this, the system stops working stably, is there any solution to limit the cache size ? I try to clean this folder on my own through cron, it looks like it works.

P.S. Moode 4.3 (with native Spotify support)

@abigor

Looking through the issues log on the librespot github repo, I see that this same problem was addressed by the maintainer last year with the addition of a new run-time option "--disable-audio-cache". It isn't clear, at least to me, what side effects this option may have so we'll likely have to test it before adding it in moOde.

Regards,
Kent

PS - Yes, I'm a member of the Moderator group for this forum but I didn't get the memo on how to move this post to a new thread so Rafa's suggestion will have to wait on Tim or @rikardo1979 to do it.
Reply


Forum Jump: