Volumio x86 + PeppyMeter

Part 5

Autostart PeppyMeter when a song is played

If you don’t want a picture slideshow to start when Peppy is not running adjust the code acordingly.

  1. To schedule PeppyMeter to run as a screen saver only when a song is played follow these steps
  • Create a script and change its permissions to execute with sudo chmod 777 /home/volumio/PeppyMeter/screensaver.sh and insert this code:

sleep 60
export HOME=/home/volumio/PeppyMeter
export DISPLAY=:0

while true; do

    if volumio status | grep -q ': "play",'; then

         # Playing
         cd /home/volumio/PeppyMeter
         python3 ./volumio_peppymeter.py


     # Stopped

           if ! pgrep -x "feh" >/dev/null; then
                  pidof python3 && pkill python3
    sleep 11s

  1. Create a system unit file with sudo nano /lib/systemd/system/screensaver.service and enter the following code:
Description=My Shell Script


  1. Enable the new service with
    • sudo systemctl daemon-reload
    • sudo systemctl enable screensaver.service
  2. Start the service to test
    • sudo systemctl start screensaver.service
  3. Check the status every 30 secs
    • sudo systemctl status screensaver.service
  4. If everything works reboot and test to see if the service is running using the status command above.

NOTE: The application feh is probably not installed so you’ll have to install it by running sudo apt-get install feh

This is all I got. It works fine for me however peppy once in a while will crash and you’ll need to reboot volumio. Can’t ask for too much for free.

Enjoy. I hope it works for everyone. I’ll try to answer questions as much as I can.

Also, for the ones with wide touch screens that need to rotate from portrait, which is default, to landscape and have the touch follow the rotation, below is a fix I posted on another thread. It’s specific to x86 which has very little support and hard to find info on.

There should be an area on these forums for x86 support only. I never understood why people go for pi when x86 hardware has so much more options, power and features at a lot lower price. I’m using a Dell wyse 3040 for my setup. You can get it for $50 and is the size of a pi.

1 Like

I have a few of them left, pre-installed, see the Dell Wyse 3040 post.

At the moment, the automatic startup is working correctly, thank you @dromichet !
I’m still stuck with the wide profile which won’t display track info.
As some custom formats are included, i chose one (custom_6) which correctly reports the data.
I modified config.txt according to my screen resolution and the image is completed with black strips on the right and under the plugin image.
There is no customization in configfileparser.txt for this profile, so i suppose it can’t be stretched.
I don’t catch why the wide profile won’t work.

What is your screen resolution? You’ll have to modify that file to match your screen otherwise you’ll get the bars. Are you using small, medium, large or wide?

none of them, i use custom_6 which is provided in the “plugin” archive.
If i choose wide or large, i have no info displayed.
It’s 2:00 AM here, i’ll have to go for a nap :wink:

I was just trying to catch from where configfileparser.py is called when it tests the value of meter_size:

    elif meter_size == WIDE:
        self.meter_config[SCREEN_INFO][WIDTH] = WIDE_WIDTH
        self.meter_config[SCREEN_INFO][HEIGHT] = WIDE_HEIGHT

with this initialization:
WIDE = “wide”

I added the same for custom_6 but i don’t know which value is passed and where from:

CUSTOM6 = “custom_6 (1280x720)”


    elif meter_size == CUSTOM6:
        self.meter_config[SCREEN_INFO][WIDTH] = CUSTOM6_WIDTH
        self.meter_config[SCREEN_INFO][HEIGHT] = CUSTOM6_HEIGHT

custom_6 (1280x720) is the original name of the profile which i’m testing.

I wouldn’t go that far to change these. Just rename custom_6 (1280x720) to large. Then open the file configfileparser.py and under LARGE_WIDTH and _HEIGHT change it to your screen resolution. PeppyMeter looks for folders named small, medium, large and wide. That’s all you need to do. Don’t mess around with other settings in that file as it might break other things.

1 Like

Ah ah ah what an efficient idea, it was too late for me to have it thanks!
Will give it a try.
But as any of the stock profiles currently won’t raise data, i fear it will be the same. I will have to find out what differs.

With the instructions provided by dromichet, I’ve tried to make this a bit easier for those that are not that familiar with Linux.
I’ve let the Spotify part out, as this is still in beta and we’re not looking for additional problems.
This is done on a clean install (V3.396, Factory reset) to make sure we’re not running into orphaned issues

Step 1:
Install needed packages:

sudo apt update
sudo apt-get -y install binutils build-essential python3-pip python3-pil python3-pygame xinput
sudo python3 -m pip install cairosvg socketIO-client
sudo python3 -m pip install --upgrade pip setuptools wheel

Step 2:
Install Peppy meter:

cd ~
wget https://community.volumio.org/uploads/short-url/bUZ6KlbUuyCPgvwLmsLytLhUzw.zip
miniunzip bUZ6KlbUuyCPgvwLmsLytLhUzw.zip -d ./
rm bUZ6KlbUuyCPgvwLmsLytLhUzw.zip
cd Install_peppy
chmod 755 *.sh
sudo ./install_peppyalsa.sh
sudo ./install_PeppyMeter.sh
sudo reboot

Step 3:
Modify settings:

sudo chmod 646 /tmp/myfifo
sudo cp /tmp/shairport-sync.conf /home/volumio/PeppyMeter/shairport-sync.conf
sudo chown -R volumio:volumio /home/volumio/PeppyMeter
sed -i 's/output_device = "volumio";/output_device = "peppyalsa";/g' /home/volumio/PeppyMeter/shairport-sync.conf
sudo sed -i 's/\/tmp\/shairport-sync.conf/\/home\/volumio\/PeppyMeter\/shairport-sync.conf/g' /lib/systemd/system/shairport-sync.service
sudo systemctl stop shairport-sync
sudo systemctl daemon-reload && sudo systemctl start shairport-sync
sudo reboot

Step 4:
Create bash script
cd /home/volumio/PeppyMeter

Copy this complete block in the terminal:

cat << EOF > screensaver.sh

sleep 10
export HOME=/home/volumio/PeppyMeter
export DISPLAY=:0

while true; do

if volumio status | grep -q ': "play",'; then

     # Playing
     cd /home/volumio/PeppyMeter
     python3 volumio_peppymeter.py


 # Stopped

       if ! pgrep -x "feh" >/dev/null; then
              pidof python3 && pkill python3
sleep 11s

chmod 775 screensaver.sh

Create the startup service:
cd /lib/systemd/system/

Copy this complete block in the terminal:

sudo cat << EOF > screensaver.service
Description=My Shell Script


sudo chmod 644 /lib/systemd/system/screensaver.service
sudo systemctl daemon-reload
sudo systemctl enable screensaver.service && sudo systemctl start screensaver.service

sudo reboot

tested with a Dell Inspiron 3180:

To do:
See if we can make it into a plugin :smile:


I gave it a try, but it seems something is cached somewhere, the gui stillr eflects i’m using “custom_6” profile, and of course, the screen still won’t stresh.
I decided to stop trying the “plugin” version and will proceed as Wheathen has summaried from your instruction (from scratch).
Let’s see if it behaves better.

So, i restarted from scratch and installed manually following @Wheaten process.
Meters are working, but no information raising either with wide or large selection.
Anyway, the installation process is really easy and fluent with this set of instructions.

i believe if i can’t make it work, i will simply generate the vu meter in another framebuffer and move it down-right to integrate over the main frame buffer loaded with Manifest interface.

I finally created a new “custom” directory in which i imported files from the custom_6 (1280x720) i had backed up.
Choosing “custom” as meter.size displays meters and information.
So I still don’t catch what happens with the stock profiles.
Anyway, the custom images won’t fit my screen, so i conclude it’s not stretchable and that i’ll need to convert the backgrounds and others pics to my weird resolution of 1366x768 and modify some files to change coordinates of needles.
Am i right?

test_1366x768.zip (234.7 KB)

Yes your right. But your lucky, I’ve created one for testing my instructions. (Just a rough draft)
None of the stock templates have volumio integrated, so that’s why there is no data.

Thank you @Wheaten, i gave it a try:

  • replaced black_white block in meters.txt by the block in your meters.txt
  • moved all image files into my custom directory
  • renamed black_white_bgr.jpg to black-white-bgr.jpg
  • had an error executing and realized config.txt was case sensitive, and replaced “black_white” by “Black_White”

And i must conclude this is f#~{{[’ good job :slight_smile:

  • perfect screen matching,
  • Large vu meter on top,
  • jacket bottom left, with song title, band name, album name one below the other, justified left.
  • remaining play time bottom right, and just below, file format, samplerate and bit depth.

PS: needles are a bit too long! let me try to post a picture

just a bit :smiley:

you can fine tune it, it was just a rough draft. just resize the needle :slight_smile:

how do you proceed? some coordinates to modify or simply the picture to shrink in an image editor?

Just increase the Y values to 500 or so , that will lower the needles.
left.origin.y = 450
right.origin.y = 450

Thank you, I will test it.
Comparing your images files to the other black_white theme i had, i start to catch how it is built.