I am happy to release my plugin GPIO Buttons for you to control the volumio2 player with physical buttons.
With GPIO you can add buttons, LEDs and other stuff to your raspberry pi.
For a full explanation; go to the website on the official raspberry pi website: https://www.raspberrypi.org/documentation/usage/gpio-plus-and-raspi2/
In this release the feature list is quite short, but enables control of basic player actions:
Play/pause
Vol+
Vol-
Next track
Previous track
For each action, a GPIO pin can be assigned from the gui as shown below:
For wiring and installation instructions visit the development page
Warning: Take care when connecting stuff to the GPIO pins. If done incorrectly the rpi can be damaged.
I am not to be held responsible for damage to electronics, humans or poor animals.
Download Current version: 0.7.5
Most recent version always available here: Download
Great work. Maybe some feedback for improving the user interface (configuration):
I would like to see something object-oriented-style:
When you enter configuration for the first time, itâs empty with a button to add a gpis object: A popup comes up where you can select which kind of gpio object you want to add: Input: Button, Rotary encoder, etc. Output: LED, etcâŚ
After selection you can select the physical ports that are connected to the object and finally you get a selection of possible action that can be assigned to classic actions of your gpio object: Button: Press, Release, Rotary: Turn left, turn right, Rotary with button: press, release, turn right, turn right when pressed, etcâŚ
Suitable actions that can be assigned would be skip, fast-forward, loudness, play/pause, etcâŚ
for the output part, e.g. led, one could think of something like a status indicator but i think that would be a bit overkill. Maybe first restrict this plugin to input rather than gpio
Thanks for the feedback! I had some of those thoughts myself when creating the initial version. Ultimatively I had to make it like this because the plugin platform in volumio2 is not very flexible yet and you canât create lists in the configuration gui. In the future I would like it to be kind of as you describe
If you need more layout elements, we could add them. Of course plugin UI is very limited now, because we encountered only few use cases, but thanks to your feedback we could add something like thisâŚ
It think it would be great if you could setup an output that can switch on/off an external amplifier based on the fact that volumio is playing something or not.
So you can set PIN X to go high if volumio starts playing music, and go low again after x minutes of not playing anything anymore.
i love using volumio so much that i threw out my audio set and hooked it up to a dedicated homebuilt gainclone amp and homebuilt speakers⌠The volumio pi never gets switched off but it would be great if volumio could turn of the amp after a whileâŚ
I do have a very similar use case and therefore like the idea, nevertheless i think that tomatpasserâs plugin should move away from the claim of handling GPIO - as the name suggest: General Purpose - as the use cases are way to vast to be included into a single plugin. So rather than clogging up the plugin with a huge set of features that are distributed to everybody, it should focus on âphysical user interfaceâ or âphysical playback interfaceâ.
If we implement the aforementioned functionality of switching an amp in a dedicated plugin, this plugin can be really streamlined (Iâm thinking of just one drop-down to select the pin that drives the amp and maybe one to select the device if we canât implement auto-detect) and only those people that have a use case for this scenario have to install the plugin. Maybe you could post this functionality to the plugin wishlist thread, so it will not be lost.
@michelangelo: Is there some api where we could poll/listen/observe/interrupt whether something is being played or not on a global basis (i.e. shairport/mpd/etc.)?
Maybe a good idea gpio output for command a analogic motorized potentiometer linked to software volume regulation of volumio ui (i think that this are a dream i suppose)
Downloading plugin at http://tomatpasser.dk/gpio-buttons.zip
END DOWNLOAD: http://tomatpasser.dk/gpio-buttons.zip
Creating folder on disk
Unpacking plugin
Checking for duplicate plugin
Copying Plugin into location
The folowing error occurred when installing the plugin: Error: Error: EACCES: permission denied, link '/data/plugins//gpio-buttons' -> '/data/plugins//miscellanea/gpio-buttons'
I tried to restart RPI before install, then stopped and launch volumio with sudo, same issue.
RPI2 + HifiBerry DAC+
System Version: 0.979 Released: Sat Aug 20 18:39:20 CEST 2016
I installed it, but I canât get it to work. When I go to the settings, I get the setting screen as expected, it behvave as expected, but it looks like the âSAVEâ button does not work. When I come back to the settings, all GPIO entries are unset.
Now it is even worse: I deactivated the plugin, and when I try to reactivate it, he does not want because the GUI thinks it is active (see the âActiveâ bullet, and the activation button on âOffâ).
Worse, I deactivated Spotify to try, and canât activate this one anymore eitherâŚ
When I click on the on/off buttons, I get the following creen for 1/4 of a second, then it goes back to the screen above:
Yes there is something wrong in plugin management⌠The only way to reactivate a plugin is to edit /data/configuration/plugin.json and replace âfalseâ by âtrueâ in the section of the concerned plugin