I'm trying to create a 'one touch' system for a disabled user to play a Spotify playlist - the Raspberry Pi seems an ideal candidate for this project.


  • User can only hit a plastic switch (like this Buddy Button);
  • I'd ideally like this switch connected to an IR remote (optional);
  • Pi receives IR signal, or direct GPIO connection and plays Spotify playlist;
  • Switch gets hit again, Spotify stops.

Multiple questions:

  • What might be an ideal distro for this? Should I use an existing Modipy based one or would I be stuck on trying to hack an existing program?
  • Are there any IR remote options to trigger scripts for the RPi?
  • How would I begin to script the IR or GPIO input to control Spotify?

2 Answers 2


This is not something that I actually did so far but proposing it nonetheless. As I discussed it just the other day for some other purposes: nodeMCU, ParticleIO, or something similar could save the day.

Set up the Pi with mopidy on any out-of-the-box distro you happen to like. Instead of fixing the Pi up with some IR receiver - and assuming there's a Wifi up that the Pi is connected to - use the nodeMCU to connect to mopidy via the Wifi. Again I did not do this so I am just guessing here. All it should take is some small Lua script to remotely toggle play on the Pi using mopidy's http or mpd extensions. Benefit of the Wifi solution over IR is that it would not need to be directed at the IR receiver.

There is even a related project listed on Wikipedia that features exactly what you ask for: "The Button is design for single-purpose, internet-enabled functions. When the button is pressed, a connection is made to a web server which will perform the desired task."

  • Glad to help. Feel free to share your knowlegde if you work it out that way :)
    – Ghanima
    Oct 21, 2015 at 17:44
  1. I believe that you can run spotify web client on raspbian as well, so no need to go for custom os unless very necessary or you need those features.

  2. & 3. I'm sure there're plenty of IR options for RPi available online with python scripts. (like this one : http://www.instructables.com/id/Add-Infrared-Interface-to-Your-Raspberry-Pi/)

Btw, It would be really nice to implement start / stop with the help of gestures, like flutter app. :) Just a thought.

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.