Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Play Spotify #18

Closed
mec0-de opened this issue Mar 9, 2018 · 132 comments
Closed

Play Spotify #18

mec0-de opened this issue Mar 9, 2018 · 132 comments

Comments

@mec0-de
Copy link

mec0-de commented Mar 9, 2018

Hello,

thanks for the great work.
Will it be possible to play songs or playlists from Spotify premium?

Thanks four your help!

@tullm
Copy link

tullm commented Mar 9, 2018

Hi.
Yes this is possible. I've done it.
I've installed mopidy which included mpd.
I can trigger to play spoitfy content over mpd with the swipe of a RFID tag.
So install mopidy with the Spotify extension. When this is done and you are able to play Spotify over mopidy it is only some editing of the script here to get it working with RFID. I can share what I've edited.
Cheers

@mec0-de
Copy link
Author

mec0-de commented Mar 10, 2018

Thanks for your answer.
Would it be possible to make a little tutorial with all steps that I have to do (similar to the install guide of RPI-Jukebox-RFID)?
That would be very helpful :-)

@tullm
Copy link

tullm commented Mar 10, 2018

Hi. Don't remember it step by step, but have a look here: #5 (comment) there is a link to the tutorial that I used to install it.
Good luck...

@mec0-de
Copy link
Author

mec0-de commented Mar 10, 2018

OK, installation is not the problem with the tutorial.
But how can I configure triggering a playlist or album with RFID?

@tullm
Copy link

tullm commented Mar 11, 2018

Give me a day or two for the answer. Will get back to you here...

@tullm
Copy link

tullm commented Mar 12, 2018

So,

if you have installed mopidy and spotify premium ist working for you you can go on like that:

I've crated a variable in the "rfid_trigger_play.sh" under /home/pi/RPi-Jukebox-RFID/scripts like that:

CMDMUSIK1="0001234567 (the number represents the number from the rfid card.

Then i added another command (right under all the other commands)in the same script like that:
elif [ "$CARDID" == "$CMDMUSIK1" ]
then
# stop VLC and Start SpotifyPlaylist Musik1
mpc -p 6681 stop && mpc -p 6681 clear && mpc -p 6681 load Musik1 && mpc -p 6681 volume 80 && mpc -p 6681 play && sudo pkill vlc <- this whole mpc stuff is one line

So when you swipe the card 0001234567 it detects the special card which triggers the command. the commant stops mpc if it is playing, clears the current playlist, loads the Playlist Musik1 from spotify, sets volume to 80%,starts playing and kills vlc. You can load all playlists here by name. Or with the us of the uri url from spotify.

All command available are listed here: https://linux.die.net/man/1/mpc

I also made it possible to trigger paue, next and so on by adding these command to the normal command within the script like that:

elif [ "$CARDID" == "$CMDPAUSE" ]
then
# pause VLC media and mpc
echo "pause" | nc.openbsd -w 1 localhost 4212
mpc -p 6681 toggle

And also I added these 2 mpc lines way down in the script to stop mpc if a rfid card for vlc player is used:

# first kill any possible running vlc processn => stop playing audio
sudo pkill vlc
mpc -p 6681 stop
mpc -p 6681 clear

enjoy.

hope that helps.
tullm

@mec0-de
Copy link
Author

mec0-de commented Mar 14, 2018

Thank you, that helped a lot and now it works fine.

I made a little addition to the code to make everything a little more flexible. I can add new spotify playlists to the jukebox without editing the script. I just have to create a new audiofolder with a file named playlist.spotify. The content of this file is the name of the playlist.

Here is the code in rfid_trigger_play.sh:

        if [ -f $PATHDATA/../shared/audiofolders/$FOLDERNAME/playlist.spotify ]
        then
                playlistname=`cat $PATHDATA/../shared/audiofolders/$FOLDERNAME/playlist.spotify`
                sudo pkill vlc && mpc clear && sleep .1 && mpc load $playlistname && sleep .1 && mpc play
        else

You just have to insert it in the right place:

    # if a folder $FOLDERNAME exists, play content
    if [ -d $PATHDATA/../shared/audiofolders/$FOLDERNAME ]
    then
INSERT HERE
                # create an empty string for the playlist
                PLAYLIST=""

Again, thanks for your help.

PS: Sometimes, spotify stops working on my machine. The logfile shows that loading a playlist runs into a timeout. Do you have the same problem?

@MiczFlor
Copy link
Owner

I am planning to add the spotify option to the script in core. However, since I have no spotifiy (...) can somebody give me a brief "install" info here for the initial steps to get the Pi ready for spotify? Or should I just refer to the link posted by @tullm ?

To add spotify-connect I used: https://github.com/dtcooper/raspotify
tutorial to install is on github there.

@tullm
Copy link

tullm commented Mar 14, 2018

@MiczFlor Hi, great. But the link you postet is for spotify connect, not for spotify itself.

this ist the right one:

To add the Mopidy Music Server (for local or networkfiles, spotify and other music services) I used: https://www.mopidy.com/
tutorials:
english: https://maex.me/2017/10/raspberry-pi-as-a-music-server/
german: https://braspi.de/blogs/braspi-blog/raspberry-pi-als-musik-server-mit-mopidy
or the very good documentation from mopidy: https://docs.mopidy.com/en/latest/
I used extensions: spotify, local-images (cover database for local or network files), iris (webinterface), local files.

If you need help or testing let me know. (also in german if neede ;-) )

@infomobi ohh, that sound very interesting. Will try it. The Foldername ist the cardnumber then? And no, as long as the pi has network access it is working good...

@mec0-de
Copy link
Author

mec0-de commented Mar 15, 2018

The foldername in audiofolders is an alias like "Karneval" and includes the file playlist.spotify with the name of the playlist as content.
The automatically created folder CARDID in folder shortcuts points to this folder like it does with normal mp3-playlists.

@MiczFlor I can try to write the "step-by-step install" for spotify in the next days. You have to add my extension of your script to rfid_trigger_play.sh then.

@princemaxwell
Copy link
Contributor

princemaxwell commented Mar 15, 2018

@MiczFlor Hi, Spotify Connect is not needed. I have integrated spotify into my Pi by using Mopidy + MPC.
To get this working i created two options: Normal mode and Shuffle Mode.
I need one file in my audiofolder: "spotify.txt" or "spotifyshuffle.txt". Into that file i have to put the URL of the spotify playlist.

PS:
I made some improvements to the webinterface too:
-Play button is working for spotify
-Playing song is shown
-Covers integrated to the UI
-Added + and - buttons for Volume
-Added a filemanager to directly edit/delete the shortcuts and upload/edit/delete files to audiofolders
-Added direct links to the UI for editing/deleting shortcuts and audiofolders
-Some improvements for user friendlyness

Other improvements to rfid_trigger_play.sh:
-Added some association options to cards (shuffle, reboot, volume up, volume down ....)
-spotify integration
-shuffle for VLC and spotify
-automatic audiofolder creation (if shortcut points to an audiofolder which doesn't exist, it will be automatically created by reading the card again)

@MiczFlor
Copy link
Owner

hi @princemaxwell thanks for your input. If you were to share your work here or as a pull request, I would like to review and include it, if that is possible? And please don't forget to post a picture of your jukebox in the other thread to be included in the image gallery ;)

@princemaxwell
Copy link
Contributor

@MiczFlor sure, thats possible.
i will send you the files on evening...

@mec0-de
Copy link
Author

mec0-de commented Mar 17, 2018

Would you publish the files for testing here @MiczFlor and @princemaxwell?
I would love to test everything.

@princemaxwell
Copy link
Contributor

princemaxwell commented Mar 17, 2018

I have to remove some very individual adjustments from my code, which are only affecting my system.
And i have to add some comments...

@MiczFlor
Copy link
Owner

@princemaxwell ok, thanks for the feedback. Looking forward to the code.

@mec0-de
Copy link
Author

mec0-de commented Apr 25, 2018

@princemaxwell Any progress here? I would love to test everything. Thanks!

@pheck
Copy link
Contributor

pheck commented Apr 29, 2018

based on the infos linked in this thread, I could successfully add spotify support on my system. (Thanks, everyone!)
I've adopted the modifications @infomobi did to rfid_trigger_play.sh in #18 (comment) with one small change:
The original command:
sudo pkill vlc && mpc clear && sleep .1 && mpc load $playlistname && sleep .1 && mpc play
won't be executed if vlc (i.e. any playback other than spotify) isn't running because the pkill command returns with an errorlevel != 0 when it has nothing to kill, and due to the &&-linkage, the the command execution stops here.

I changed it to
sudo pkill vlc ; mpc clear && sleep .1 && mpc load $playlistname && sleep .1 && mpc play
so the command continues regardless of pkill's result.

Of course there are cleaner approaches that involve checking if there's actually a process to kill, ensuring it has been killed and so on, but this "fix" is keeps it simple and so far, it is working for me.

HTH

@nlssttzl
Copy link

Hey guys. Thanks for your great contribution. Without you I would have been able to manage to install all this.
An idea how the code should look like for v1.0?

@MiczFlor
Copy link
Owner

Hi @nlssttzl
Good point. This thread needs to go into the documentation for the branch with the old vlc code.
And if nobody else ventures into the new mpd version, I might need to get a Spotify account to figure out. It will take a few weeks. Busy with consolidating a few improvemebts and other tickets.
But thanks for reminding me. It will come.
All the best, micz

@nlssttzl
Copy link

nlssttzl commented Aug 18, 2018

Actually this shouldnt be too much of a problem since all the commands still work. So via console it is still possible to steer Spotify. I should even get easier since you just have to worry about mpc and not vlc.
Just have to figure out where and how to integrate it into your script and start playing once the card is being swiped.
Too bad I’m a really bad at programming. Maybe I’ll spend 1-2 evenings figuring out and trying around. However I would be glad if someone shares their experience.

@nlssttzl
Copy link

nlssttzl commented Aug 19, 2018

So I`m back from bouncing some ideas back and forth and I managed to get it running. Unfortunatly not with the more easy version of @infomobi but nevertheless, better than nothing. It should be possible to include the whole play/stop as well, but here finally my noob-skills are too noob.
In addition I did not manage yet to stop spotify when playing a "regular" card.
Well here's what I got:

First link a command to the card swiped in the settings/rfid_trigger_play.conf:
cmdplayspotify="0002763033"
Whereas the number matches the RFID-tag.

After that create in the scripts/rfid_trigger_play.sh in the section where all the case commands are (after: case $CARDID in

$cmdplayspotify) mpc stop ; mpc clear; mpc -p 6601 stop; mpc -p 6601 clear; mpc -p 6601 load auto && mpc -p 6601 play ;;
In that case "auto" is my spotify list. That command stops all "regular cards" and all running "spotify cards". 6601 is in my case the port which is being defined in the mopidy.conf

That's it. Not much but in a first step it's running. Next step now would be to include start/stop and to so playing spotify once a "regular card" is being swiped.

EDIT:
Just realized that it's quite easy to include all the necessary mopidy commands into the /scripts/rfid_trigger_play.sh right under the whole case $CARDID in-Sektion.

e.g. for stop:
$CMDSTOP) # kill all running audio players $PATHDATA/playout_controls.sh -c=playerstop; mpc -p 6601 stop;

That make the whole thing of having "common" command cards for modipy and "regular" mpd/mpc quite easy. Start/Stop should be possible somehow as well.

@no-banker
Copy link

First thanks a lot for the great work and the great idea! My first steps are done but now I want to integrate Spotify and I read this post.

@MiczFlor If I understood right you want to integrate the Spotify support in one of the next versions. You have an idea when you start with the implementation? I ask because If you are right now working on it I don’t start with the dirty version if the integration is already in progress. If you need help by testing this feature and if I’m able to help feel free to contact me.

@MiczFlor
Copy link
Owner

Hi @no-banker
thanks for offering support. A "working hack" is all we need at this stage for the latest phoniebox version.
How would you approach the issue?
If you get started on this, could you have a look at http://tizonia.org/ ?
My thoughts were to use this software as part of phoniebox. It it works, I would then add it to the install script.

@no-banker
Copy link

no-banker commented Sep 21, 2018

Hi @MiczFlor

Tonight I had time to test with tizonia. Seems to be a propper solution. But you have to install several tools on top:

pip install spotipy

pip install fuzzywuzzy

sudo apt-get install pulseaudio

I have tried to do everything without config file in tizonia by using the following command

tizonia --spotify-user myusername --spotify-password mypwd --spotify-playlist nameofplaylist

Afterwards you can steer with the keyboard:

Keyboard control:

[p] skip to previous file.
[n] skip to next file.
[SPACE] pause playback.
[+/-] increase/decrease volume.
[m] mute.
[q] quit.

These are all options for spotify which you can use:

Spotify options (Spotify Premium required):
--spotify-user arg Spotify user name (not required if provided via
config file).
--spotify-password arg Spotify user password (not required if provided via
config file).
--spotify-owner arg The owner of the playlist (optional: may be used in
conjunction with --spotify-playlist).
--spotify-tracks arg Search and play from Spotify by track name.
--spotify-artist arg Search and play from Spotify by artist name.
--spotify-album arg Search and play from Spotify by album name.
--spotify-playlist arg Search and play public playlists (owner is assumed
current user, unless --spotify-owner is provided).

Hopefully you can integrate it with this information? Sorry but I don’t have the skills to write the code.

@bgraeb
Copy link

bgraeb commented Sep 23, 2018

From what I can see, tizonia would not help at what we want to achieve, as it has no headless mode (right now).

I did a basic implementation with mopidy, but I had no time to integrate it.

This starts a playlist from Spotify:

from mpd import MPDClient

client = MPDClient()
client.timeout = 200
client.idletimeout = None
client.connect("localhost", 6600)
client.add("spotify:user:d5l7k1dqq59jr1qrtdlicykiq:playlist:1zVlcCYZ4BII9D7KMjceJv")
client.play()

As you can see, you can run this headless. One could use sys to read from stdin, as far as I can remember.

You need a registration at Spotify to create a authentication token: See here.

I need to upgrade my current installation. When I'm done, I'll take a look If I can integrate it (haven't had time to look into this project for a while - dunno how far you got).

@Alwiz79
Copy link

Alwiz79 commented Sep 23, 2018

@bgraeb this seems to be in general a pretty interesting thread you linked there.

mopidy/mopidy-spotify#182 (comment)

I also think that Tizonia won’t help us. In the above thread someone mentions he uses NFC cards that hold a Spotify uri to be played and passes that on to mopidy :-)
And your first trials look good.
I’ll return from holidays in around two weeks, will try to help then if it’s not solved until then

@MiczFlor
Copy link
Owner

Hi @bgraeb @no-banker @Alwiz79
looking forward to get a Spotify account to test your pull requests :)
My hope for tiziona was that it would be a neat wrapper around not only Spotify but Google Music and other services. The issue at hand: is it "truely" headless. I haven't tried it.
Please take a look also at an older thread: #118 (comment)
There is some information on Spotify - which, as you can imagine without an account (yet!) - I haven't tested.
Keep the good thoughts and contributions coming!
all the best, micz

@Alwiz79
Copy link

Alwiz79 commented Oct 26, 2018

@princemaxwell I followed your step by step above on my second Rpi hardware. But it didn't work as expected. So, I had a running spotify installation before (i had issues with local files here).

After the steps above, spotify integration was gone.
The GUI shows "classic" in the upper left corner, which might be a hint, that it's not the spotify version ?

@princemaxwell
Copy link
Contributor

princemaxwell commented Oct 27, 2018

@Alwiz79

The important steps for updating are all the steps above.
The first block updates your phoniebox to 1.1.8-beta. the second stores your Spotify informations temporarily. The third copies the new configuration files of mopidy. The fourth block puts the temporarily stored user informations into configuration files. The fifth updates the services. The sixth identificates the edition. The last updates the mopidy-Spotify plugin.

For the identification of classic or non-classic the steps are:

echo "classic" > /home/pi/RPi-Jukebox-RFID/settings/edition
EDITION=$(grep 'SPOTinstall' /home/pi/PhonieboxInstall.conf|sed 's/SPOTinstall="//g'|sed 's/"//g'); if [ $EDITION == "YES" ]; then echo "plusSpotify"; else echo "classic"; fi > /home/pi/RPi-Jukebox-RFID/settings/edition

You can put it on command line either you did a fresh installation or not. But line by line...

@princemaxwell
Copy link
Contributor

princemaxwell commented Oct 31, 2018

EVERYONE WITH PROBLEMS STARTING LOCAL PLAYLISTS HAS TO RUN THIS COMMAND ONCE:

Depending of the location of audiofolder (this is for default location):
sudo chmod -R 777 /home/pi/RPi-Jukebox-RFID/shared/audiofolders/

If you have +Spotify Edition (>=1.1.8-beta) you have to SCAN MUSIC LIBRARY

-> Renew your database under Folders & Files.

And please upload this file to fix the upload in the WebUI or wait until @MiczFlor has merged it!
princemaxwell@500922f

@shinebar1001
Copy link

As mopidy is spamming the logfiles with logs like these

Nov 3 23:12:25 phoniebox mopidy[525]: INFO New MPD connection from [::ffff:127.0.0.1]:6600

I suggest to create a filter in the syslog to protect the SD-Card from wearing out:

sudo echo ':msg, contains, "New MPD connection from" ~' >/etc/rsyslog.d/mopidy.conf
service rsyslog restart

and change the logging options of mopidy as well:

sudo sed -i '/INFO/WARNING/' /etc/mopidy/logging.conf

@princemaxwell
Copy link
Contributor

@shinebar1001
Great! Thank you. I will integrate the fix into the install script and will pull request this...

@SmightyCrown
Copy link

Is it possible to update from 1.8beta to 1.18rc2 by git pull or would be a clean install the bettet way? With the beta, i have sometimes problems with local files. Also after the workaround with chmod and renewing the database.

@ndd
Copy link

ndd commented Nov 11, 2018

First of all: thanks for the great work!

I've just installed Phoniebox 1.1.8-rc2 Spotify Edition and everything works fine, except for loading/playing playlists from Spotify. Tracks and Albums are fine and can easily played via command line or mapped to a card:
mpc add spotify:album:4O83oaztVuBlPDrp50Q3mh (works)
mpc add spotify:track:0aHq4pmQth8Ggj5LyFNBn9 (works)

mpc add spotify:user:Spotify:playlist:37i9dQZF1DXcF6B6QPhFDv (doesn't work)
mpc add spotify:user:tomorrowlandofficial:playlist:0yS25E7g9xQZ1Dst5SqUZn (doesn't work)

What am I doing wrong? :)
Or is this Mopidy issue the reason: mopidy/mopidy-spotify#182

@princemaxwell
Copy link
Contributor

@SmightyCrown
You can git pull the develop or master branch.
Follow this update guide to get it to the actual version:
#18 (comment)

and then

#18 (comment)

Or do a fresh install by install script and chmod the folder.

@ndd
Have you installed with one line script or have you updated? There is a fix for the playlist issues which is included in our version.

@ndd
Copy link

ndd commented Nov 12, 2018

@princemaxwell
I've used the one line script...
Where do I find the fix? What do you mean by "our" version?

Thanks a lot!

@princemaxwell
Copy link
Contributor

princemaxwell commented Nov 12, 2018

@ndd
Sorry. I didn't see yesterday. For playlists you have to use

mpc load "playlistname"

mpc add is not working for this

Please try the load command

@ndd
Copy link

ndd commented Nov 13, 2018

@princemaxwell
With mpc load "playlistname" I can only load local m3u-playlists, which are in the playlists folder...
This would be fine as long as I could reference a Spotify playlist within such a m3u playlist. But as I mentioned before, this does only work for tracks and albums.

Example 1: album.m3u
spotify:album:4O83oaztVuBlPDrp50Q3mh (works)

Example 1: myplaylist.m3u
spotify:user:tomorrowlandofficial:playlist:0yS25E7g9xQZ1Dst5SqUZn (doesn't work)

@shitzovran
Copy link

shitzovran commented Nov 15, 2018

@princemaxwell
With mpc load "playlistname" I can only load local m3u-playlists, which are in the playlists folder...
This would be fine as long as I could reference a Spotify playlist within such a m3u playlist. But as I mentioned before, this does only work for tracks and albums.

Example 1: album.m3u
spotify:album:4O83oaztVuBlPDrp50Q3mh (works)

Example 1: myplaylist.m3u
spotify:user:tomorrowlandofficial:playlist:0yS25E7g9xQZ1Dst5SqUZn (doesn't work)

Same Problem here... you got a solution by now? Artists, Tracks, Albums works fine. Just Playlists doesn't works

@princemaxwell
Copy link
Contributor

princemaxwell commented Nov 16, 2018

@ndd @shitzovran

I tested it here. i created a file "test.m3u" in my playlists directory under "/home/pi/RPi-Jukebox-RFID/playlists/".
The file has the follwing content, like you provided:
spotify:user:tomorrowlandofficial:playlist:0yS25E7g9xQZ1Dst5SqUZn

pi@phoniebox:~ $ mpc clear
volume: 10%   repeat: off   random: off   single: off   consume: off
pi@phoniebox:~ $ **mpc load "test"**
loading: test
pi@phoniebox:~ $ mpc play
volume: 10%   repeat: off   random: off   single: off   consume: off
pi@phoniebox:~ $ mpc status
DJ Rolando - Knights Of The Jaguar
[playing] #1/467   0:04/2:30 (2%)
volume: 10%   repeat: off   random: off   single: off   consume: off

So, for me it worked fine.

Please note: It is not possible to user command line to load playlists directly with spotify uri. if you try something like "mpc load spotify:user:blabla:playlist:blabla" this does not work.
You have to put this URI into a m3u file and then you can try
mpc load "filename"
Please put filename into quotation marks.

If this doesn't work, you have to put this on command line.

sudo apt-get install libspotify12 python-cffi python-ply python-pycparser python-spotify
sudo rm -rf /usr/lib/python2.7/dist-packages/mopidy_spotify*
sudo rm -rf /usr/lib/python2.7/dist-packages/Mopidy_Spotify-*
sudo rm -rf /usr/local/lib/python2.7/dist-packages/mopidy_spotify*
sudo rm -rf /usr/local/lib/python2.7/dist-packages/Mopidy_Spotify-*
cd
sudo rm -rf mopidy-spotify
git clone -b fix/web_api_playlists --single-branch https://github.com/princemaxwell/mopidy-spotify.git
cd mopidy-spotify
sudo python setup.py install

And please be sure you have not installed more than one instance of mopidy-spotify.
Check this please!

@shitzovran
Copy link

I don't know wht's wrong...

i create new Playlists in "/home/pi/RPi-Jukebox-RFID/playlists/"

the first: "Leo Lausemaus - Folge 01.m3u8". The file has the follwing content:
spotify:album:5N73vwGXol4maS9U6HLp0o

The Album works fine.

pi@raspberrypi:/ $ mpc clear
volume: 75%   repeat: off   random: off   single: off   consume: off
pi@raspberrypi:/ $ mpc load "Leo Lausemaus - Folge 01"
loading: Leo Lausemaus - Folge 01
pi@raspberrypi:/ $ mpc play
volume: 75%   repeat: off   random: off   single: off   consume: off
pi@raspberrypi:/ $ mpc status
Leo Lausemaus - Leo Lausemaus Titelsong
[playing] #1/23   0:15/1:19 (18%)
volume: 75%   repeat: off   random: off   single: off   consume: off

the other Playlist "test.m3u8" with follwing content:
spotify:user:tomorrowlandofficial:playlist:0yS25E7g9xQZ1Dst5SqUZn

pi@raspberrypi:/ $ mpc clear
volume: 75%   repeat: off   random: off   single: off   consume: off
pi@raspberrypi:/ $ mpc load "test"
loading: test
mpd error: No such playlist
pi@raspberrypi:/ $ mpc clear
volume: 75%   repeat: off   random: off   single: off   consume: off
pi@raspberrypi:/ $ mpc load "test"
loading: test
pi@raspberrypi:/ $ mpc play
volume: 75%   repeat: off   random: off   single: off   consume: off
pi@raspberrypi:/ $ mpc status
volume: 75%   repeat: off   random: off   single: off   consume: off

the playlist doesn't want to work. and no change after reinstallation.
Could it be, there is a problem in the 'One line install command' ?

@princemaxwell
Copy link
Contributor

princemaxwell commented Nov 17, 2018

@shitzovran
Don't use m3u8 anymore. The use of m3u8 is deprecated since version "rc1".
Try m3u and perhaps it works ;-)

Are you sure you have the newest release installed?

@shitzovran
Copy link

No, the same Problem with m3u.
And without using m3u8, some of my local files won't play .
I just realized, i have the same problem with podcasts from Spotify...

@princemaxwell
Copy link
Contributor

@shitzovran
What version do you use?
Did you upgrade and did you followed ALL STEPS from the upgrade guide to get you version to 1.1.8-rc2??

@MiczFlor
Copy link
Owner

The code has moved on. I am closing this, assuming the later code solved it. :) All the best, micz

@ndd
Copy link

ndd commented Dec 16, 2018

I've just installed a clean and fresh Raspbian as well as the latest Phoniebox +Spotify Edition (1.1.8) via one line script.
Still having the problems with playlists mentioned above...

With mpc load "playlistname" I can only load local m3u-playlists, which are in the playlists folder...
This would be fine as long as I could reference a Spotify playlist within such a m3u playlist. But as I mentioned before, this does only work for tracks and albums.

Example 1: album.m3u
spotify:album:4O83oaztVuBlPDrp50Q3mh (works)
Example 1: myplaylist.m3u
spotify:user:tomorrowlandofficial:playlist:0yS25E7g9xQZ1Dst5SqUZn (doesn't work)

Songs and Albums are still working fine, no matter if I call them directly or via a m3u-playlist in the playlists folder.

@princemaxwell
I've run all your commands as well...

@ndd
Copy link

ndd commented Dec 16, 2018

Seems like this is still an "official" mopidy problem:
mopidy/mopidy-spotify#182

@kathateich
Copy link

kathateich commented Dec 20, 2018 via email

@Stev-En
Copy link

Stev-En commented Mar 25, 2019

Hallo,
es sind ja soviel Kommentare und Tickets offen, da versuche ich hier mal mein Glück.
Der Fehler wird öfters mal beschrieben aber, aber nie richtig drauf eingegangen.

Ich habe wie hier beschrieben die "Phoniebox + Spotify Edition:" installiert, habe es auch schon mehrmals versucht aber immer der gleiche Fehler. Ich kann in der Web-App Musik (.Mp3) vom Rechner einbinden Youtube geht auch ABER Spotify lässt sich einbinden aber nicht Abspielen.

Hier wird der Spotify Accout ja gezeigt https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/master/docs/SPOTIFY-INTEGRATION.md
da hab ich eine Frage wie es Richtig ist mit %....% oder ohne?

username = %spotify_username%
password = %spotify_password%
client_id = %spotify_client_id%
client_secret = %spotify_client_secret%

Weil in der Installation schreibt er es ohne %...%, aber beim Passwort so %spotify_password%!
Wird das Passwort nur nicht richtig anzeigt oder müsste es im Klar Text stehen?

Ich wäre auf Hilfe sehr dankbar. Versuch jetzt schon seit Wochen den Fehler zu finden.


Hello,
There are so many comments and tickets are open, I'm trying my luck here.
The error is often described but never really got into it.

I have like [here] (https://github.com/MiczFlor/RPi-Jukebox-RFID/wiki/INSTALL-stretch#one-line-install-command) described the "Phoniebox + Spotify Edition:" installed it, have it several times but always tried the same error. I can integrate music in the web app (.Mp3) from the computer Youtube is synonymous BUT ** Spotify can be integrated but not play **.

This is where the Spotify Accout is shown [https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/master/docs/SPOTIFY-INTEGRATION.md](https://github.com/MiczFlor/RPi-Jukebox -RFID / blob / master / docs / SPOTIFY-INTEGRATION.md)
I have a question how it is right with% ....% or without?

username =% spotify_username%
password =% spotify_password%
client_id =% spotify_client_id%
client_secret =% spotify_client_secret%

Because in the installation he writes it without% ...%, but with the password so% spotify_password%!
Is the password just not displaying correctly or should it be in clear text?

I would be very grateful for help. Try to find the mistake for weeks now.

@bgraeb
Copy link

bgraeb commented Mar 25, 2019

Die % sind jeweils nur Platzhalter und müssen mit dem PW ersetzt werden. Also aus username=%spotify_username% wird username=hanSolo@pirateWeb.star

@bgraeb
Copy link

bgraeb commented Mar 25, 2019

I've setup the box just recently by creating an spotify-token with the website somewhere linked here and using the autoinstaller script. It worked just fine.

@princemaxwell
Copy link
Contributor

So ist es, das sind Platzhalter und es müssen im Installer die 4 Daten exakt eingetragen werden. Die Platzhalter werden dann von den Daten ersetzt. Bei den meisten funktioniert es ja, ich vermute also irgendwo einen Fehler bei der Eingabe...

@Silverhawk0705
Copy link

Hallo,
meine Spotify Integration funktioniert grundsätzlich, jedoch kann ich keine Öffentliche Playlists von Spotify abspielen.
Aktuell z.B. die Christmas Hits von Spotify mit folgendem Link:
spotify:playlist:37i9dQZF1DX0Yxoavh5qJV
Ist dies ein allg. Problem oder läuft da bei mir etwas falsch?

@bubble1999
Copy link

I am very new with Github and actually do not know where I could help to edit the documentation.
However, I will share my insigths here and hope someone can put them into the code:

  1. SPI is not activated automatically, so e.g. MFRC522 does not work. It has to be enabled via
    sudo rasp-config and rebooting. Perhaps it would be possible to show up an info-message during the install scrips to be sure to have SPI activated
  2. I got confused and mixed up "mopidy client ID & secret" with "spotify developer client ID & secret". Here it would be great to state in the install script, that the mopidy client ID is needed (and perhaps a hint to the web adress https://mopidy.com/ext/spotify/#authentication
  3. I had a lot of trouble getting the spotify streams running. Same issue as decribed here https://github.com/natumbri/mopidy-youtube/issues/58 or here https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/1067
    I got it running by going through this procedure: https://forum-raspberrypi.de/forum/thread/48179-phoniebox-spotify-ich-bekomme-es-nicht-zum-laufen/
    I think the main difference from what I did is that I installed the raspian packages for the desktop environment (because I thought that I will not need them on the headles raspberry) However, it seems that there are some drivers hidden which are needed to get Spotify streams running.
    I hope this can help to improve this great project.

@s-martin
Copy link
Collaborator

Hi @bubble1999, please open a new issue, if you have problems.

Questions in old and closed issues are easily overlooked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests