[PLUGIN] MPD OLED - installation & configuration plugin

Ah good news! Have you tried pressing the I2C scan button That will show you if your screen is connected properly :+1:t4:

Sad, but I couldn’t make alive the second SPI display too. Segmentation fault error appears. Tried different GPIOs instead of 25 & 24, different volumios. Both Pi’s are 3 B, not plus. It’s strange.

There might be an issue with mpd_oled, you should raise an issue with the developer here: GitHub - antiprism/mpd_oled: MPD, Volumio, RuneAudio and Moode OLED status and spectrum display for Raspberry Pi (and similar)

He should be able to look at the issue. I’ve seen something similar, but I only wrote the plugin.

Unfortunately, the SPI setting doesn’t work for me either.
“Segmentation fault” error message.

Hi @Don_Frenk

Raise an issue with the mpd_oled project on GitHub. I don’t maintain this code - I only wrote volumio plugin/front end for it. The developer should be able to look the issue for you :slight_smile:

Cheers
Mase

Hi

The issue may be that mpd_oled isn’t being run with root privileges. I installed the plugin and see the error for an SPI OLED. If I run the mpd_oled binary directly without sudo I get the same error. If I run it with sudo it runs correctly.

Test if this is the issue by running, from the Volumio home directory (-o 7 for SH1106 SPI OLED)

sudo mpd_oled/mpd_oled -o 7

On the other hand, I2C displays will probably run without root privileges.

Adrian

Hi @Adrii

Yes, you’re right, I’m not running the mpd_oled using sudo. This is because when I tried to use sudo I get an error message. I2C works fine without sudo. Arse :frowning: I’m not sure how to fix this…

volumio volumio[18801]: info: [MPD_OLED Plugin] Starting mpd_oled: /usr/bin/sudo /home/volumio/mpd_oled/mpd_oled  -o 1 -b 16 -g 1 -f 15 -s 8,5 -C 0 -P p -B 1 -r 25 -D 24 -S 0 -d
volumio sudo[20737]: pam_unix(sudo:auth): conversation failed
volumio sudo[20737]: pam_unix(sudo:auth): auth could not identify password for [volumio]
volumio volumio[18801]: error: [MPD_OLED Plugin] mpd_oled failed and returned: sudo: no tty present and no askpass program specified

@Abagian @Don_Frenk I think I have fixed the issue!

You might wanna update the plugin and give this a test :open_mouth:

The fix was to change the way I was calling sudo I’m not sure why piping volumio into works out it did echo volumio | \bin\suid -S <path to program>

Instructions are earlier in the post.

Thanks @Adrii I did encounter this error before but thought it was to do with not having the screen, but in actual fact it was because of not running with root privilages. You must be bored of me by now!

Thank you for your work!
For me, the SPI setting works great with the fresh plugin.

1 Like

Hi Adrii
I just have one question. Your display software is very super, thanks for that.
The sampling frequency of the musical material is an important data. A lot of devices display this. Couldn’t the sampling frequency be displayed instead of the clock during playback? Volumio also displays this.
Can this be solved with software? That would be High-End :slight_smile:

Hi Don_Frenk

The sample rate and bit depth are available for audio files (but not a radio stream I tried), and I have made a note of your request to display them.

For now, the bitrate (top right of spectrum) might be useful as a playback quality indicator (I notice that a FLAC file with a saple rate of 44.1 and a bit depth of 16 plays with a higher bitrate than an MP3 file with a sample rate of 44.1 and a bit depth of 24).

Adrian.

Thanks for the reply. I am also very happy with this solution. I am now planning to build a Streamer for myself and your work will give this a very useful and beautiful look.

1 Like

Awesome! Glad SPI is all working fine now! :sunglasses:

Hi Adrian,
I installed mpd_oled on Moode and their I modified main.cpp and display.cpp to show only the spectrum and bits when playing. Here I installed it from source, went in Home/volumio/src to edit main and dispaly files like i did in Moode, but it did not change anything.
After modif, I rebooted the system, not sure if there is anything else to do like in Moode.
Or is there another place were the files are?

Did you build mpd_oled?
Did you download the plugin last night? I made some changes to it and you might need to run cp mpd_oled /usr/local/bin/mpd_oled from the mpd_oled directory to copy the program to the bin folder.

Hi, do you mean rebuilt?
I install following the the method , it’s working fine, but like I said I then, modified main and display.cpp, but nothing changed.
I reran

sudo mpd_oled_service_install
but didn’t change anything.
Should I rerun anything?

ok will run the cp…

@supercrab does not work
image

Have you installed my plugin or are you trying to run mpd_oled by itself?

You don’t need to install the service if you have the plugin because it will just start the program by itself. Also, if you follow those instructions you don’t need to use the cp command because I think it does it anyway.

@supercrab I didn’t install the plugin, I installed from source (see the link above).
Can the plugin modify what’s on the screen? any settings?
I want to show only the spectrum when playing, I did it in Moode, seems not to be able here.