Restore the functionality of a jukebox.
Hide a Raspberry Pi with WiFi dongle and external speakers in the ample guts of the Jukebox.
Using a web interface you can select which song to play.
Connect to the selection switches (via an arduino?) to allow songs to be selected the old fashined way.
Add and amplifier and reuse the original speakers.
Stage 1 is based on a Raspberry Pi with a standard Raspian image.
You need the sox package with all the supported formats to play the audio files, as well as a few utilities:
sudo apt-get install libsox-fmt-all sox screen markdown html2ps
and a web-server:
sudo apt-get install apache2
Yes, I know apache is overkill, but I'm familiar with it ...
Probaly git too (see below):
sudo apt-get install git
Clone this repo into ~/GIT/junkebox:
mkdir ~/GIT
cd ~/GIT
git clone https://github.com/sprinkmeier/jukebox.git
Install the CGI script:
cd ~/GIT/jukebox
sudo cp --update --verbose ./jukebox.cgi /usr/lib/cgi-bin/
sudo ln --symbolic /dev/shm/songs.csv /var/jukebox/
and override the 'welcome' page to redirect to it:
sudo cp --update --verbose index.html /var/www/index.html
Someplace to store the audio files:
sudo mkdir /var/jukebox/
sudo chown www-data.www-data /var/jukebox/
sudo ln --symbolic --force /var/jukebox/ /var/www/
The link allows you to download files.
Edit the auto-start file:
sudo vi /etc/rc.local
To include the following:
screen -d -m su - pi -c '/home/pi/GIT/jukebox/jukebox.py'