Go to file
2020-09-20 21:11:13 +02:00
fonts Feat: import from https://github.com/rusconi/TFT-MoodeCoverArt/ 2020-09-20 20:32:58 +02:00
images Feat: import from https://github.com/rusconi/TFT-MoodeCoverArt/ 2020-09-20 20:32:58 +02:00
pics Feat: import from https://github.com/rusconi/TFT-MoodeCoverArt/ 2020-09-20 20:32:58 +02:00
.gitattributes Feat: import from https://github.com/rusconi/TFT-MoodeCoverArt/ 2020-09-20 20:32:58 +02:00
.gitignore Feat: import from https://github.com/rusconi/TFT-MoodeCoverArt/ 2020-09-20 20:32:58 +02:00
clear_display.py Feat: import from https://github.com/rusconi/TFT-MoodeCoverArt/ 2020-09-20 20:32:58 +02:00
config.yml Feat: import from https://github.com/rusconi/TFT-MoodeCoverArt/ 2020-09-20 20:32:58 +02:00
install_service.sh Fix: remove user pi reference 2020-09-20 21:11:13 +02:00
README.md Feat: import from https://github.com/rusconi/TFT-MoodeCoverArt/ 2020-09-20 20:32:58 +02:00
remove_service.sh Feat: import from https://github.com/rusconi/TFT-MoodeCoverArt/ 2020-09-20 20:32:58 +02:00
tft_moode_coverart.py Feat: fix encoding 2020-09-20 21:00:46 +02:00
tft_moode_coverart.sh Fix: remove user pi reference 2020-09-20 21:11:13 +02:00
tft-moodecoverart.service Fix: remove user pi reference 2020-09-20 21:11:13 +02:00

TFT-MoodeCoverArt

version = "0.0.5" : changes

  • radio icons location changed

version = "0.0.4" : changes

  • added option to display cover art only without overlays (see config file for instructions)

version = "0.0.3" : changes

  • added option to turn off backlight when mpd state = stop (see config file for instructions)

Based on the look of the pirate audio plugin for mopidy.

Works with Pimoroni pirate audio boards with 240*240 TFT (ST7789), as well as standalone ST7789 boards.

Sample Image

Features.

The script will display cover art (where available) for the moode library or radio stations.

  • For the moode library, embedded art will be displayed first, then folder or cover images if there is no embedded art.
  • For radio stations, the moode images are used.
  • If no artwork is found a default image is displayed.

Metadata displayed:

  • Artist
  • Album/Radio Station
  • Title

Overlays with a Time bar, Volume bar and Play/Pause, Next and Volume icons to match the Pirate Audio buttons are optional.

There is also an option in config.yml to not display metadata

The script has a built in test to see if the mpd service is running. This should allow enough delay when used as a service. If a running mpd service is not found after around 30 seconds the script displays the following and stops.

   MPD not Active!
Ensure MPD is running
 Then restart script

Limitations

Metadata will only be displayed for Radio Stations and the Library.

For the Airplay, Spotify, Bluetooth, Squeezelite and Dac Input renderers, different backgrounds will display.

The overlay colours adjust for light and dark artwork, but can be hard to read with some artwork.

The script does not search online for artwork

Assumptions.

You can SSH into your RPI, enter commands at the shell prompt, and use the nano editor.

Your moode installation works and produces audio

If your pirate audio board doesn't output anything

Choose "Pimoroni pHAT DAC" or "HiFiBerry DAC" in moode audio config

See the Installation section here about gpio pin 25.

Preparation.

Enable SPI pn your RPI

see Configuring SPI

Install these pre-requisites:

sudo apt-get update
sudo apt-get install python3-rpi.gpio python3-spidev python3-pip python3-pil python3-numpy
sudo pip3 install mediafile
sudo pip3 install pyyaml

Install the TFT driver.

I have forked the Pimoroni driver and modified it to work with other ST7789 boards. Install it with the following command:

sudo pip3 install RPI-ST7789

Ensure 'Metadata file' is turned on in Moode System Configuration

Install the TFT-MoodeCoverArt script

cd /home/pi
git clone https://github.com/rusconi/TFT-MoodeCoverArt.git

Config File

The default config should work with Pirate Audio boards

The config.yml file can be edited to:

  • suit different ST7789 boards
  • set overlay display options

The comments in 'config.yml' should be self explanatory

Make the shell scripts executable:

chmod 777 *.sh

Test the script:

python3 /home/pi/TFT-MoodeCoverArt/tft_moode_coverart.py


Ctrl-c to quit

If the script works, you may want to start the display at boot:

Install as a service.

cd /home/pi/TFT-MoodeCoverArt
./install_service.sh

Follow the prompts.

If you wish to remove the script as a service:

cd /home/pi/TFT-MoodeCoverArt
./remove_service.sh