was successfully added to your cart.

The ‘JukeJack’ is a project of mine to create a ‘Diplomatic Jukebox’. Me and my mates used to choose which bars to drink in when we were younger based on the quality content of their jukeboxes. My favourite was the Old Ale House in Truro that had all the Led Zeppelin albums on!

These JukeBoxes are now long gone and were briefly replaced by the ‘web connected’ jukeboxes but they too have now disappeared. Our local The Ship Inn in Porthleven can often be seen passing round an Ipad for punters to select their favourite tunes on Spotify.

I thought this could be improved by using a web app on your phone with the added functionality of other people in the pub ‘upvoting’ or ‘knocking off’ tunes from the playlist, therefor creating a ‘peoples playlist’

Following some research i found the best way to do this is use a raspberry PI as a web server running Mopidy an extensible music server written in Python. Mopidy plays music from local disk, Spotify, SoundCloud, Google Play Music, and more and you can edit the playlist from any phone, tablet, or computer using a range of MPD and web clients.

The next addition would be to add functionality for users to be able to ‘tweet’ the song to the venue using this  Twitter API libary https://github.com/lfcipriani/tweet-jukebox i have tested this and it works well but just needs some refinement. This adds great marketing value to venues using the app too.

To summarise –

  1. The venue would have a web connected PI with the software installed and a pro audio hat such as this https://www.hifiberry.com/products/dacplus/ connected to an amplifier.
  2. The customer connects to the ‘JukeJack’ network. The customer then tweets to the venues twitter account what song they would like played. The venue then tweets back to the customer that their track will be played after X amount of songs.
  3. To be worked out..Other customers can ‘upvote’ or ‘downvote’ the upcoming track. I think this functionality will have to operate independently from the twitter API

 

Below is the process of installment i will update this with a finished prototype very soon

Part 1

  1. SD Card adapter for micro SD card I didn’t have one so had to use this method
  2. https://www.stewright.me/2013/05/install-and-run-raspbian-from-a-usb-flash-drive/
  3. https://docs.mopidy.com/en/latest/installation/raspberrypi/
  4. Download the latest Jessie or Jessie Lite disk image from http://www.raspberrypi.org/downloads/raspbian/.
  5. Install the image to your SD card using these instructions https://www.raspberrypi.org/documentation/installation/installing-images/windows.md
  6. Install mopidy using these instructions
  7. https://docs.mopidy.com/en/latest/installation/debian/#debian-install
  8. Check mopidy works by typing ‘pi@raspberrypi:~ $ mopidy’
  9. http://raspberry-at-home.com/mopidy-spotify-client/
  10. Install sudo apt-get install mopidy-spotify https://github.com/mopidy/mopidy-spotify  Edit config file to include your Spotify Premium Log In
  11. Config file here sudo nano /home/pi/.config/mopidy/mopidy.conf
  12. [spotify]username = ***************password = ***************enabled = truebitrate = 320timeout = 10cache_dir = $XDG_CACHE_DIR/mopidy/spotify
  13. JUKEJACK 1.0 – Issues, Roadmap

 

Part 2

 

  1. Changing hostname for Mopidy.

 

To change the hostname for Mopidy, we need to change the parameter hostname to 0.0.0.0

and uncomment the lines that are in the config file which you can see now. They are under http block.

 

  1. Opening Firewall in Raspberry PI if available.

 

If Iptables is blocking, we need run :

sudo iptables -A INPUT -p tcp -m tcp –dport 6680 -j ACCEPT

sudo /etc/init.d/iptables save

 

  1. Configuring Router with DDNS.

 

Here, we used Noip.com for DDNS service. We first created account on noip.com then we created a new domain. As our router supported Noip.com as DDNS service built-in , we could easily apply the DDNS service and connect our router with Noip.

 

Then, we need to add the required port 6680 and open it so that the port will be available through the internet. Now, we should be able to access Mopify from local network (http://RPI’s IP address:6680/mopify/ ) and also from the internet (http://alecsraspberry.hopto.org:6680/mopify/).

 

To run mopidy, you need to run :
$ screen mopidy –config ~/.config/mopidy/mopidy.conf
And tweet-jukebox :
$ screen node ~/workspace/tweet-jukebox/init.js

Install history

1  wget -q -O – https://apt.mopidy.com/mopidy.gpg | sudo apt-key add –

2  sudo wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/wheezy.list

3  sudo apt-get update

4  sudo apt-get install mopidy

5  mopidy

6  htop

7  history

8  sudo apt-get install mopidy-soundcloud mopidy-youtube mopidy-spotify

9  cat /etc/*-release

10  sudo apt-get install htop

11  htop

12  df -0h

13  df -h

14  wget http://node-arm.herokuapp.com/node_latest_armhf.deb

15  sudo dpkg -i node_latest_armhf.deb

16  ls /etc/sources.d

17  ls /etc/apt/sources.list

18  ls /etc/apt/sources.list.d/

19  node -v

20  npm -v

21  npm –version

22  cat /etc/apt/sources.list

23  sudo apt-get pureg node-*

24  sudo apt-get purge node-*

25  sudo apt-get install nodered

26  sudo apt-get update

27  sudo pkill -9 dpkg

28  sudo pkill -9 apt-get

29  sudo apt-get update

30  sudo apt-get purge nodejs

31  ls

32  sudo dpkg -i no

33  sudo dpkg -i node_latest_armhf.deb

34  npm -v

35  node -v

36  wget https://github.com/lfcipriani/tweet-jukebox/archive/master.zip

37  unzip master.zip

38  cd tweet-jukebox-master/

39  ls

40  cd

41  mkdir workspace

42  mv tweet-jukebox-master/ workspace/

43  cd workspace/

44  cd tweet-jukebox-master/

45  cd ../

46  mv tweet-jukebox-master tweet-jukebox

47  node /home/pi/workspace/tweet-jukebox/init.js

48  cd tweet-jukebox/

49  nano config.sample.js

50  history

51  cat config.sample.js

52  w

53  history

54  w

55  htop

56  nano config.sample.js

57  cd workspace/

58  ls

59  cd tweet-jukebox/

60  nano config.sample.js

61  mv config.sample.js confg.js

62  ls

63  node init.

64  node init.js

65  cat mod

66  mv confg.js config.js

67  node init.js

68  nano config.js

69  node init.js

70  ls

71  sudo bash gpio_config.sh

72  sudo apt-get install gpio-admin

73  sudo npm install pi-gpio

74  sudo bash gpio_config.sh

75  ls

76  cd ../

77  sudo bash gpio_config.sh

78  sudo npm install pi-gpio

79  cd tweet-jukebox/

80  sudo bash gpio_config.sh

81  which gpio-admin

82  gpio-admin

83  git clone git://github.com/quick2wire/quick2wire-gpio-admin.git

84  cd quick2wire-gpio-admin

85  make

86  sudo make install

87  sudo adduser $USER gpio

88  npm install pi-gpio

89  cd ../

90  sudo bash gpio_config.sh

91  htop

92  bash gpio_config.sh

93  cat /proc/cpuinfo

94  cat /proc/meminfo

95  node init.js

96  nano config.js

97  node init.js

98  npm install

99  ls

100  ls node_modules/

101  rm node_modules/ -rf

102  htop

103  pkill -9 vnc

104  sudo pkill -9 vnc

105  htop

106  sudo pkill -9 test

107  htop

108  npm install

109  sudo node init.js

110  cat package.json

111  npm install

112  sudo node init.js

113  ls

114  mopidy

115  ls

116  tweet-jukebox

117  mopidy&

118  ode init.js

119  node init.js

120  screen

121  sudo apt-get install screen

122  screen

123  history

 

To be continued…..

Leave a Reply