While we are working on the new branch pr80-mpd-as-audio-player a new installation routine is in the making. You can see the script here:
https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/pr80-mpd-as-audio-player/scripts/installscripts/stretch-install-default-02.sh
The new install will also look for an existing install and ask what elements to re-use (e.g. GPIO scripts, audio folders, etc.)
The one line install should look something like this:
~
wget https://raw.githubusercontent.com/MiczFlor/RPi-Jukebox-RFID/pr80-mpd-as-audio-player/scripts/installscripts/stretch-install-default-02.sh; chmod +x stretch-install-default-02.sh; ./stretch-install-default-02.sh
~
Needless to say: there are bound to be problems once this branch goes live.
So I would appreciate feedback and possible tests. Having said that, you would need to edit the current version to work with the branch . Actually, I fixed this, the install script will now automatically switch to the dev branch,pr80-mpd-as-audio-player and not master
I want this to work at least for "out of the box" installs before we move the entire master to the new MPD driven playout - which has a lot of neat little improvements (like 'resume play' for audiobooks which can be set individually) besides massive battery saving.
The script is kind of half finished. But the sooner the testing starts the better. One of the features that will be included once the install works: "fallback to hotspot", meaning: if you are on the road, you can connect to the Phoniebox directly, it will start a WiFi hotspot. When at home, it will connect to your WiFi as usual.
So please, knock yourself out to test this.
Hi,
I have installed the script but now the audio playback does not work anymore. The web-gui show 0% volume and I am unable to change this value. On the command line I am able to play sound with vlc but with mpd it is not working. Any idea?
Cheers, Thomas
Hi @gusmax777
thanks for jumping into the deep end of the pool :)
Firstly, you should see if you can jump back to your working VLC install by switching back to the main branch:
~
git checkout master
~
When you say mpd is not working, does that mean it doesn't work on your system or that it doesn't work on Phoniebox?
When you went through the install script, did you
What do you get when you type
~
sudo cat /etc/mpd.conf | grep mixer_control
sudo cat /etc/mpd.conf | grep music_directory
~
Hi,
No Problem at all ;) Jumping into cold water is one of my favourite activities.
I think that my installation of mpc is somehow corrupt. The outputs to the 2 cats is:
pi@raspberrypi:~ $ sudo cat /etc/mpd.conf | grep mixer_control
mixer_control "PCM" # optional
mixer_control "PCM" # optional
and
sudo cat /etc/mpd.conf | grep music_directory
music_directory "%DIRaudioFolders%"
music_directory are changed.
symbolic links outside of the configured music_directory.
symbolic links inside of the configured music_directory.
Cheers, Thomas
Hi,
And about mpc... The phoniebox itself works. But I cannot start the playback of any file.
So it is kind of both. Mpc does not work on Phoniebox and the system via cmd. Maybe I will try a fresh install in the evening.
Cheers, Thomas
Can you manually replace
~
%DIRaudioFolders%
~
with
~
/home/pi/RPi-Jukebox-RFID/shared/audiofolders
~
inside /etc/mpd.conf (or whatever folder you are using for your folders containing audio files)?
Regarding the accessibility and changes via web app, please type:
~
sudo chown pi:www-data /home/pi/RPi-Jukebox-RFID/settings
sudo chmod 775 /home/pi/RPi-Jukebox-RFID/settings
~
Then do a reboot...
(I have to figure out what's wrong with the script re mpd.conf - but have to do that after work :)
Thanks Micz,
That made it working again. Will do some more tests in the evening.
Cheers, Thomas
Had the latest vlc installed, RaspberryPi 1 B Rev2.
The installation script was quite easy to follow.
Here is my feedback:
Received the question to overwrite gpio-buttons.py -> Answered with "yes"

GPIO buttons are working correctly
Playback did not start in the web app, so i checked the audio folder inside mpd.conf = correct
I applied the rights like described in your post:
sudo chown pi:www-data /home/pi/RPi-Jukebox-RFID/settings
sudo chmod 775 /home/pi/RPi-Jukebox-RFID/settings
This solved the problem
My Pi is booting much faster now (25sec from first rfid initilization beep till startup sound, 40sec with the VLC version).
Persistent bug:
If a music folder (started by rfid) is playing and the rfid-reader scans another card (or over the web app) the current playback stops but nothing else happens. I have to rescan the new card or click a second time on the new folder in the web app to start the playback.
Thanks a lot!
Hi @Caliandroid
thanks for the thorough testing. Based on your findings, I just pushed another fix
https://github.com/MiczFlor/RPi-Jukebox-RFID/commit/39464e90e2ee07a8f91c1a7d2e5cd96ab85a1a7b
If you go into the Phoniebox dir and type git pull you should get the latest changes. Please let me know if it works now.
The behaviour now should be:
And thanks again for testing!!!!
You're welcome and i have to thank you for all the effort.
Results:
_RFID-usage-only:_
If folder A is playing and i swipe card B, folder B starts directly to play but if i swipe again card A, folder A starts from the very beginning and does not resume from the last position.
Resume play doesn't work too if i press the GPIO pause button (a.k.a %cmdpause%) before swiping card B.
I assume that no resume bookmark is created when i control the box by rfid and gpio.
_web-app-usage:_
Resume works correctly if i use only the web-app.
@Caliandroid
I have to change the GPIO script. I totally forgot aboit that :)
Which means you will possibly need to alter your code, too.
But swipe and web app should work identically. Can you try some more? There was a change in the format of the file tracking position. Possibly the resume only works the second time round.
Update: I've played around a little bit more and activated the debug mode.
I've found out that the lastplayed.dat don't get written/updated with
VAR COMMAND: playerpause
but this is the default "halt" function in the gpio.script
We could add the
$PATHDATA/resume_play.sh -c=savepos
to playerpause to make it work...
I will continue after my kids have gone to sleep :-)
Another problem found (without modifications)
I've received a lastplayed.dat file in folder B that contains the data from folder A (folder B was playing and i swiped card A).
and something else:
1.1 IF new folder given ("$Latest_Folder_Played" != "$FOLDER")
returns sometimes false while switching between folder A and B so there must be a constellation where $latest_folder_played gets updated too soon with the new folder.
Hi @Caliandroid
please, you are doing such a great job testing, help us once more. There is a newer version out not. git pull should get you the code. Keep up the good work!
Hi @MiczFlor : 2hours ago i was able to pull the changes but it became even worse and some cards did not play anymore and no position was saved. I was not able to check the logs and did everything over my smartphone.
I've seen that you changed file access rights + folder write procedure for lastplayed.dat in your latest commit 15 min ago, so i updated the repository once again and my first RFID tests worked just fine after i de- and reactivated the resume play to delete the existing lastplayed.dat files.
I'll keep this branch and get back at you in case of problems.
Another minor bug that i've found: (i don't know if it exists only in the pr80 branch):
File order of tracks inside a folder is sometimes A-Z then a-z:
Example:
and sometimes it's Aa-Zz
Example:
As a result, the track order is not always identical while using the "NEXT" command.
I don't know yet what triggers the different order logic.
I'll try to send you some screenshots
Hi @Caliandroid
I made another update. Please pull again. I also teleased version 1.0 on master.
It worked for me and the pr80 branch got too big. You should be able to switch to master branch an pull. Your configs shpuld be save.
And please start another issue regarding the ordering. Thanks!
Done - Thank you
I am closing this ticket, because of the launch of version 1.0 on master. If you have any issues, please try first if they are still happening on the latest version 1.0. If so, open another ticket, please.
stretch The version 1.0 has not been tested on jessie
jessie Version 1.0 is a major improvement (which will be full of bugs, for sure :) and I want to thank all the contributors and Phoniebox lovers with their input, pictures, bug fixes and suggestions.
Most helpful comment
Had the latest vlc installed, RaspberryPi 1 B Rev2.
The installation script was quite easy to follow.
Here is my feedback:
Received the question to overwrite gpio-buttons.py -> Answered with "yes"

GPIO buttons are working correctly
Playback did not start in the web app, so i checked the audio folder inside mpd.conf = correct
I applied the rights like described in your post:
This solved the problem
My Pi is booting much faster now (25sec from first rfid initilization beep till startup sound, 40sec with the VLC version).
Persistent bug:
If a music folder (started by rfid) is playing and the rfid-reader scans another card (or over the web app) the current playback stops but nothing else happens. I have to rescan the new card or click a second time on the new folder in the web app to start the playback.
Thanks a lot!