A touch screen (Adafruit PiTFT 3.5") Sonos controller for Raspberry Pi. Runs in a docker container.
This controller relies upon the SoCo library for communicating with Sonos speakers and the pygame library for the UI.
The sonos-pi-controller includes the following features:
- Familiar interface similar to the official Sonos controller
- Stays synced with all your other Sonos controllers.
- View album art, track name, artist, album
- Select room (top right icon)
- Group rooms (bottom right icon)
- Select/deselect all rooms (top right party icon)
- Select music from music library (top left icon)
- Artists
- Albums
- Genres
- Playlists (Imported Playlists)
- Favorites (ex. items added to 'My Sonos')
- Play & Pause
- Next & Previous Track
- Adjust volume (including grouped rooms)
- Mute and unmute
- Automatic backlight shutoff after period of inactivity
- Ability to view song queue, select a song in queue & adjust playback mode (normal, shuffle, repeat)
- Replace select room icon with a queue icon
- Room selection will be available via tapping on room name.
- Raspberry Pi 3B or armv7 compatible version
- Good starter kit if you have nothing, although it would be cheaper to buy what you need separately
- Adafruit PiTFT Plus 3.5" Touch Screen
- Optional: Case for mounting to the wall
- Flash your Raspberry Pi with the latest Raspbian Lite (right now it's stretch)
- Login to your Pi via ssh and install docker, docker-compose, and git.
- Here is a very helpful guide if you need help.
- Attach your touchscreen to the Pi, reboot, and run the installer script from Adafruit to setup your touchscreen.
- Choose 0 degrees (portrait) for orientation
- Choose PiTFT as text console.
- My personal settings in
/boot/config.txt
gpu_mem=16 # --- added by adafruit-pitft-helper Tue 30 Oct 10:12:27 MDT 2018 --- dtparam=spi=on dtparam=i2c1=on dtparam=i2c_arm=on dtoverlay=pitft35-resistive,rotate=0,speed=32000000,fps=60 # --- end adafruit-pitft-helper Tue 30 Oct 10:12:27 MDT 2018 ---
- Build base Dockerfile image with pygame, pip, and SDL 1.2 support
docker build -t villarrealized/debian-pygame-base -f Dockerfile.base .
- Build main Dockerfile image with
docker-compose build
- Copy
sample.env
to.env
and adjustBACKLIGHT_TIMEOUT
to your preference. Default is 30 seconds. - Run
docker-compose up -d
and enjoy your Raspberry Pi Sonos Controller!
If you have any issues getting started, please reach out and I will try to help.
If your touchscreen is not calibrated correctly, try running the calibration program:
sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_calibrate