README

Path: README
Last Update: Tue Jun 27 16:32:23 PDT 2006

OSAMP

The Open Sonos Music Player lets you stream music to an Airport Express, and controll that stream through a web client.

Hardware you’ll need:

  • A computer running linux (I used Fedora Core 4)
  • Nokia 770 (or some other web tablet)
  • An Airport Express

Software (all installed on the linux server):

After you’ve installed all of those packages, you’ll need to install a few gems.

  • rails
  • id3lib-ruby
  • mysql
  • rake
  • net-mdns

To install these, just execute the following as root:

  # gem install rake rails id3lib-ruby mysql net-mdns -y

Once you’ve got all that installed, create your sonos development database, and tables like this:

  $ mysql -h localhost -u root -e 'create database sonos_development' -p
  Enter password:
  $ cd sonos
  $ rake migrate

After you execute ‘rake migrate’, a bunch of messages will scroll by indicating that the tables are being created. Once your database is created, you’ll need to populate it with your mp3’s. Do this by entering the bin directory and executing ‘populate_db.rb’ and pointing it to your mp3 collection.

  $ cd bin
  $ ruby populate_db.rb /home/aaron/mp3

Once you database is populated, you can start up the server. There are two main parts to the Open Sonos Player. The back end script that interacts with raop-play, and the rails app with provides the front end to the web client. When a song is selected on the front end, it sends a message to the back end to play the song. Start the back end by going in to the ‘bin’ directory and executing the ‘aexplay.rb’ script:

  $ ruby bin/aexplay.rb /usr/local/bin/raop_play logfile.log &

aexplay.rb will auto-detect the Airport Express that is on the network (via Bonjour), and stream to the first one it finds, so make sure your Airport Express is plugged in and working before you execute this script. Now start up your rails app:

  $ ruby script/server

Once the rails app is up and running, you should be able to navigate to the rails app ( localhost:3000/music ) and control your Airport Express. Just open the url to your rails app on the Nokia 770, and you should be done!

Known Bugs

This is the first release, so I expect many more bugs to come!

  • The last few seconds of the song playing get cut off. This is a problem with raop_play. I’ve tried contacting the author, but he hasn’t responded. I will continue to work on the issue.
  • It doesn’t support multiple Airport Expresses. OSAMP actually does support multiple AE’s, there is just no UI for it. Patches are gladly accepted!
  • No playlists! Once again, there is no UI. Patches are gladly accepted.

[Validate]