This repo keeps notes about changes needed to run PeppyMeter on Volumio.
Welcome community collaborations.
- Keep track of all changes needed to have PeppyMeter running on the HW described below.
- Make changes needed to my PeppyMeter fork.
- Create pull requests to the PeppyMeter root.
TBD
- Raspberry Pi
- Raspberry Pi official 7" touch screen
- Burn and install Volumio, tested version:
volumio-2.853-2020-11-20-pi - Install and enable
Touch Displayplugin. - Enable SSH by going to
volmio.local/dev - SSH to
volumio@volumio.local, password is the same as the login. - Install the packages needed:
apt-get install python3 python3-pygame kbd cron vim- Note 1:
kbdis the package foropenvtthat runs the PeppyMeter script. - Note 2:
vimis optional. - Note 3:
cronis the package for running PeppyMeter automatically after reboot (see "Run the meters" section below for details.)
- Note 1:
- Check out the source repos:
git clone https://github.com/project-owner/peppyalsa
git clone https://github.com/ocean1598/PeppyMeter
git clone https://github.com/ocean1598/PeppyMeter4Volumio.doc
- Follow steps to install Peppy ALSA driver: https://github.com/project-owner/peppyalsa.doc/wiki
(Note all credits to the original PeppyMeter repo https://github.com/project-owner/PeppyMeter,
and https://github.com/project-owner/PeppyMeter.doc/wiki has all the details.)
Use the files in this repo:
- copy /etc/asound.conf
- update /etc/mpd.conf
- update /volumio/app/plugins/music_service/mpd/mpd.conf.tmpl Note The following configurations are for the headphone. Others need to change accordingly.
- config.txt
- change
screen.size = large - change
pipe.name = /tmp/myfifo - chagne the SDL section as below
- change
[sdl.env]
framebuffer.device = /dev/fb0
mouse.device = /dev/input/event0
mouse.driver = TSLIB
video.driver = directfb
video.display = :0
- peppymeter.py => remove DOUBLEBUF
self.util.PYGAME_SCREEN = pygame.display.set_mode((screen_w, screen_h))
cd ~/PeppyMeterpatch -t < ~/PeppyMeter4Volumio.doc/patch002.diff(If you check out the upstream, usepatch001.diffinstead.)
Any method to reboot.
Once it's setup, the meter will automatically show up once the music starts playing by mpd.
-
Check out this project
git clone https://github.com/ocean1598/PeppyMeter4Volumio.doc -
Copy the shell scripts to
/home/volumio/PeppyMeter. -
sudo crontab -eto an entry that runs every minute:* * * * * /home/volumio/PeppyMeter/peppy_cron.shThis script first simply checks if mpd has created
/tmp/myfifo, if not, exits. Then it checks if there is already a PeppyMeter instance running, if yes, exits. Then it'll start the PeppyMeter; meanwhile PeppyMeter has a signleton check to make sure there is only one instance running.
- After reboot, play some music.
- Double check if
/tmp/myfifoexists, if not, create it:mkfifo /tmp/myfifothen reboot again. - Go to
/home/volumio/PeppyMeterfolder sudo openvt -s python3 peppymeter.py
The Volumio UI is on virtual terminal #2. The PeppyMeter UI is on #4, where #3 is used for PeppyMeter text output.
Hence one can flip the display among them by using chvt command.
There is no need to stop the PeppyMeter process.
The only caveat is that switching back to PeppyMeter UI doesn't show the full meter, just the moving needle.
It seems the background image got wiped out. Therefore, unless the meter redraws itself after something,
the only way to get the full meter back is when "random" is choosen and the next meter shows up.
- switch to Vulmio UI:
sudo chvt 2 - switch to PeppyMeter UI:
sudo chvt 4 - switch to PeppyMeter text output:
sudo chvt 3
NOTE fconsole can report which console is currently active on the LCD display
- kill the meter:
stop_peppy.shorsudo kill -9 $(ps aux | grep peppymeter | grep root | awk '{ print $2 }')