The Raspberry Pi I bought a few days ago has just arrived. I was looking to existing Raspberry Pi projects to get some ideas on what use I could give to this board. One of the coolest projects I found out there was one that uses SiriProxy and WiringPi to open a garage door.
I thought that while deciding what to do with my Raspberry Pi I could start using it as a media center and let Siri control my multimedia apps.
Thanks to D-Bus talking to Linux apps is extremely easy. So I wrote a very simple SiriProxy plugin that controls the Rhythmbox music player using D-Bus and created a pull request in case upstream is interested in having more sample plugins.
I don’t speak Ruby so probably that won’t be the nicest Ruby code you will ever see (to say the least 🙂 )
To use the plugin just clone the master-rhythmbox branch from my SiriProxy fork on Github and follow the SiriProxy’s README set-up instructions.
Keep in mind that there is a known issue on SiriProxy master and you have to apply the fix found on this pull request.
The last two steps are to install ruby-dbus using Gems and change your .siriproxy/config.yml configuration file to include the Rhythmbox plugin.
$ sudo gem install ruby-dbus $ echo -e " - name: 'Rhythmbox'\n path: './plugins/siriproxy-rhythmbox'" >> ~/.siriproxy/config.yml
That’s all, now you can run siriproxy server and Siri can start playing your favorite songs!
The voice commands currently supported are:
start player: starts the Rhythmbox media player
play, pause, stop, next and previous: to start, pause, stop, go to next and previous track.
shuffle on: turn shuffle mode on
shuffle off: turn shuffle mode off
volume up: turn volume up by 20%
volume down: turn volume down 20%