Meet @nmstereo - our social office stereo 'bot, responsible for crowd-sourcing what gets played on our office stereo, with help from Twitter, Spotify and generous sprinklings of pixie dust!
Note, this is how we've set things up, but other setups are doubtless possible. I.e. it should be possible to setup everything up on a single Raspberry Pi running Mopidy (see Roadmap, below).
-
A suitably named Twitter account, such as @nmstereo.
-
A (preferably) Linux server running:
Python 2.6+
RabbitMQ (other AMQP implementations should also work, but aren't tested)
virtualenv (optional, but recommended)
pip (optional, but recommended)
-
An OS X box running:
-
A copy of the source code, checked out on both the Linux server and the OS X box.
- Create a new virtualenv, activate it, and install the requirements listed in requirements.txt:
$ virtualenv --no-site-packages ENV $ source ENV/bin/activate $ pip install requirements.txt
- Grant "Read, Write and Direct Messages" permissions to your designated Twitter account.
- Make a settings.py, and edit the settings to match your own environment.
- Run the receiver, decoder and broadcaster, either using the example Upstart .conf files or directly, i.e.:
$ userstream_receiver.py & $ decoder.py & $ broadcaster.py &
- Create a new virtualenv, activate it, and install the requirements listed in requirements.txt:
$ virtualenv --no-site-packages ENV $ source ENV/bin/activate $ pip install requirements.txt
- Make a settings.py, and edit the settings to match your own environment.
- Run the stereo client either using the example LaunchAgent .plist file or directly, i.e.:
$ stereo.py &
- Invite your friends to "Get their hits out"! :)
- Frictionless deployment on Linux and OS X.
- Compatibility with Raspberry Pi.
- Compatibility with Mopidy.
- Integration with Spotify's AppleScript library.
For more info, contact:
- devden [at] nixonmcinnes.co.uk