[PLUGIN] GPIO CONTROL: CONTROL GPIO WITH VOLUMIO2 EVENTS

Hi

It was not possible to use PWM without running the plug-in as root unfortunately. The bit that does PWM needed root :pensive:

I don’t know how to get the sampling rate sorry. It could be possible by calling a web service thats run locally on volumio.

Cheers
Mase

I guess from here
proc/asound/card0/pcm0p/sub0/hw_params

Does that return the sample rate of the sound device or the currently playing media source?

It returned the Curently playing media info

Cool, there’s also a web service that returns JSON that’s probably easier to digest. Trouble is I found no way of doing PWM within a plug-in :weary:

Have you looked at api/v1/getstate it has both samplerate and bitdepth fields…

Yes, that’s the one - I forgot what it was called, so thank you very much for that!

Hi Mase,

I am trying to install the plugin from Github, but I don’t know how to do it without Zip. I am completely new with this. Could you please give a suggestion to install it?

I have a RPI4 with Hifiberry DAC2 and run volumio (obviously :expressionless: )

Thanks a lot! Steve

Hi, you shouldn’t need to install from zip, it is already bundled within volumio. You should be able to find it in Plugins, Search Plugins, System Tools…

Hi,

I must be blind as a bat. Have been looking for it several times.

Thanks anyway! Cheers

1 Like

Haha! GPIO Control :smiley:

No problem!

I installed it, and will definitely use it for LED controls, but it is not doing what I was hoping for; a possible alternative pen configuration for GPIO3 for the wake-up. Any tricks?

thanks!

1 Like

it could be to do with the default of the GPIO, some are high and some are low on startup.

hello and congratulations for such a great plugin!!

Would you please tell us how to connect GPIO pin to an esp8266 so we can read play / not play on esp8266 ???

I think you should try the GPIO buttons plugin (give it a google) as that reads the GPIO. My plugin can only write to the GPIO but it sounds like you need to read from it.

Hi @supercrab

any chance you will port your plugin to Volumio3?

actually it works fine after re-building two node modules

1 Like

Alrighty I’ll have another bash :+1:t4::sunglasses: now that v3 is released :laughing:

Hi.
i have exactly the same issue that folks had when this topic was started.
I was expecting that when Play is started- GPIO will be on, but on other event (on Stop for example) - the same GPIO will be off.
But in reality- every event is processed once and when GPIO is ON- it will be ON until restart or plugin deactivation.

Is it possible to have only one GPIO for Play, Pause, Stop events to be active at a time?

it is definitely possible. please look at this example for GPIO26

Sure. With one GPIO it is possible.

But I have 3 LEDs and looking for an option to lit one of them depending on playback mode - Play, Pause, Stop