GPIO Pins to control volume

Get help for Volumio here!

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

GPIO Pins to control volume

Postby julien123123 » Sat Jan 27 2018 18:36

ROLO wrote:I lately stumbled upon this:
https://github.com/foxey/volumio-buddy/
No idea who made it and if it works, but it looks promising. It includes rotary encoder support.

The code looks really promising, but I was never able to get it to work on my system that uses un Raspberry Pi Zero W. It was only able to show the volumio logo. In the end, it only inspired me to write my own code.
Random avatar
julien123123
Fresh off the boat
Fresh off the boat
 
Posts: 3
Joined: Tue Jan 23 2018 20:21

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


GPIO Pins to control volume

Postby snuka » Sat Mar 03 2018 15:29

Hi, would you share it ?

I have tried volumio-buddy as well to drive a little Oled screen but it won't work because of some dependencies not installed correctly (I think). thanks
User avatar
snuka
Audiophile
Audiophile
 
Posts: 112
Joined: Mon Aug 04 2014 13:29


GPIO Pins to control volume

Postby juanitomaille » Thu Mar 08 2018 16:36

Hi guys, anyone tried this plugin for rotary encoder ?
volumio-plugins-collection-t6251-20.html#p43781

I didn't managed to get it working.
The button doesn't react, rotation is doing erratic volume level.
I will try Hardware debouncing as advised.

If Saiyato can read this...
Random avatar
juanitomaille
Sunday DIYer
Sunday DIYer
 
Posts: 17
Joined: Wed Dec 20 2017 11:02


GPIO Pins to control volume

Postby Saiyato » Fri Mar 09 2018 09:26

If you pull the latest version, you shouldn't experience any misfires.
That being said, volume control could be better, Volumio is quite slow to react on the new volume pushes.

I did find that the button push stopped working for some command, definitely not for all. If you're experiencing problems, please deliver as much info as you can gather, I can't debug much, based on 'doesn't work', e.g. maybe the wrong PIN was configured. You can enable some extra logging to help you identify the problem. ;)
Just.Love.Music.
User avatar
Saiyato
Golden Ear
Golden Ear
 
Posts: 654
Joined: Wed Dec 23 2015 07:58
Location: Woudenberg, Netherlands


GPIO Pins to control volume

Postby juanitomaille » Fri Mar 09 2018 14:03

Hi Saiyato,

Yes, of course I will give you some more information, I understand that my last message can't help, It was just to verify that it's the good place to talk.

So, I did some tests.

and the log says :
2018-03-09T14:19:24.837Z - info: [Rotary encoder] Encoder #1 button pressed; press state = pressed
2018-03-09T14:19:24.930Z - info: [Rotary encoder] Encoder #1 rotated right
2018-03-09T14:19:24.945Z - info: [Rotary encoder] Encoder #1 rotated left
2018-03-09T14:19:25.135Z - info: [Rotary encoder] Encoder #1 button pressed; press state = pressed
2018-03-09T14:19:25.368Z - info: [Rotary encoder] Encoder #1 button pressed; press state = pressed
2018-03-09T14:19:26.229Z - info: [Rotary encoder] Encoder #1 button pressed; press state = pressed

So, it's not a problem of GPIO config
I think it's a hardware problem. I have maybe 1 meter between rpi and rotary encoder plugged by a RJ45 cable

When I watch log I understand that I have 2 or 3 rotation logged instead of only one physically done. I've soldered 0,22uF capacitors because I didn't have 0,1uF, is it that ?

When I push the button, it's possible to have 10 or 15 repetition of the toggle play/pause, I need to unplug rotary encoder to stop that.
A bouncing effect, ok, I can understand, but 10-15 times...

I will try to plug rotary encoder with small cables.


Thanks for your help !
Random avatar
juanitomaille
Sunday DIYer
Sunday DIYer
 
Posts: 17
Joined: Wed Dec 20 2017 11:02


GPIO Pins to control volume

Postby Saiyato » Sun Mar 11 2018 12:22

Hi,

How did you install the plugin? Because I just noticed I missed a commit two weeks ago.
If you installed the plugin using the CLI or drag-and-drop, it should've worked fine. If you installed using the GUI (search plugins), I think you should reinstall and try again.

However... I noticed another bug, the switch is rendered useless if you save a configuration, it needs a restart of volumio to work properly again.
I've patched and uploaded the fix, but I'm awaiting Volumio to approve it (there's a lot of patches in my PR now).
Last edited by Saiyato on Mon Mar 12 2018 09:50, edited 1 time in total.
Just.Love.Music.
User avatar
Saiyato
Golden Ear
Golden Ear
 
Posts: 654
Joined: Wed Dec 23 2015 07:58
Location: Woudenberg, Netherlands


GPIO Pins to control volume

Postby juanitomaille » Mon Mar 12 2018 07:25

Hi Saiyato,

I think you have found the problem, I installed it by GUI because I thought that your first corrective was commited by volumio dev in rev368.
So, when I can, i will reinstall it and come back here.

Thanks !!
Random avatar
juanitomaille
Sunday DIYer
Sunday DIYer
 
Posts: 17
Joined: Wed Dec 20 2017 11:02


GPIO Pins to control volume

Postby Saiyato » Mon Mar 12 2018 10:35

Hi,

I just added a lazy install script for unsanctioned versions in the repo.
Just.Love.Music.
User avatar
Saiyato
Golden Ear
Golden Ear
 
Posts: 654
Joined: Wed Dec 23 2015 07:58
Location: Woudenberg, Netherlands


GPIO Pins to control volume

Postby juanitomaille » Tue Mar 13 2018 10:44

WOuah !! great !

I've just seen that before coming here. just a lazy install ;)
So, rotary encoder works with volume. Thank you for your job !!
I invite every people who want a rotary encoder installing your plugin.

I've just a problem with button, changed GPIO pin, it works and...stopped working.

What i've done :
Test GPIO before : 3,3V
plug it.
Test GPIO : 3,3V
push the button : It works
Push 2, 3 times : It don't work
Test GPIO : 0V
After reboot, the same.

Is there a problem to plug switch pin directly to GPIO pin without capa or resistor? i think it's only a switcher.
I hope i didn't burnt those pins
I tried to use pintest from wiringPi but not found it where it should be. find command give nothing.
Random avatar
juanitomaille
Sunday DIYer
Sunday DIYer
 
Posts: 17
Joined: Wed Dec 20 2017 11:02


GPIO Pins to control volume

Postby Saiyato » Tue Mar 13 2018 11:12

Ai caramba, that doesn't sound good. I've not experienced problems switching GPIO pins.
I do however use 5V instead of 3.3V
Just.Love.Music.
User avatar
Saiyato
Golden Ear
Golden Ear
 
Posts: 654
Joined: Wed Dec 23 2015 07:58
Location: Woudenberg, Netherlands

PreviousNext

Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest