Halen78
Posts: 5
Joined: Thu Jan 26, 2017 3:49 am

Re: fruitbox MP3 jukebox

Thu Oct 01, 2020 6:57 pm

PART 1 OF 3

Hello all,
Right off the bat, I want to send a big huge Thank You to Mike for sharing his awesome jukebox software with the Raspberry Pi community.
I'm a big fan of SalmonKing's SK Jukebox for the PC from back in the day, and since getting into RPi a few years back I've been on the lookout for something similar. Fruitbox exceeded my expectations.

A few weeks ago I set myself the task of integrating Fruitbox with a customized RetroPie image, and specifically with the EmulationStation front end. Last weekend I successfully completed this task. In-between, it was a lot of searching, Googling, reading forum posts and trial-and-error. If a step-by-step guide exists out there, I utterly failed to find it. So while stumbling through the process, I kept good notes, with the intention of organizing them and creating a step-by-step guide. That's the purpose of this post, and I hope someone finds it useful.

IMPORTANT NOTE: What follows is a guide to integrate Fruitbox with a Jessie-based RetroPie build. RetroPie sits atop an operating system called Raspbian. Raspbian OS is based on Debian Linux, which sees major releases every couple years. At the time of this writing, the current Raspbian OS version is 10, a.k.a. "Buster", and the Fruitbox documentation explicitly recommends starting on a fresh Buster-based OS install. "Jessie" was version 8 - two versions and several years behind Buster. So specific steps had to be taken to get Fruitbox to play nice with Jessie. If you are installing Fruitbox on an updated operating system, just follow the instructions from Mike's Github repo, and then skip the "INSTALLATION" section of this guide completely, and go straight to "INTEGRATION" for the Emulationstation bit.

To confirm your OS build, execute the following command from the command line on your Raspberry Pi:

Code: Select all

cat /etc/os-release
MOST IMPORTANT NOTE OF ALL: Before attempting this procedure, back up your SD card. I take no responsibility whatsoever for any problems which may arise from following this guide. This is the process which worked for me, your mileage may vary.

GOAL:: Install Fruitbox on a Jessie-based RetroPie image, and integrate it with the EmulationStation front end.

SET UP

1) You already took that back-up of your current image, right?
2) Your Raspberry Pi is up and running, connected to the internet, and has a keyboard attached.
3) While all of this can be done directly on your Pi, you would benefit greatly from connecting a PC to your Pi using an SSH client such as PuTTY, so you can easily cut and paste the commands shown below rather than typing them manually.
4) You have backed out of EmulationStation (Hit F4) on your Pi, and you are sitting at a Linux command prompt, in your home directory.
If any of the steps above are even the slightest bit mysterious to you, take your hands off the keyboard and back away slowly. Hold off on going any further until you level-up your Linux/Pi skill set a bit.

...proceed to Part 2 of 3...

Halen78
Posts: 5
Joined: Thu Jan 26, 2017 3:49 am

Re: fruitbox MP3 jukebox

Thu Oct 01, 2020 6:58 pm

PART 2 OF 3

INSTALLATION

1) On your PC, navigate to the Fruitbox Github repo:
https://github.com/chundermike/rpi-fruitbox

2) Click into the build directory and open "build.txt".

3) Follow the directions found in build.txt to the letter. The only note I will add is, read the comments in that file carefully, because it will call out which commands need to be executed specifically for a Jessie build or for a Stretch build. Don't forget to execute the "make" command at the very end.

4) On your Pi, from your home directory, change directories into the newly created rpi-fruitbox-master directory, and familiarize yourself with the contents. If you run an ls command in this directory, you should get something like this:

pi@retropie:~/rpi-fruitbox-master $ ls -ltrah
total 18M
drwxr-xr-x 4 pi pi 4.0K Sep 24 17:36 . <-- Current Directory
drwxr-xr-x 19 pi pi 4.0K Sep 24 16:51 .. <-- Parent Directory
drwxr-xr-x 4 pi pi 4.0K Sep 24 17:35 build <-- Lots of stuff not to mess with here, let's leave it at that.
drwxr-xr-x 14 pi pi 4.0K Jun 16 21:36 skins <-- The Skins Directory. You will be making changes here.
-rw-r--r-- 1 pi pi 84K Jun 16 21:36 userguide.txt <-- Useful info here.
-rw-r--r-- 1 pi pi 18K Jun 16 21:36 release_notes.txt <-- Useful info here.
-rw-r--r-- 1 pi pi 2.4K Jun 16 21:36 README.md <-- Useful info here.
-rw-r--r-- 1 pi pi 484 Jun 16 21:36 skins.txt <-- Outside the scope of this guide.
-rw-r--r-- 1 pi pi 899 Jun 16 21:36 install.sh <-- Don't touch this.
-rw-r--r-- 1 pi pi 5.4M Jun 16 21:36 fruitbox-jessie <-- THIS is the one you will want to use. Notice, it is not yet executable!
-rw-r--r-- 1 pi pi 6.1M Jun 16 21:36 fruitbox-buster <-- This is for a Buster-based operating system.
-rwxr-xr-x 1 pi pi 5.5M Sep 24 17:35 fruitbox <-- This is for a Stretch-based operating system.
-rw-r--r-- 1 pi pi 113 Sep 24 17:36 fruitbox.log <-- Console output gets written here.

In addition to creating rpi-fruitbox-master in your Home Directory, it also creates an empty Music directory (pi@retropie:~/Music). This is where your MP3s go.

5) Execute the following command to make the fruitbox-jessie binary executable:

Code: Select all

sudo chmod +x fruitbox-jessie
6) Perform an initial test run by invoking the fruitbox-jessie binary with no arguments.
Note: I suggest not invoking the fruitbox-jessie binary from within the SSH client on your PC (if you are using one). Frankly, I don't know whether it would even work. So for what it's worth, I recommend switching to the keyboard hooked directly into your Pi to launch the program.
Execute the following command:

Code: Select all

sudo ./fruitbox-jessie
This should display a short help file onscreen.
If this works, proceed to the next step.
If you receive any error, you will need to work through it. If you get stuck, the folks on this forum are very helpful.

7) Next order of business is to understand the available Fruitbox "button controls", and map your physical controller (connected to your Pi) to those in-program controls.

7a) From the rpi-fruitbox-master directory, open userguide.txt. Or, more conveniently, open userguide.txt from the Fruitbox Github repo on your PC, so you can refer back to it at any time on your computer screen. In the user guide, scroll down to section 10.1 Default Buttons. These are all the button controls available to you in Fruitbox. I recommend the following course of action.

- Determine how many total inputs are available to you (number of buttons on your game controller, control panel, etc). Don't forget to add 4 for the joystick.
- Choose (up to) that many controls from the available button controls described in the user guide.
- Map out (on paper) which physical controller inputs you want to associate with which in-program button controls.

7b) This step is optional, but recommended. Determine and document Fruitbox's button mapping values for each of your game controller inputs. This will allow you to confirm that Fruitbox can see your controller, and that it will accept input from all of your buttons and joystick. Execute the following command:

Code: Select all

sudo ./fruitbox-jessie --test-buttons
This should bring up a graphical interface, which should respond to each of the inputs on your controller by displaying Fruitbox's button mapping values for each.
For example, you may press "Start" on your controller or arcade control panel, and Fruitbox may display something like "JoyButton 0 297". In this example, it is telling you that it recognizes that button as being from controller 0 (controller 1 would denote your second, or "player 2", controller), and it has an internal value of 297. Do this for each button and all four joystick directions, and add them to your paper control mapping document. This will also allow you, in the future, to swap specific button assignments in the button configuration file directly, without having to go through the entire mapping process again (which we will perform next).

To exit from test-buttons mode, hit Ctrl-C on your keyboard.

7c) With all your button configurations planned out, execute the following command from the rpi-fruitbox-master directory:

Code: Select all

sudo ./fruitbox-jessie --config-buttons
Fruitbox will fire up and step through each of the available button controls, and allow you to map them to your physical controller. For each button control which you do not want to map to your controller, hit ESC on your keyboard. Otherwise, hit the button or joystick direction which you want to correspond with each.

If all went well, you now have a new file in your rpi-fruitbox-master directory: fruitbox.btn
Any time you subsequently run fruitbox with the --config-buttons argument, you will overwrite fruitbox.btn.

8) Next order of business is to choose a Skin and perform any necessary tweaks to that skin. This guide is already way too verbose, and Mike's userguide already covers skins in great detail. So we will just proceed with the NumberOne skin. Not all skins have joystick support. NumberOne does, but it is disabled by default (ask me how long it took me to figure that one out). We must enable it. Execute the following commands:

Code: Select all

cd ~/rpi-fruitbox-master/skins/NumberOne/
sudo nano fruitbox.cfg
scroll down to the [joystick] section, and delete the hash tags ("#") in front of the following lines:

Code: Select all

#[joystick]
#Bitmap = joystick.png
Hit Ctrl-x, then y, and Enter to save your changes.

9) Next order of business is to add some MP3s. Given that we are using the NumberOne skin, and we want to give our controller mapping scheme a thorough test, I have the following suggestions.
- Choose pairs of songs from each artist. The NumberOne skin implements the classic jukebox pattern of listing songs from individual artists in pairs (the A-side and B-side of a vinyl 45). You will achieve a full page of songs with no gaps if you choose songs in pairs like this.
- Choose at least 50 songs in total. This will allow you to fill one full page of songs, and test your ability to flip to a second page and back.
- In order to display properly, all chosen MP3s should have proper ID3 tags, containing at least the artist name, album name and song title. Genre may come in handy at some point as well. If you are unfamiliar with ID3 tags for MP3 files, do some Googling. Plenty of info and free ID3 tagging programs out there.
- Use an FTP program such as Core FTP LE to easily transfer MP3s from your PC to the ~/Music/ folder on your Pi.

10) Next order of business is to invoke Fruitbox from the command line, with the proper command line arguments, and test it out and play some music. Execute the following command:

Code: Select all

sudo /home/pi/rpi-fruitbox-master/fruitbox-jessie --cfg /home/pi/rpi-fruitbox-master/skins/NumberOne/fruitbox.cfg
You should now be seeing the Fruitbox logo, and then it will spin through your MP3 files one at a time, producing a database file in your home directory (~/fruitbox.db), and you will end up in a full-screen fully-functional jukebox. Hit your "insert coin" button, navigate to a song with your joystick, and click your "select song" button to play it.

If all went well, you were able to successfully launch Fruitbox, test out all your controls, play songs, and back out of the software back to your Linux command line.
If this is the case, I strongly suggest that you take the time to once again back up your image before proceeding to the INTEGRATION portion of this guide to integrate Fruitbox with Emulationstation.
If this is not the case, and you encountered problems and got stuck, again the folks on this forum are very helpful.

One additional note. In my particular case, Fruitbox did not go to full screen right out of the box. I later came to understand that this was due to a Retropie customization that I had made long ago in my /boot/config.txt file, related to screen resolution. I do not want to go into that here, other than to say, Fruitbox makes every effort to go full screen automatically, so if it fails to do so, it's probably because of some display customizations already present in your image.

...proceed to Part 3 of 3...

Halen78
Posts: 5
Joined: Thu Jan 26, 2017 3:49 am

Re: fruitbox MP3 jukebox

Thu Oct 01, 2020 6:59 pm

PART 3 OF 3

INTEGRATION

This is the part which could potentially screw up your entire RetroPie / EmulationStation setup if not done carefully. You took that backup of your SD card, right?...

Much of what I list below is based on this RetroPie Docs entry:
https://retropie.org.uk/docs/Add-a-New- ... onStation/
It is highly recommended that you read it before proceeding, and refer back to it if you have trouble.

1) Determine whether you already have a copy of es_systems.cfg housed within the /home/pi/.emulationstation folder.

Code: Select all

cd /home/pi/.emulationstation
ls es_systems.cfg
2) IF es_systems.cfg already exists in this folder, take a backup of it, in case you make a mistake and corrupt the current working version.

Code: Select all

sudo cp es_systems.cfg es_systems.BAK
Otherwise, if es_systems.cfg does NOT exist in the /home/pi/.emulationstation folder, copy it there from the /etc/emulationstation/ folder.
Once again, only execute the following command if es_systems.cfg does NOT already exist in the /home/pi/.emulationstation folder.

Code: Select all

sudo cp /etc/emulationstation/es_systems.cfg /home/pi/.emulationstation/es_systems.cfg
3) Manually add a Fruitbox entry in es_systems.cfg. Execute this command:

Code: Select all

sudo nano /home/pi/.emulationstation/es_systems.cfg
With es_systems.cfg opened in the nano editor, notice that each entry begins with the <system> tag, and ends with the </system> tag.
You will not be making changes to any of the existing system entries, but you will be inserting a new entry in-between the existing ones.
Determine where you want your new Fruitbox entry to appear in the system list, and add the following entry there:

Code: Select all

  <system>
    <fullname>Fruitbox</fullname>
    <name>fruitbox</name>
    <path>~/RetroPie/roms/fruitbox</path>
    <extension>.sh .SH</extension>
    <command>bash %ROM%</command>
    <platform>fruitbox</platform>
    <theme>fruitbox</theme>
  </system>
Hit Ctrl-x, then y, and Enter to save your changes.

4) Create a fruitbox rom directory:

Code: Select all

mkdir /home/pi/RetroPie/roms/fruitbox
5) Create your launch script within the Fruitbox rom directory:

Code: Select all

sudo nano /home/pi/RetroPie/roms/fruitbox/fruitbox.sh
and add the following lines to fruitbox.sh...

Code: Select all

cd /home/pi/rpi-fruitbox-master/
sudo ./fruitbox-jessie --cfg /home/pi/rpi-fruitbox-master/skins/NumberOne/fruitbox.cfg
Hit Ctrl-x, then y, and Enter to save your changes.

6) Make your launch script executable:

Code: Select all

sudo chmod +x /home/pi/RetroPie/roms/fruitbox/fruitbox.sh
7) At this point, you should be able to launch Emulationstation. It won't yet be pretty, but it should be functional.
Launch EmulationStation and test it out. Fruitbox should now show up in your main menu.
Select into it, and it should show one "Rom", called Fruitbox. Launch it, and Fruitbox should run and be fully functional.
Test it thoroughly, then exit our of Fruitbox and back into EmulationStation. It should work just like launching a game and then backing out of it.

If you receive any error, you will need to work through it. If you get stuck at THIS point, this forum, https://www.raspberrypi.org/forums is a good resource, but I would not suggest posting to this particular thread. Because the issues will be RetroPie or EmulationStation-centric, not Fruitbox-centric. (Remember, you already got Fruitbox running in the INSTALLATION section)
Review the RetroPie Docs entry that I list above, and if you need to call for backup, https://retropie.org.uk/forum/ is another good resource, as is Reddit.

But if everything does work, CONGRATULATIONS! You can absolutely end the entire process right here.

Beyond this point, there will be less step by step instructions, but rather tips and advice on achieving a consistent look and feel for your new Fruitbox menu item in EmulationStation. If you use the EmulationStation Carbon theme, these tips should apply to you very directly. With any other Theme, you will need to adjust accordingly.

Back out of EmulationStation (Hit F4) to get back into Linux.

Create a Fruitbox entry within the Carbon theme set.

Code: Select all

sudo mkdir /etc/emulationstation/themes/carbon/fruitbox
sudo mkdir /etc/emulationstation/themes/carbon/fruitbox/art
cd /etc/emulationstation/themes/carbon
ls
You should see one folder listed for each of your emulated systems. Choose one of them to use as a template, I use kodi in this example.

Code: Select all

sudo cp /etc/emulationstation/themes/carbon/kodi/theme.xml /etc/emulationstation/themes/carbon/fruitbox/
You now have a consistent theme xml file for Fruitbox, but your "art" folder is empty. And you don't want to use Kodi's artwork for Fruitbox.
What you need is a Fruitbox Logo, and some kind of "controller" graphic. They should be .svg vector files, to achieve the right aesthetic.
I suggest transferring the art files from /etc/emulationstation/themes/carbon/kodi/art to your PC, and viewing them in Inkscape to get an idea of the size and shape of those art files, so you can create something similar for Fruitbox.
The Fruitbox logo should be easy enough to produce, there are free online websites which will convert a raster image to .svg for you.
That would become your new "system.svg" file, to be placed in /etc/emulationstation/themes/carbon/fruitbox/art
Here's another easy option, the text portion of the fruitbox logo can be replicated (somewhat) by using a font called "Magneto".
As for the "controller.svg" file, you have to get creative... some ideas would be a simple line art jukebox, or an album.
Once you have your Fruitbox-themed system.svg and controller.svg files, transfer them to the /etc/emulationstation/themes/carbon/fruitbox/art folder.
Now when you launch EmulationStation, you should see your artwork instead of the plain text "FRUITBOX" on the main menu.

Last item... in the Carbon theme (and most themes) when you click into a menu item to access the roms, each rom has a screenshot and a brief write-up.
You can achieve the same effect with Fruitbox.
Navigate to the /home/pi/.emulationstation/gamelists/fruitbox folder.
If it does not exist, create it.
Copy a single game entry from a gamelist.xml file from one of the other systems under the /home/pi/.emulationstation/gamelists/ folder.
Kodi is a convenient option if you have it, because just like Fruitbox, it will have only a single entry.
My ~/.emulationstation/gamelists/fruitbox/gamelist.xml looks like this:

Code: Select all

<?xml version="1.0"?>
<gameList>
        <game>
                <path>./fruitbox.sh</path>
                <name>fruitbox</name>
                <desc>MP3 Jukebox Software</desc>
                <image>/home/pi/.emulationstation/downloaded_images/fruitbox/fruitbox-image.png</image>
                <playcount></playcount>
                <lastplayed></lastplayed>
        </game>
</gameList>
Create or get your hands on a screen shot of Fruitbox running, and place it in /home/pi/.emulationstation/downloaded_images/fruitbox/fruitbox-image.png

If you enjoy Mike's Fruitbox software as much as I do, consider sending something his way: https://paypal.me/rpifruitbox

Good luck, and enjoy.

damonkirk1983
Posts: 22
Joined: Sun May 03, 2020 11:59 am

Re: fruitbox MP3 jukebox

Fri Oct 02, 2020 3:02 pm

fruitbox wrote:
Sat Aug 08, 2020 9:58 pm
Legtod2 wrote:
Sat Aug 08, 2020 9:54 pm
Just a progress update, I now have fruitbox working with internet streams.

Using m3u files with pointers to radio streaming stations or 80/90 music stations.

I will see if I can post a little youtube of it.
Hey that's great :)
Can you submit a GitHub merge request for any code changes you did?

Cheers
Mike
Did we get this working all properly?
Any chance we can share the coding?
I'd love to add internet streams to mine.

Also where are we at with the v2 and the a-z?
Sorry for asking a few questions, just been tinkering since July and i'm planning on giving my old folks the jukebox for Xmas
Thanks all

Sacramentopaulie
Posts: 7
Joined: Thu Oct 24, 2019 2:34 pm

Re: fruitbox MP3 jukebox

Thu Oct 08, 2020 4:02 am

Wow, I don't purport to know all of the killer RPi projects, but this is a darn good one!

I collect many antiques, and am glad that I just found this cool project.

I will be using the jukebox sooner or later, and hopefully will find a killer old radio to bring into the 21st century! w00t w00t!!!

User avatar
fruitbox
Posts: 497
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Thu Oct 08, 2020 7:03 am

damonkirk1983 wrote:
Fri Oct 02, 2020 3:02 pm
fruitbox wrote:
Sat Aug 08, 2020 9:58 pm
Legtod2 wrote:
Sat Aug 08, 2020 9:54 pm
Just a progress update, I now have fruitbox working with internet streams.

Using m3u files with pointers to radio streaming stations or 80/90 music stations.

I will see if I can post a little youtube of it.
Hey that's great :)
Can you submit a GitHub merge request for any code changes you did?

Cheers
Mike
Did we get this working all properly?
Any chance we can share the coding?
I'd love to add internet streams to mine.

Also where are we at with the v2 and the a-z?
Sorry for asking a few questions, just been tinkering since July and i'm planning on giving my old folks the jukebox for Xmas
Thanks all
I never received the changes for internet radio support. However, v2 implements the audio playback in a slightly different way, so if I do receive the mods they'll probably need changing a bit anyway. As I was so close to getting it working originally I'll keep trying. V2 (with the a-z mods) will be released before Christmas

Cheers
Mike

damonkirk1983
Posts: 22
Joined: Sun May 03, 2020 11:59 am

Re: fruitbox MP3 jukebox

Fri Oct 23, 2020 2:24 pm

Hey Mike hope all is well and Ibet this has taken so much more of your time than you originally thought!

I have a question

Bluetooth - I do not use sudo and the Bluetooth works

Is there a way i can autoboot into Fruitbox without sudo...I auto boot into Fruitbox now but I presume sudo is in the command line i placed a while back....no bluetooth

If I quit and write the line to start Fruitbox without sudo....boom music is going full volume

damonkirk1983
Posts: 22
Joined: Sun May 03, 2020 11:59 am

Re: fruitbox MP3 jukebox

Fri Oct 23, 2020 2:34 pm

Legtod2 wrote:
Sat Aug 08, 2020 9:54 pm
Just a progress update, I now have fruitbox working with internet streams.

Using m3u files with pointers to radio streaming stations or 80/90 music stations.

I will see if I can post a little youtube of it.
Hey Legtod2
I would love if you could share all the code with Mike
Since you posted about getting the internet streams working I've been following this to see if I could get the code to add to my own Fruitbox setup.

Thank in advance

damonkirk1983
Posts: 22
Joined: Sun May 03, 2020 11:59 am

Re: fruitbox MP3 jukebox

Mon Oct 26, 2020 3:23 pm

Anyone have a solution to the below?

1. Bluetooth working?
I auto boot using sudo and no bluetooth, stop it and start again from cmd line and remove sudo - bluetooth works on the Fruitbox app - How do I auto boot into the program without sudo so the bluetooth can work straight away?

bashcr needs the sudo it seems.

2. Anyone have internet streams working? I literally only want to add 2 and cannot find anything on here apart from some guy who says he has it working but has gone dark now and doesn't seem to want to share his success haha

Really hope someone can help me out

Thanks so much in advance

wyovino
Posts: 25
Joined: Wed Aug 28, 2019 3:55 pm

Re: fruitbox MP3 jukebox

Mon Oct 26, 2020 6:07 pm

damonkirk1983 wrote:
Mon Oct 26, 2020 3:23 pm
Anyone have a solution to the below?

1. Bluetooth working?
I auto boot using sudo and no bluetooth, stop it and start again from cmd line and remove sudo - bluetooth works on the Fruitbox app - How do I auto boot into the program without sudo so the bluetooth can work straight away?

bashcr needs the sudo it seems.

I didn't have that problem with sudo, but I found that the quality of the onboard Bluetooth device was terrible. I bought a bluetooth transmitter that plugs into the audio jack and it works great. This was the third Transmitter/Receiver that I tried and this was by far the best.

Taotronics Bluetooth 5.0 Transmitter/Receiver 2 in 1 (About $30 on Amazon)

damonkirk1983
Posts: 22
Joined: Sun May 03, 2020 11:59 am

Re: fruitbox MP3 jukebox

Mon Oct 26, 2020 6:14 pm

wyovino wrote:
Mon Oct 26, 2020 6:07 pm
damonkirk1983 wrote:
Mon Oct 26, 2020 3:23 pm
Anyone have a solution to the below?

1. Bluetooth working?
I auto boot using sudo and no bluetooth, stop it and start again from cmd line and remove sudo - bluetooth works on the Fruitbox app - How do I auto boot into the program without sudo so the bluetooth can work straight away?

bashcr needs the sudo it seems.

I didn't have that problem with sudo, but I found that the quality of the onboard Bluetooth device was terrible. I bought a bluetooth transmitter that plugs into the audio jack and it works great. This was the third Transmitter/Receiver that I tried and this was by far the best.

Taotronics Bluetooth 5.0 Transmitter/Receiver 2 in 1 (About $30 on Amazon)
Thanks for the reply

So I’d go into raspi-config and force audio out to the 3.5mm jack and plug in the Bluetooth receiver?

Thanks again

wyovino
Posts: 25
Joined: Wed Aug 28, 2019 3:55 pm

Re: fruitbox MP3 jukebox

Mon Oct 26, 2020 7:14 pm

Yes, that's what I did. You need a bluetooth transmitter, not receiver. Initially I was trying to use the onboard bluetooth adapter but there was a lot of cracking and poppng. Doing some research I found that this is likely due to interference with the WiFi board. I tried disabling WiFi but that didn't help. The first bluetooth adapter I tried was good sound-wise, but there was no switch to lock it into transmit mode and it frequently switched to receiver mode. The second one I tried was transmitter only, but the sound was terrible. The third one was the charm (Taotronics). It has a physical transmit/Receive switch and can connect two devices at once. Once you connect a device it remembers it and connects very quickly the next time. My fruitbox is now playing through my living room stereo system or my kitchen bluetooth speaker, or both at the same time. I love it.

damonkirk1983
Posts: 22
Joined: Sun May 03, 2020 11:59 am

Re: fruitbox MP3 jukebox

Mon Oct 26, 2020 7:30 pm

wyovino wrote:
Mon Oct 26, 2020 7:14 pm
Yes, that's what I did. You need a bluetooth transmitter, not receiver. Initially I was trying to use the onboard bluetooth adapter but there was a lot of cracking and poppng. Doing some research I found that this is likely due to interference with the WiFi board. I tried disabling WiFi but that didn't help. The first bluetooth adapter I tried was good sound-wise, but there was no switch to lock it into transmit mode and it frequently switched to receiver mode. The second one I tried was transmitter only, but the sound was terrible. The third one was the charm (Taotronics). It has a physical transmit/Receive switch and can connect two devices at once. Once you connect a device it remembers it and connects very quickly the next time. My fruitbox is now playing through my living room stereo system or my kitchen bluetooth speaker, or both at the same time. I love it.
Legend thanks for this

PittStone
Posts: 22
Joined: Mon Apr 23, 2018 6:48 pm

Re: fruitbox MP3 jukebox

Sat Oct 31, 2020 2:34 am

After 2 Years i stuck on a Problem ago. I used a USB Numpad for Controls and Keybinding works Great. But Its only possible to Quit and Power off. A Simple "Restart" Fruitbox is not possible. I need this for change Skins and Albums at Startup. I was Hours of Searching for a key script to start this Program again. But no Luck. Nothing works. Can someone Help me?

wyovino
Posts: 25
Joined: Wed Aug 28, 2019 3:55 pm

Re: fruitbox MP3 jukebox

Sat Oct 31, 2020 11:14 pm

Very easy. You just need to short pins 5 and 6 to boot up the Pi - no coding needed. So add a momentary button connected to those pins and the RPi will boot up when you press the button. You configure it to start Fruitbox on boot.

This is a very good write up of the process:

https://howchoo.com/g/mwnlytk3zmm/how-t ... spberry-pi

If you just want to use a button to start Fruitbox, follow the guide above and see how they implement "Listen for Shutdown" and instead of shutting down, have the script start Fruitbox.

I have Fruitbox start up on booting of the Pi (Read the userguide). I have the Pi mount a USB drive (also in the Userguide) and I put the skin and music on the USB. I have 5 different USBs, each with their own skin and music. To change the skin I shutdown the pi, change the USB, and press the start button. The Pi boots right into Fruitbox and uses the skin that's on the USB.

I'm using a touch screen, so the following won't currently work for me but it would work for you.

Have the RPi boot into the Fruitbox skin changer, using this parameter: --choose-cfg skins.txt. Then select the skin you want.

PittStone
Posts: 22
Joined: Mon Apr 23, 2018 6:48 pm

Re: fruitbox MP3 jukebox

Mon Nov 02, 2020 10:53 pm

wyovino wrote:
Sat Oct 31, 2020 11:14 pm
Very easy. You just need to short pins 5 and 6 to boot up the Pi - no coding needed. So add a momentary button connected to those pins and the RPi will boot up when you press the button. You configure it to start Fruitbox on boot.

This is a very good write up of the process:

https://howchoo.com/g/mwnlytk3zmm/how-t ... spberry-pi

If you just want to use a button to start Fruitbox, follow the guide above and see how they implement "Listen for Shutdown" and instead of shutting down, have the script start Fruitbox.

I have Fruitbox start up on booting of the Pi (Read the userguide). I have the Pi mount a USB drive (also in the Userguide) and I put the skin and music on the USB. I have 5 different USBs, each with their own skin and music. To change the skin I shutdown the pi, change the USB, and press the start button. The Pi boots right into Fruitbox and uses the skin that's on the USB.

I'm using a touch screen, so the following won't currently work for me but it would work for you.

Have the RPi boot into the Fruitbox skin changer, using this parameter: --choose-cfg skins.txt. Then select the skin you want.
Naa, i needed a Solution without any Pins and Buttons for GPIO. My Raspberry Pi is in a Fully Black Aluminium Case now.

http://anidees.com/product/aluminium-pi-2-3-case-black/

I found now a way that works. With only use a USB Numpad.

https://www.amazon.de/gp/product/B07T3P ... UTF8&psc=1

----------------------------------------------------------------------------------

Automatic Start of a Programm after its Closed:

In this example we are going to run a python script every time your Raspberry Pi boots. This script just happens to be used for controlling a robot which does not have a screen or keyboard input so having the control program starting when the Raspberry Pi boots is essential. I have put the script in ‘pi’ users home directory:

/home/pi/fruitstart.sh

systemd uses configuration files, called ‘unit’ files to tell it what to do. Let’s create one for our robot. Open a terminal window and type the following:

sudo nano /lib/systemd/system/driverobot.service


[Unit]
Description=DriveRobot Service
After=multi-user.target

[Service]
Type=idle
User=pi
ExecStart=/bin/bash /home/pi/fruitstart.sh
Restart=always
RestartSec=300ms
[Install]
WantedBy=multi-user.target

Once saved, you need to change the permissions of the unit file with:

sudo chmod 644 /lib/systemd/system/driverobot.service

Which will make it readable by all, and only writable by the owner.

Configuring systemd:

Now that you have created the unit file, you need to make systemd aware of it and enable it so that the driverobot service is started each time the Raspberry Pi boots. Do this with:

sudo systemctl daemon-reload

sudo systemctl enable driverobot.service

After which you may reboot your Raspberry Pi.

sudo reboot

Checking the status of the driverobot service:

Once your Raspberry Pi has finished rebooting, your script should now be running. You can check it with the systemctl command:

sudo systemctl status driverobot.service

Stop it using the following command:

sudo systemctl stop tempMonitor.service

And check again if the script is correctly stopped. Once everything is checked, you can configure your service to start automatically on reboot by using the following command:

sudo systemctl enable tempMonitor.service

From now on, you can check easier the status of the service by doing:

sudo service tempMonitor status/start/stop

--------------------------------------------------------------

Now if i press "ESC" on my Numpad, Fruitbox is closing and restart after 300ms to select a new Skin.

( This is in my fruitstart.sh btw:

#!/bin/bash

cd home/pi/rpi-fruitbox-master

sudo ./fruitbox --choose-cfg albums.txt )

wyovino
Posts: 25
Joined: Wed Aug 28, 2019 3:55 pm

Re: fruitbox MP3 jukebox

Tue Nov 03, 2020 2:57 pm

Rube Goldberg would be proud

fa001
Posts: 97
Joined: Wed Jan 02, 2013 8:25 pm

Re: fruitbox MP3 jukebox

Tue Nov 17, 2020 8:01 pm

I would like to press a button and have fruitbox automatically play random songs until I press another button to stop playing songs. I tried ButtonAuto to start playing songs and ButtonSkip to stop the que. That works but only for a short number of songs. Than it stops.

What am I missing?

User avatar
fruitbox
Posts: 497
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Wed Nov 18, 2020 8:33 am

fa001 wrote:
Tue Nov 17, 2020 8:01 pm
I would like to press a button and have fruitbox automatically play random songs until I press another button to stop playing songs. I tried ButtonAuto to start playing songs and ButtonSkip to stop the que. That works but only for a short number of songs. Than it stops.

What am I missing?
Hi

When you say it only works for a small number of songs, are these songs that are queued up? If so, you can change the playqueue size on the skin file.

Or maybe the no duplicates option is set and it's not letting you play songs that have been recently played before?

Don't forget there is the auto play feature which will play random songs for you, if you don't each to press a key...

Cheers
Mike

damonkirk1983
Posts: 22
Joined: Sun May 03, 2020 11:59 am

Re: fruitbox MP3 jukebox

Wed Nov 18, 2020 1:08 pm

Hey Mike hope all is well, any luck on the internet radio integration? As in how do I get the system to add the names etc to the display page and load the actual stream....

User avatar
fruitbox
Posts: 497
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Wed Nov 18, 2020 1:29 pm

damonkirk1983 wrote:
Wed Nov 18, 2020 1:08 pm
Hey Mike hope all is well, any luck on the internet radio integration? As in how do I get the system to add the names etc to the display page and load the actual stream....
Hi,

Yes I've been working on it the last week or so. Got playback working perfectly now, and am just finishing off the metadata extraction. I had to completely rewrite the driver to use my own handlers as the mpg123 library doesn't support ICY metadata requesting and extraction from url feeds which is where the information is held.

All the changes will be released in v2.

Cheers
Mike

damonkirk1983
Posts: 22
Joined: Sun May 03, 2020 11:59 am

Re: fruitbox MP3 jukebox

Wed Nov 18, 2020 3:30 pm

fruitbox wrote:
Wed Nov 18, 2020 1:29 pm
damonkirk1983 wrote:
Wed Nov 18, 2020 1:08 pm
Hey Mike hope all is well, any luck on the internet radio integration? As in how do I get the system to add the names etc to the display page and load the actual stream....
Hi,

Yes I've been working on it the last week or so. Got playback working perfectly now, and am just finishing off the metadata extraction. I had to completely rewrite the driver to use my own handlers as the mpg123 library doesn't support ICY metadata requesting and extraction from url feeds which is where the information is held.

All the changes will be released in v2.

Cheers
Mike
Amazing! Unbelievable really!

When is V2 haha and will it be a simple sudo get style download or will it be that plus I need to re-write what i've done to all the touchscreen version i.e. Adding in the power off button and the hidden escape button?

User avatar
fruitbox
Posts: 497
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Wed Nov 18, 2020 3:39 pm

damonkirk1983 wrote:
Wed Nov 18, 2020 3:30 pm

Amazing! Unbelievable really!

When is V2 haha and will it be a simple sudo get style download or will it be that plus I need to re-write what i've done to all the touchscreen version i.e. Adding in the power off button and the hidden escape button?
Hopefully ready for Christmas...

Unfortunately the skins will need tweaking to work with v2. I tried to avoid this, but in the end decided it would be better to offer an improved, essier to use fruitbox than to offer backwards compatibility. I will mod all the existing skins to accompany the v2 release, but if you've designed your own then you'll need to do the mods. I'll also publish a checklist of changes to help you. If you want, you could always email your skin to me and I'll mod it for you (I've done quite a few now!)

Cheers
Mike

damonkirk1983
Posts: 22
Joined: Sun May 03, 2020 11:59 am

Re: fruitbox MP3 jukebox

Wed Nov 18, 2020 3:52 pm

fruitbox wrote:
Wed Nov 18, 2020 3:39 pm
damonkirk1983 wrote:
Wed Nov 18, 2020 3:30 pm

Amazing! Unbelievable really!

When is V2 haha and will it be a simple sudo get style download or will it be that plus I need to re-write what i've done to all the touchscreen version i.e. Adding in the power off button and the hidden escape button?
Hopefully ready for Christmas...

Unfortunately the skins will need tweaking to work with v2. I tried to avoid this, but in the end decided it would be better to offer an improved, essier to use fruitbox than to offer backwards compatibility. I will mod all the existing skins to accompany the v2 release, but if you've designed your own then you'll need to do the mods. I'll also publish a checklist of changes to help you. If you want, you could always email your skin to me and I'll mod it for you (I've done quite a few now!)

Cheers
Mike
Tell me what I need to send you and I will do that - otherwise my folks will never get this as an Xmas present!!

Noticed I am getting 10 songs show up as Untitled with the artists also showing that and when I click one it quits fruitbox and shows me the message

libpng warning:ICCP known incorrect sRGB profile

Any idea what that could be?

Thanks

User avatar
fruitbox
Posts: 497
Joined: Mon Feb 22, 2016 7:35 pm
Location: UK

Re: fruitbox MP3 jukebox

Wed Nov 18, 2020 4:05 pm

damonkirk1983 wrote:
Wed Nov 18, 2020 3:52 pm
fruitbox wrote:
Wed Nov 18, 2020 3:39 pm
damonkirk1983 wrote:
Wed Nov 18, 2020 3:30 pm

Amazing! Unbelievable really!

When is V2 haha and will it be a simple sudo get style download or will it be that plus I need to re-write what i've done to all the touchscreen version i.e. Adding in the power off button and the hidden escape button?
Hopefully ready for Christmas...

Unfortunately the skins will need tweaking to work with v2. I tried to avoid this, but in the end decided it would be better to offer an improved, essier to use fruitbox than to offer backwards compatibility. I will mod all the existing skins to accompany the v2 release, but if you've designed your own then you'll need to do the mods. I'll also publish a checklist of changes to help you. If you want, you could always email your skin to me and I'll mod it for you (I've done quite a few now!)

Cheers
Mike
Tell me what I need to send you and I will do that - otherwise my folks will never get this as an Xmas present!!

Noticed I am getting 10 songs show up as Untitled with the artists also showing that and when I click one it quits fruitbox and shows me the message

libpng warning:ICCP known incorrect sRGB profile

Any idea what that could be?

Thanks
Zip up all the files in that particular skins' directory, then email it to the fruitbox email. If song and artist names show up as unknown (presuming this is file playback?) then there's no tag metadata in the mp3 file...use something like mp3tag for windows to add it. No idea why it's quittng, though. The warning you're getting is fairly harmless...it's just whinging about a graphic file format. Perhaps email me the fruitbox.log file too?

Mike

Return to “Graphics, sound and multimedia”