-
Notifications
You must be signed in to change notification settings - Fork 397
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
Comments
Hi. |
Thanks for your answer. |
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. |
OK, installation is not the problem with the tutorial. |
Give me a day or two for the answer. Will get back to you here... |
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:
Then i added another command (right under all the other commands)in the same script like that: 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:
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:
enjoy. hope that helps. |
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:
You just have to insert it in the right place:
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? |
I am planning to add the
|
@MiczFlor Hi, great. But the link you postet is for spotify connect, not for spotify itself. this ist the right one:
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... |
The foldername in audiofolders is an alias like "Karneval" and includes the file playlist.spotify with the name of the playlist as content. @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. |
@MiczFlor Hi, Spotify Connect is not needed. I have integrated spotify into my Pi by using Mopidy + MPC. PS: Other improvements to rfid_trigger_play.sh: |
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 ;) |
@MiczFlor sure, thats possible. |
Would you publish the files for testing here @MiczFlor and @princemaxwell? |
I have to remove some very individual adjustments from my code, which are only affecting my system. |
@princemaxwell ok, thanks for the feedback. Looking forward to the code. |
@princemaxwell Any progress here? I would love to test everything. Thanks! |
based on the infos linked in this thread, I could successfully add spotify support on my system. (Thanks, everyone!) I changed it to 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 |
Hey guys. Thanks for your great contribution. Without you I would have been able to manage to install all this. |
Hi @nlssttzl |
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. |
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. First link a command to the card swiped in the settings/rfid_trigger_play.conf: After that create in the scripts/rfid_trigger_play.sh in the section where all the case commands are (after:
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: e.g. for 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. |
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. |
Hi @no-banker |
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:
I have tried to do everything without config file in tizonia by using the following command
Afterwards you can steer with the keyboard: Keyboard control: [p] skip to previous file. These are all options for spotify which you can use: Spotify options (Spotify Premium required): Hopefully you can integrate it with this information? Sorry but I don’t have the skills to write the code. |
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 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 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). |
@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 :-) |
Hi @bgraeb @no-banker @Alwiz79 |
@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 important steps for updating are all the steps above. For the identification of classic or non-classic the steps are:
You can put it on command line either you did a fresh installation or not. But line by line... |
EVERYONE WITH PROBLEMS STARTING LOCAL PLAYLISTS HAS TO RUN THIS COMMAND ONCE:Depending of the location of audiofolder (this is for default location): 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! |
As mopidy is spamming the logfiles with logs like these
I suggest to create a filter in the syslog to protect the SD-Card from wearing out:
and change the logging options of mopidy as well:
|
@shinebar1001 |
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. |
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:user:Spotify:playlist:37i9dQZF1DXcF6B6QPhFDv (doesn't work) What am I doing wrong? :) |
@SmightyCrown and then Or do a fresh install by install script and chmod the folder. @ndd |
@princemaxwell Thanks a lot! |
@ndd mpc load "playlistname" mpc add is not working for this Please try the load command |
@princemaxwell Example 1: album.m3u Example 1: myplaylist.m3u |
Same Problem here... you got a solution by now? Artists, Tracks, Albums works fine. Just Playlists doesn't works |
I tested it here. i created a file "test.m3u" in my playlists directory under "/home/pi/RPi-Jukebox-RFID/playlists/".
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. If this doesn't work, you have to put this on command line.
And please be sure you have not installed more than one instance of mopidy-spotify. |
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: The Album works fine.
the other Playlist "test.m3u8" with follwing content:
the playlist doesn't want to work. and no change after reinstallation. |
@shitzovran Are you sure you have the newest release installed? |
No, the same Problem with m3u. |
@shitzovran |
The code has moved on. I am closing this, assuming the later code solved it. :) All the best, micz |
I've just installed a clean and fresh Raspbian as well as the latest Phoniebox +Spotify Edition (1.1.8) via one line script.
Songs and Albums are still working fine, no matter if I call them directly or via a m3u-playlist in the playlists folder. @princemaxwell |
Seems like this is still an "official" mopidy problem: |
I have some problems, too. My playlists sometimes work, but sometimes (I
cannot reproduce this behaviour) I need to push the play button to start
the music. Is that a "solution" for your problem, too?
Am Sonntag, 16. Dezember 2018 schrieb Niels Döring <notifications@github.com
…:
Seems like this is still an "official" mopidy problem:
mopidy/mopidy-spotify#182
<mopidy/mopidy-spotify#182>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Ap_7EIa6sxTeN3tMpE_g-tmX-u_XeR0Hks5u5k58gaJpZM4Sk7As>
.
|
Hallo, 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 username = %spotify_username% Weil in der Installation schreibt er es ohne %...%, aber beim Passwort so %spotify_password%! Ich wäre auf Hilfe sehr dankbar. Versuch jetzt schon seit Wochen den Fehler zu finden. Hello, 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) username =% spotify_username% Because in the installation he writes it without% ...%, but with the password so% spotify_password%! I would be very grateful for help. Try to find the mistake for weeks now. |
Die |
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. |
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... |
Hallo, |
I am very new with Github and actually do not know where I could help to edit the documentation.
|
Hi @bubble1999, please open a new issue, if you have problems. Questions in old and closed issues are easily overlooked. |
Hello,
thanks for the great work.
Will it be possible to play songs or playlists from Spotify premium?
Thanks four your help!
The text was updated successfully, but these errors were encountered: