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
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.)?
Downloading plugin at http://tomatpasser.dk/gpio-buttons.zip
END DOWNLOAD: http://tomatpasser.dk/gpio-buttons.zip
Creating folder on disk
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: