Station keys for web radio

Hi there,

I wonder if it would be possible to have an i2c keypad connected to choose from selected playlists / radiostations. Is that already possible or is it an project idea for a new plugin ?

I’m new to the forum and i have knowledge in electronics engineering but not much in programming.

Thank you for any comment.

Josh

There’s plugin called GPIO buttons. It allows you to add physical buttons to gpio pins and control basic playback functions. Hope that’s what you wanted

Thank you, mike2060, but i need the ability to choose from a couple of Radio stations. That’s not possible with the GPIO plugin right now.

I try to connect a MCP23017 with a keyboard matrix and poll the keys - then i could output to mpc - but it would be better to have a plugin that is able to confige the radio stations to the keys… Don’t know how to do that.

Hi there, its my first post here.

I use volumio for 2 weeks and test with my rasp. I like to built a standalone device with physical buttons for volume, etc…

For the Woman Acceptance Factor was the possibility to have some Station keys for web radio. Is there a solution to do this?

Hi Tobi72,

For setting the Volume and typical buttons for forward/back mute unmute start stop and so on you can use the GPIO-Plugin
https://volumio.org/forum/volumio-plugins-collection-t6251.html#p30812
or even cooler the Rotary encoder plugin.
https://volumio.org/forum/volumio-plugins-collection-t6251-20.html#p43781

I already got that working to improve the WAF on my device, but i’m still looking for a solution for the station keys.

This may be possible by using a modification of the GPIO plugin:
https://volumio.org/forum/websocket-home-automation-t4622.html

Unfortunately my coding skills are not really great - so i didn’t get it working until now.
Also there is a problem with the maximum amount of buttons as long as we need 1 GPIO per button.

A button plugin for use with I2C and a port expander like e.g. MCP23017 or PCF8575 would be really cool.
Don’t know if tomatpasser, the author of the great GPIO Buttons plugin could help with that.

Let me know if you have any ideas / solution.

Thank you
Josef

Hi folks,

Thanks to Tobi and tomatpasser (the author of the fabulous GPIO plugin) there is a solution now.
Tobi worked it out and i’m allowed to translate the instructions to the forum :smiley: :smiley: :smiley:

Using Saiyato’s rotary encoder plugin you not longer need at least the next, previous, vol+ and vol- keys

1.) Create playlists for each radio station (or album) and name them “key1” “key2” “key3”…
2.) Edit the file “/data/plugins/system_controller/gpio-buttons/index.js”

sudo nano /data/plugins/system_controller/gpio-buttons/index.js

For example to change the “next” and “previous” buttons replace the code beginning at line 254 this way:

[code]//next on playlist
GPIOButtons.prototype.next = function() {
//this.logger.info(‘GPIO-Buttons: next-button pressed’);
socket.emit(‘playPlaylist’, {‘name’:‘key1’})
};

//previous on playlist
GPIOButtons.prototype.previous = function() {
//this.logger.info(‘GPIO-Buttons: previous-button pressed’);
socket.emit(‘playPlaylist’, {‘name’:‘key2’})
};[/code]

3.) Go to the plugin settings and define the GPIO pins you use.
Don’t miss to have a look at tomatpasser’s graphic on github to determine if you have to connect your buttons to 3,3V+ or to ground.
https://github.com/tomatpasser/gpio-buttons
In my case i used GPIO23 and GPIO24 (Pin 16 and Pin18) - that need to be fed by 3,3V to “pull up”.

4.) Restart your system and you’re done :smiley:

Interestingly switching between radio stations works noticable faster than doing this on the web interface :smiley:

  • Josef