For our purposes, this guide might assume:
- Raspberry Pi Model 3 B running Raspbian
buster
- AirPlay receiver (
shairport-sync
) and MQTT broker (mosquitto
) running on same Raspberry Pi as the helper utilities.
Install system python dependencies and clone this repo. See REQUIREMENTS Quickstart
See wiki for additional pointers.
We rely on python3's built-in venv
module for python library dependencies.
The album art manipulation will be handled by PIL (Python Imaging Library) Pillow.
# useful for having PIL in REPL in system python3
sudo apt install python3-pillow
cd ~/projects/shairport-sync-mqtt-display
cd python-flaschen-taschen
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Copy the example config file (config.example.yaml
) to a new file and customize.
cp config.example.yaml config.secrets.yaml
$EDITOR config.secrets.yaml # $EDITOR would be nano, vi, etc.
For the topic
, I use something like shairport-sync/SS_HOSTNAME
topic
needs to match themqtt.topic
string in your/etc/shairport-sync.conf
fileSS_HOSTNAME
is name of server whereshairport-sync
is running- Note, there is no leading slash ('
/
') in thetopic
string
Install and use the libraries used in Adafruit tutorial for Adafruit RGB Matrix + Real Time Clock HAT.
Borrowing from the tutorial:
mkdir -p ~/projects/rgb-matrix
cd ~/projects/rgb-matrix
curl https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/rgb-matrix.sh >rgb-matrix.sh
sudo bash rgb-matrix.sh
Respond to the prompts. A reboot may be needed when complete. This will clone the hzeller/rpi-rgb-led-matrix
repo from GitHub.
Run a demo (assuming your Pi + HAT + LED Matrix are powered and hooked up correctly)
cd ~/projects/rgb-matrix
cd rpi-rgb-led-matrix/examples-api-use
sudo ./demo -D0 --led-rows=32 --led-cols=32 --led-slowdown-gpio=2 --led-brightness=50
If all goes well, an animated rotating square will be depicted on the LED panel.
The flaschen-taschen
project is a client/server system for managing LED matrix display output.
cd ~/projects/rgb-matrix
git clone --recursive https://github.com/hzeller/flaschen-taschen.git
cd flaschen-taschen
works great with iTerm2 - macOS Terminal Replacement.
$ cd ~/projects/rgb-matrix/flaschen-taschen/server
$ make FT_BACKEND=terminal
$ ./ft-server -D32x32 --hd-terminal
UDP-server: ready to listen on 1337
$ cd ~/projects/rgb-matrix/flaschen-taschen/server
$ make FT_BACKEND=rgb-matrix
# sudo ./ft-server --led-gpio-mapping=adafruit-hat --led-slowdown-gpio=2 --led-rows=32 --led-cols=32 --led-show-refresh --led-brightness=50
FIXME:
This is command line examples, demo apps, and finally the app found here (it acts as a client).
FIXME:
There's a systemd
service file at /etc/shairport-sync_rgb-matrix-server.service
in this git repository.
There's a systemd
service file at /etc/shairport-sync_rgb-matrix-client.service
in this git repository.
If you get an error like
socket.gaierror: [Errno -2] Name or service not known
you should add the mqtt broker host that you are using to /etc/hosts
on the computer that is running this client app. For example, an entry like:
192.168.1.42 mqtthostname