[Plugin] GPIO Buttons: Control Volumio 2/ Volumio 3 with buttons

I have another problem : I cannot set up the configuration of the GPIO plugin via the GUI (SAVE button not working).

I tried changing the settings of the GPIO plugin, but it does not show in the GUI, and does not operate when I connect GPIO 22:

  1. /data/plugins/miscellanea/gpio-buttons/UIConfig.json:

[code] “content”: [
{
“id”: “playpauseenabled”,
“element”: “switch”,
“label”: “Enable Play/pause”,
“value”: true
},
{
“id”: “playpausepin”,
“element”: “select”,
“label”: “GPIO Pin”,
“value”: {“value”: 22,
“label”: “22”
},

      "options": [
        {
          "value": 2,
          "label": "2"
        },
        ....

[/code]

  1. /data/plugins/miscellanea/gpio-buttons/config.json :

{ "playpause":{ "enabled": {"value": true, "type": "boolean"}, "pin": {"value":"22","type":"number"}, "value": {"value": "22", "type": "number"} },

Hi,
I made a quick test and you’re right nothing happens when saving from UI. But you don’t have to change config.json as this file is just for the default setting. It should be filled and copied in /data/plugins/miscellanea/gpio-buttons/config.json . But only Tomatpasser knows how it works…

Encore merci balbuze.

Let’s hope Tomatpasser hears us and can help…

Regards,

Yves.

I hear you, will try to reproduce later tonight

Hello,
thanks for the great work so far!
Would it be possible to add custom commands to the gui? for example: load specific playlist like werbradios or other.
i think this would be awesome!
best regards

paul

Thanks ! :smiley:

The issue with configurations not being saved should be fixed now. As mentioned there is a problem in plugin management with enabling that I can not solve.

This is on the TODO - but I’m not sure how to do this in the config UI.
I would like to have the configuration where you could add as many buttons as you like and choose action and GPIO pin for each, with many actions available or even entirely custom commands. But there is no way to do this in a good way in volumio right now. The 5 actions available in the plugin now are hardcoded in the UI config. This gets really messy with loads of functions.

Hi,

I came across a possible conflict between gpio-buttons and Volumio ControllerI2s which is described in more details here.
Actually I’m not sure that is something gpio-buttons can solve on its own, as it looks like a startup sequence arbitration issue: controllerI2S plugin should most probably start first.
Maybe more generally some rule should ensure all core plugins execute their init sequence before any “add-on” plugins are called…
Interested in @tomatpasser and @michelangelo views on this.

Thanks for the report! I’ve replied on the issue

Thanks for a great plugin. Had it up and running in about five minutes with a Pi3, HiFiBerry DAC Plus and Volumio v 2.030.

If possible I would love to see a button for “Shuffle”. I play all my music off my NAS setup in this mode and with this feature I would almost never have to use the graphical interface. At the present I have to enter the GUI for the single purpose of putting the player in shuffle mode.

While on the subject of shuffle, when in this mode if I press the button for “Previous” it does not play the previous song, but some other random track.

Glad you like the plugin! I can make a shuffle function but not solve your other problem. For that we’ll have to ask @michelangelo

Thanks! I’ll keep my eyes open. I appreciate all you do in contributing your knowledge for the rest of us. Now if I can only get an i2c LCD to work I’ll be all set up!!

Hello,

It seems to be a great plugin.
My question is : how can I use your plugin to manage volumio with an IR remote command connected to GPIO25 ?

Thanks for an answer, best regards.

What kind of IR module are you using? How is it connected?

Hello Tom

I’m using a Vishay TSOP2438 connected on GPIO25 for the signal because I’m using IQAudio PiDigiAmp+ (with this car, I can use only GPIO22, 23, 24, 25).
Here is that I’ve done :
apt-get install lirc
add to /etc/modules
lirc_dev
lirc_rpi gpio_in_pin=25 gpio_out_pin=22

I’ve modified /etc/lirc/hardware.conf
I’ve added to /boot/config.txt :
dtoverlay=lirc-rpi,gpio_in_pin=23,gpio_out_pin=22
after reboot, I run
/etc/init.d/lirc stop
mode2 -d /dev/lirc0

I get informationat each pulse on my command, so everything is working.
Now, do I need to write piece of python or C code to use your plugin ?

Thanks in advance

There is no function in this plugin to detect different input on the same pin. I assume you have more than one button you want to have working. You need another plugin for that.

Hello,
Be indulgent, I begin …
Ok, the GPIO Plugin Buttons control is in volumio2.
We can activated in web interface…
But which potentiometer purchased? What resistance (Ohm)?
Does anyone have a schematic of the potentiometer and wires?
thank you very much
I specify that I would like a rotary potentiometer not a push button

The current release only supports buttons!

I’m really new to the physical part of RPis, I’ve only used them to run services and stuff at home. I’ve now bought a RPi 3 with a Hifiberry DAC+, and I have a set of Cherry MX switches from earlier that I bought just to test them out. Would they work to connect to the RPi GPIO pins straight away, or do I need some particular kind of button switches? As far as I’m aware, they’re just simple breaker switches, they’re used in all kinds of electronics apart from keyboards, like guitar pedals or select buttons.

They have really short pins, so I’d have to find a good way to connect them, but other than that, is there any reason I should assume they wouldn’t work to trigger this plugin?

Assuming they do work, is there a preferred solution to fit a connection between the RPi and the DAC+ board? It seems to be a fairly snug fit.

Edit: A friend brought some cables and stuff to work and we tested it out. The Cherry MX switches work fine, but their pins are smaller than regular GPIO pins so the female pins didn’t really fit. Still, if you held the button right, it triggered Volume Down (for example) just fine! Now I just have to decide how to implement this :slight_smile:

Hey, at first: big thanks for your development and this grrrrrreat plugin!

It works like charm and out of the box with no hassle.

But nevertheless - like all greedy children - i want more :smiley:

Is it possible to include a button for skipping between two Playlists in the next version?

Or could you give me a hint on how edit your plugin to make a custom function by myself?

I’m currently building an “rpi volumio vintage grundig mambio machine” and try to use all existent and orignal real buttons from the Radio.
So that - ideally - it could be controlled standalone without the use of a Smartphone or the web Interface.

files.acrobat.com/a/preview/8f4 … 22b361146e
files.acrobat.com/a/preview/746 … 84713df642
files.acrobat.com/a/preview/fb2 … ee1dea5a14
files.acrobat.com/a/preview/73c … 4cdda1c425
files.acrobat.com/a/preview/3be … 3bc1db46be
files.acrobat.com/a/preview/676 … 25b717e10a
files.acrobat.com/a/preview/546 … 47275a820e

Thanks in advance :slight_smile: