I used a Raspberry Pi to re-invent my old 1960’s wall box as a controller for my wireless home media system (SONOS). It looks wonderful in my kitchen with its chrome and warm lights. Everyone loves dropping in a quarter, seeing the credits light up, and hearing it clunk and whirr as it selects a song.
The RPi is housed inside the wall box and runs a program that polls the GPIO for pulses from the wallbox. It decodes the pulses into a song selection and using UPnP protocols over my home wi-fi, adds the song to the SONOS queue.
This site explains how I did this and should tell you everything you need to know to build your own. I have gone into lots of detail into the design for those that are interested, however the final design is very simple, requiring only 4 components soldered onto a stripboard. The software I have written will work for all wall boxes with some minor tweaking.