[PLUGIN] MPD OLED - installation & configuration plugin

Hi everyone,

Here’s a plugin that finally provides an easy way to install and configure the popular mpd_oled project! The mpd_oled application drives an OLED screen and displays Volumio status information and a real time spectrum analyser. It also allows you to scan the I2C busses to help find your screen’s address and displays it in a modal dialog - this must be a first for Volumio?

You can now fully customise your screen without any typing!

Stable on: RPi3 and Pi 0.

Supported languages are:

  • English
  • Slovakian
  • Spanish

If you are able to kindly help with translation to other languages, then here is the file to translate: https://github.com/supercrab/volumio-plugins/blob/master/plugins/miscellanea/mpd_oled/i18n/strings_en.json

You can find more information and instructions here:

https://github.com/supercrab/volumio-plugins/tree/master/plugins/miscellanea/mpd_oled

You can report issues here and any suggestions are welcome.

Thanks to Adrian who wrote mpd_oled and has helped me with the Spanish translation and installation scripts.

If you have any suggestions or bug reports for mpd_oled then please raise an issue on the project page: https://github.com/antiprism/mpd_oled

Cheers
Mase

10 Likes

Nice Work!!! :wink:

1 Like

Well, they say that timing is everything…

Just yesterday I went through all the steps to install mpd_oled onto my RPi2 based Volumio unit and got everything to run. Then this morning I see your post with a plugin! I like the idea of a plugin and not having to muck with command line arguments, so …

Not sure what would happen if I tried following your instructions, so I tried it. Overall, it worked, but I do have three small items to report and a question:

  1. During the install - at the very end - there’s a status line just above the last jumble of data that says: “Status :MPD OLED Successfully Installed, Do you want to enable the plugin now?”. I wasn’t sure if you were expecting a “y” or not. I waited for a minute before I typed anything, but did put in a y and . I never got a new command line prompt after that. I waited several minutes before doing anything else, wondering if there was some additional processing going on.

When I checked the webapp, I found that the plugin was installed, but not activated. I activated it, then set the display type to what I have (#3), and the display immediately came to life!

I eventually hit Ctrl-C to stop the install script and removed the temporary directory and zip file.

  1. In looking at and playing around with the configuration settings, I was happy to find that there was a setting for the clock format. I immediately tried the “12hr no leading 0” setting and saved and the display went off. All of the other three options worked fine, but this last one did not seem to.

  2. I ran the I2C Device Scan test and it properly reported my display as a “3c”. But it didn’t show the HiFi Berry DAC+ device which also lives on the I2C bus. Should it have?

Here’s my question that I haven’t been able to find elsewhere. There are three items above the time in the normal ‘play’ display. On your image they are “192” (mine shows 206), a small bar graph and two arrows. What do these icons represent?

All in all, great work! Anyone who’s gone through the manual installation for mpd_oled can safely - I think - run your install.

I especially liked the ability to change the ‘pause’ screen type as I had been wondering - since yesterday - how to enable that.

Rick

1 Like

Oh, one additional thing. This maybe a capability not in the original mpd_oled code…

When the ‘stop’ display is on, it shows the IP address of the Volumio, the time and the date. The date format is DD-MM-YYYY. Is there a possibility to change the date format to MM-DD-YYYY? And, if it’s in the original mpd_oled code, can this be added as a configuration choice on the plugin?

Rick

Hello
Thanks for this great plugin.
Until now when I had an issue or found a bug in mpd oled I have postit in mpd oled section from Adrian , now I shouod place it here?
Thanks

1 Like

That was great timing indeed! Thanks very much for taking the time to test it - I’m so glad it worked and that you liked it!

Issues:

  1. I think this is down to the volumio plugin install command. I can’t change this BUT with when a few more tests of the plugin I’ll do a pull request so that it becomes part of Volumio and people won’t have to do the manual install like you did. I have no idea why it does this but you were right to Ctrl + C out of it.
  2. Valid error - sorted!
  3. Will look into this, can’t see anything obvious at the mo. I would be grateful if you could run i2cdetect -y 1 and paste the results in here or a screenshot.
  4. The dots on the top right corners I think are to do with your network connection and the little triangle to the left is volume :slight_smile:
  5. The date format is not configurable in mpd_oled at the moment. If you raise this an issue on the mpd_oled project page then the chances are Adrian will implement and I can update the plugin.

Happy you found it useful! Adrian did all the hard work writing mpd_oled in the first place. This is just the icing on the cake :slight_smile:

When I fix your I2C issue, you’ll be able to use these commands to update your plugin:

wget https://github.com/supercrab/volumio-plugins/raw/master/plugins/miscellanea/mpd_oled/mpd_oled.zip
mkdir ./mop
miniunzip mpd_oled.zip -d ./mop
cd ./mop
volumio plugin refresh && volumio vrestart
cd ..
rm -Rf mop
rm -Rf mpd_oled.zip

Cheers
Mase

Hi

Glad you liked it! Please post any issues you have with mpd_oled to Adrian on his project page at https://github.com/antiprism/mpd_oled

Thanks
Mase

Hey! Thanks! :smiley:

1.With this plugin we can change also the I2C adress?
2. In the past I have found some issue that has been solved by adding an argument at the end of mpd oled command in mpd_oled.services. I guess if I install the plugin I need to add it manually in the mpd_oled.service. The argument was P - s,
Regards.

Mase,

Thanks for the quick reply. Glad everything worked mostly and that I could point out a couple of small things. It will be nice once you get the plugin submitted so that it can be done via the webapp. That will be really easy for people to set up.

Here’s what ‘i2cdetect -y 1’ reports:

As I said, this RPi2 has a HiFiBerry DAC+ attached which is what the “UU” is representing.

I can see that when I change the volume on the webapp the middle of the three icons in the upper right does change, so that’s what that is. I’m on a wired ethernet, so I’ll assume that the icon in the corner is indicating network connectivity. I tested this by pulling out the ethernet connection and this icon disappeared, so that makes sense. What about the number though? Mine’s now showing “160” and I thought it was showing 206 before. Maybe if I get adventurous I will dive into the source code to see what that might represent.

I will post a comment to the mpd_oled page about the date format as a request.

A good team effort. Adrian working on the core code and you doing the plugin. Makes life a bunch easier for the rest of us.

Thanks,

Rick

1 Like

I figured out what the number is in the upper right. It’s the bitrate of the audio. I checked several of my albums on the Volumio and could see that it would change.

I did take a peek at Adrian’s code and that gave me a clue.

Rick

  1. Yes, everything you can do with mpd_oled you can do with the plugin. There is an option to change the I2C address in the config screen.
  2. I think that is Pause Screen Type, Stop in the config.

Cheers
Mase

Thanks for the screenshot! It turns out that UU means the device is in use by a driver so that shows that it is connected and working properly. It also means that the device probably isn’t a screen so I can safely ignore it in my scanner and adjust my documentation to say that I2C DACs won’t be shown in the scan

The numbers are bitrates I think and the code is quite straight forward if you care to look at it. If you know a little bit of programming you can customise it.

Thanks for your support. I did hint at making a plugin for Volumio on Adrian’s mpd_oled project page a while ago and an opportunity to do the work presented itself. It’s great to know that people appreciate the effort :slight_smile: I’m happy that it works and the setup is point and click. Hopefully many more people will able to use mpd_oled now.

I’ve fixed the clock format issue by the way. You just need to refresh the plugin now :slight_smile:

Hi supercrab,

Thank you (and Adrian) for that great plugin.

Unfortunately i’m not a coder - so i appreciate your effort very much.
I did the setup following Adrian’s very detailed guide on github a lot of times for testing it on new Volumio versions and found it working quite stable. Thanks Adrian :slight_smile:
But quite a lot of manual steps…

How did you manage the mpd.conf template issue Adrian had asked for on the forum, short time ago ?

Thank you so much - and i am tuned to get further with coding Volumio plugins by analyzing your coding :slight_smile:

As a little contribution i did a german version of the language file.
Sorry - i did not get it on on github as a PR - i’m quite new to that, so i will post it here in the forum - next.

Best Regards
Josef

[code deleted because of format errors while uploading - sorry
i will work on that]

Excellent! Works as advertised!

Thanks much!

Rick

1 Like

strings_de.json.txt (6.1 KB)

Not allowed to upload a json file i added the txt extension which has to be removed :slight_smile:

@judydudi
Don’t hesitate to improve, if you like to :wink:

As the weekend is near i offer to do very basic translations into Italian and French language files to be improved by friends in these countries before i will post them.

Best Regards, Cordialemente, Schöne Grüße,
Josef

1 Like

Hi Josef

You’re welcome! Glad to hear it’s all working well and there were no problems! :slight_smile:

Adrian’s guide is great but using the command line is quite scary. I’ve learnt quite a bit from doing this plugin and I’m a software developer! I still don’t know much about Linux.

Adrian managed to solve the mpd.conf template himself with a clever bash script. I think it works by stoping MPD and then running some Javascript to create the MPD file. Once that is done, MPD is restarted and everything continues as normal.

If you want to learn about programming you should have a look on YouTube for Node.js. This is the programming language used in the plugin and it’s a great way to start. Most of the tricky bits around the plugin are populating the config screen, reading the changes and saving them. Everything else was quite straight forward, that’s why I wanted to write this plugin :slight_smile: I also wrote the gpio_control plugin which lets you control attached devices. You might wanna look at that too. It’s much simpler. https://github.com/volumio/volumio-plugins/tree/master/plugins/system_controller/gpio_control

Thanks for the German translation! I think posting it here is easier so I can just pop it in and update the package immediately. It should appear if you reinstall the plugin and the steps to do that are above.

Cheers
Mase

Amazing! Great!