Install peppy meter in volumio

Hello dear friends,
I would Like to install peppymeter on volumio and to display the vumeter on the dsi 4.3 inch display.
I have installed the python 3 and then I have imported pygame and I have receive no errors.
Now I want to installl peppyalsa plugin but after to take all the steps the library libpepoyalsa.so is not available in /usr/local/lib.
Any help is realy appreciated.
Maybe that help. When I execute. /configure & & make


Thanks for your support.

The error is saying to use ‘-std=c99’, but I can’t see the end of the message (copy and pasting the screen text is better than a screenshot). In which case, try

CFLAGS=-std=c99 ./configure
make

Adrian.

Hello Adrian ,

The command worked , I had also to create some folders manually . Now I have the error on make
please find the make output :slight_smile:
sudo make depbase=echo src/meter.lo | sed ‘s|[^/]*$|.deps/&|;s|.lo$||’;\ /bin/bash ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"pimeter\" -DPACKAGE_TARNAME=\"pimeter\" -DPACKAGE_VERSION=\"0.44\" -DPACKAGE_STRING=\"pimeter\ 0.44\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pimeter\" -DVERSION=\"0.44\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBASOUND=1 -DHAVE_LIBFFTW3=1 -DHAVE_LIBM=1 -I. -g -O2 -W -Wall -std=c99 -MT src/meter.lo -MD -MP -MF $depbase.Tpo -c -o src/meter.lo src/meter.c &&\ mv -f $depbase.Tpo $depbase.Plo libtool: compile: gcc -DPACKAGE_NAME=\"pimeter\" -DPACKAGE_TARNAME=\"pimeter\" -DPACKAGE_VERSION=\"0.44\" "-DPACKAGE_STRING=\"pimeter 0.44\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"pimeter\" -DVERSION=\"0.44\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBASOUND=1 -DHAVE_LIBFFTW3=1 -DHAVE_LIBM=1 -I. -g -O2 -W -Wall -std=c99 -MT src/meter.lo -MD -MP -MF src/.deps/meter.Tpo -c src/meter.c -fPIC -DPIC -o src/.libs/meter.o src/meter.c: In function 'init': src/meter.c:89:19: error: storage size of 'disconnect_action' isn't known struct sigaction disconnect_action; ^ src/meter.c:92:2: warning: implicit declaration of function 'sigaction' [-Wimplicit-function-declaration] sigaction(SIGPIPE, &disconnect_action, NULL); ^ src/meter.c:89:19: warning: unused variable 'disconnect_action' [-Wunused-variable] struct sigaction disconnect_action; ^ src/meter.c:88:58: warning: unused parameter 'p' [-Wunused-parameter] static int init(const char *name, int max, int show, int p) { ^ src/meter.c: In function 'update': src/meter.c:107:85: warning: unused parameter 'level' [-Wunused-parameter] static void update(int meter_level_l, int meter_level_r, snd_pcm_scope_peppyalsa_t *level) { ^ Makefile:445: recipe for target 'src/meter.lo' failed make: *** [src/meter.lo] Error 1

Many thanks .

You could try [the first command may need to be sudo make clean, as you have run sudo make, if you run into permission problems then delete the directory and start again, running configure as below]

make clean
CFLAGS=-std=gnu99 ./configure
make

But if that doesn’t work then I recommend contacting the project developer.

Adrian.

Hi Adrian,

It worked.
10 year ago I used to use Linux in VMware machine, dual booting, compile kernels etc but I completely forget because I have changed the area…

I am bother you with one last error I want to compile the peppy alsa and I have the same errors:
gcc peppyalsa-client.c -o peppyalsa-client peppyalsa-client.c: In function 'print_vu_meter_ch': peppyalsa-client.c:52:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode for(int n=0; n < size; n++) { ^ peppyalsa-client.c:52:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code peppyalsa-client.c: In function 'main': peppyalsa-client.c:102:5: error: 'for' loop initial declarations are only allowed in C99 or C11 mode for(int m=0; m < words; m++) {
^

Done. I have compiled with option from you gcc… GNU 99 etc and it worked :slight_smile:

Thanks

Hello ,
Since I do not want to poluete other threads , I will post here request for help me .
I have installed peppymeter , configure peppyalsa and if I run

Blockquote
aplay -D peppyalsa /usr/share/asounds/alsa/Front_Left.wav

the pepymeter is working OK.
The only issues that I have are when configure peppyalsa in mpd.conf . Even if I have sounds in speakers the pepymeter needle are not moving :frowning: .
My DAC is an USB one . I use plughw 5, 0

1. aplay -l

Blockquote
volumio@volumio:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 4/4
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
Subdevices: 3/3
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
card 5: E30 [E30], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
volumio@volumio:~$

2.mpd.conf from /etc/

Blockquote
volumio@volumio:~$ cat /etc/mpd.conf

# Volumio MPD Configuration File

# Files and directories #######################################################
music_directory         "/var/lib/mpd/music"
playlist_directory              "/var/lib/mpd/playlists"
db_file                 "/var/lib/mpd/tag_cache"
log_file                        "/var/log/mpd.log"
#pid_file                       "/var/run/mpd/pid"
#state_file                     "/var/lib/mpd/state"
#sticker_file                   "/var/lib/mpd/sticker.sql"
###############################################################################

# General music daemon options ################################################
user                            "mpd"
group                          "audio"
bind_to_address         "any"
#port                           "6600"
#log_level                      "default"
gapless_mp3_playback                    "no"
#save_absolute_paths_in_playlists       "no"
#metadata_to_use        "artist,album,title,track,name,genre,date,composer,performer,disc"
auto_update    "yes"
#auto_update_depth "3"
###############################################################################
# Symbolic link behavior ######################################################
follow_outside_symlinks "yes"
follow_inside_symlinks          "yes"
###############################################################################
# Input #######################################################################
#
input {
        plugin "curl"
#       proxy "proxy.isp.com:8080"
#       proxy_user "user"
#       proxy_password "password"
}
###############################################################################

# Decoder ################################################################





###############################################################################

# Audio Output ################################################################

resampler {
                plugin "soxr"
                quality "high"
                threads "1"
}

audio_output {
                type            "alsa"
                name            "peppyalsa"
                device          "peppyalsa"
                dop                     "no"

}

audio_output {
    type            "fifo"
    enabled         "no"
    name            "multiroom"
    path            "/tmp/snapfifo"
    format          "44100:16:2"
}

3. asound.conf from /etc

Blockquote

volumio@volumio:~$ cat /etc/asound.conf

pcm.!default {
        type plug
        slave.pcm "softvol_and_peppyalsa"
}
ctl.!default {
        type plughw
        card 5
}
pcm.peppyalsa {
        type meter
        slave.pcm "plughw:5,0"
        scopes.0 peppyalsa
}
pcm.softvol_and_peppyalsa {
        type softvol
        slave.pcm "peppyalsa"
        control {
                name "PCM"
                card 5
        }
}
pcm_scope.peppyalsa {
        type peppyalsa
        decay_ms 400
        meter "/home/volumio/myfifo"
        meter_max 100
        meter_show 0
        spectrum "/home/pi/myfifosa"
        spectrum_max 100
        spectrum_size 30
}
pcm_scope_type.peppyalsa {
        lib /usr/local/lib/libpeppyalsa.so
}
  1. .asoundrc from /home/volumio

Blockquote
volumio@volumio:~$ cat .asoundrc

pcm.!default {
        type plug
        slave.pcm "softvol_and_peppyalsa"
}
ctl.!default {
        type plughw
        card 5
}
pcm.peppyalsa {
        type meter
        slave.pcm "plughw:5,0"
        scopes.0 peppyalsa
}
pcm.softvol_and_peppyalsa {
        type softvol
        slave.pcm "peppyalsa"
        control {
                name "PCM"
                card 5
        }
}
pcm_scope.peppyalsa {
        type peppyalsa
        decay_ms 400
        meter "/home/volumio/myfifo"
        meter_max 100
        meter_show 0
        spectrum "/home/pi/myfifosa"
        spectrum_max 100
        spectrum_size 30
}
pcm_scope_type.peppyalsa {
        lib /usr/local/lib/libpeppyalsa.so
}
pcm.dsp0 peppyalsa

Thanks for you help

Try to use hw instead of plughw:

pcm.peppyalsa {
        type meter
        slave.pcm "hw:5,0"
        scopes.0 peppyalsa
}

Hello peppy.player ,

I have tried with your config :

asound.conf from /etc/

Blockquote
volumio@volumio:~/PeppyMeter$ cat /etc/asound.conf
pcm.!default {
type plug
slave.pcm “softvol_and_peppyalsa”
}
ctl.!default {
type hw
card 5
}
pcm.peppyalsa {
type meter
slave.pcm “hw:5,0”
scopes.0 peppyalsa
}
pcm.softvol_and_peppyalsa {
type softvol
slave.pcm “peppyalsa”
control {
name “PCM”
card 5
}
}
pcm_scope.peppyalsa {
type peppyalsa
decay_ms 400
meter “/home/volumio/myfifo”
meter_max 100
meter_show 0
spectrum “/home/pi/myfifosa”
spectrum_max 100
spectrum_size 30
}
pcm_scope_type.peppyalsa {
lib /usr/local/lib/libpeppyalsa.so
}
pcm.dsp0 peppyalsa

.asoundrc from /home/volumio/

Blockquote
volumio@volumio:~$ cat .asoundrc
pcm.!default {
type plug
slave.pcm “softvol_and_peppyalsa”
}
ctl.!default {
type hw
card 5
}
pcm.peppyalsa {
type meter
slave.pcm “hw:5,0”
scopes.0 peppyalsa
}
pcm.softvol_and_peppyalsa {
type softvol
slave.pcm “peppyalsa”
control {
name “PCM”
card 5
}
}
pcm_scope.peppyalsa {
type peppyalsa
decay_ms 400
meter “/home/volumio/myfifo”
meter_max 100
meter_show 0
spectrum “/home/pi/myfifosa”
spectrum_max 100
spectrum_size 30
}
pcm_scope_type.peppyalsa {
lib /usr/local/lib/libpeppyalsa.so
}
pcm.dsp0 peppyalsa

But now If i execute :

Blockquote
volumio@volumio:~/PeppyMeter$ aplay -D peppyalsa /usr/share/sounds/alsa/Front_Left.wav
Playing WAVE ‘/usr/share/sounds/alsa/Front_Left.wav’ : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1233: Sample format non available
Available formats:

S32_LE
SPECIAL
I guess I will dream these files :slight_smile: . I am opn to try more configration.

Later edit
A user from another forum came with the ideea that maybe fifo from /home/volumio is not accessible for mpd process.
Another plugin that I use mpd_oled : wjo uses fifo for spectrum analyzer on an oled 1.3 inch

> Blockquote

  • Configure copy of audio*
    The MPD audio output needs to be copied to a named pipe, where Cava can read it and calculate the spectrum. This should be configured in /etc/mpd.conf, but changes to this file will be overwritten by Volumio. Instead, edit the mpd.conf template file

* *sudo nano /volumio/app/plugins/music_service/mpd/mpd.conf.tmpl* *

And add the following lines at the end

```
audio_output {

  •    type            "fifo"*
    
  •    name            "mpd_oled_FIFO"*
    
  •    path            "/tmp/mpd_oled_fifo"*
    
  •    format          "44100:16:2"*
    

}
```

After editing the file it is important to force Volumio to regenerate mpd.conf and restart MPD. To do this, open the Web UI and go to Settings > Playback Options then click on Save in the Audio Output section.

Maybe in the end the fifo from /home/volumio is not accesible to mpd process . If this is the issue how can be accessible ?

Thanks

Hello,
Just a small update.
@ofiras how did you make it worked : did you you same config as in peppy Wiki page or you

`The difference is access permissions. Your alsa process runs under the mpd user, yet the fifos are in home dirs of other users. How about trying to configure them into a directory which all users can access, e.g. /tmp, would it help?’

Thanks for your continuous support.

Hi all,
I got make it work.
It was a problem of integration fifo with mpd process
I have configured fifo in tmp folder and give 755 access.
I want to thanks to all persons who helped me.

Now remains to fix the issue of hanging thy meter picture when killing the peppymeter process. The volumio UI does not appear…

Regards

Hello,

With gvolt help also the abive topic is ok.
But I have observed that I can not play music from my local NAS. Qobuz, webradio is working ok.
What could be the reason?
Thanks

Hello,
I am having problems similar to yours.
I have a series of questions to ask you …
-How have you solved the issue of python versions? Volumio comes with 2.7 and when doing an upgrade version 3 is installed. I get it to compile, if I don’t update anything.
-Could you put a copy of the files involved here? I have some doubt about the final modifications. asoundrc, mpd.conf and any other related files.
-Why is a copy of asoundrc necessary in /etc and with another name? Isn’t it more practical to have just one file and make a symbolic link? I understand that they have the same content …
Thank you! I’ve been here for many hours!

Hi,
First install python3 by sudo apt get install python3 then install pygame. The fallow the steps from top of this topic as told by Adrian in installing peppyalsa plugin.
After this installed we can go to configure peppymeter and changed the fifo location

thanks! I will keep trying

Hi ,

in the end I used cifs for mount the server
I have some dsd files as topping e30. It used to work but now on dac display I see 705. 6 pcm instead of 5.6 dsd.

In mpd.conf I have this :slight_smile:

Blockquote
audio_output {
type “alsa”
name “peppyalsa”
device “peppyalsa”
dop “no”

Thanks

Impossible. I’ve been trying all afternoon and I can’t.
Could you put a copy of the files involved here?
/home/volumio/.asoundrc
/etc/mpd.conf
/etc/asound.conf
/volumio/app/plugins/music_service/mpd/mpd.conf.tmpl

Thanks!

Hi
/home/volumio/.asoundrc

Blockquote
volumio@volumio:~$ cat /home/volumio/.asoundrc
pcm.!default {
type plug
slave.pcm “softvol_and_peppyalsa”
}
ctl.!default {
type hw
card 5
}
pcm.peppyalsa {
type meter
slave.pcm “plughw:5,0”
scopes.0 peppyalsa
}
pcm.softvol_and_peppyalsa {
type softvol
slave.pcm “peppyalsa”
control {
name “PCM”
card 5
}
}
pcm_scope.peppyalsa {
type peppyalsa
decay_ms 400
meter “/tmp/myfifo”
meter_max 100
meter_show 0
spectrum “/home/pi/myfifosa”
spectrum_max 100
spectrum_size 30
}
pcm_scope_type.peppyalsa {
lib /usr/local/lib/libpeppyalsa.so
}
pcm.dsp0 peppyalsa

/etc/asound.conf same as .asoundrc
after you create mkfifo myfifo in /tmp give it also permission 755 with chmod command

/etc/mpd.conf

here I change only that lines:

Blockquote
resampler {
plugin “soxr”
quality “high”
threads “1”
}
audio_output {
type “alsa”
name “peppyalsa”
device “peppyalsa”
dop “no”
}

mpd.conf.tmpl

Blockquote
audio_output {
type “alsa”
name “peppyalsa”
device “peppyalsa”
dop “${dop}”
${mixer}
${format}
${special_settings}

Thank you!
Why do you have spectrum "/home/pi/myfifosa” in /home/volumio/.asoundrc?
Shouldn’t it be /tmp/myfifosa?
How do you check that it works fine (before installing peppymeter)? With ./peppyalsa-client?

I do not use myfifosa , I use a DSI display ,

BY modifying the mpd.conf for peppyalsa the DSD files will not be played at full DSD , I revert back to original values in mpd conf and DSD files are OK now

I understand. I was commenting on it for testing peppyalsa before installing ppepymeter. I also have a DSI display.
I will install Peppymeter and test.
Thanks again