Glad it’s sure now it works also on Volumio 3.xxx! Now I’m confident to update at last…
Does this still work with the recent build of Volumio ?
I just tried to install but it seams trigger happy is already installed (fresh install).
My goal is to add a cheap ali express keyboard with 3 keys and a rotary to have previous/play/next and volume up and down. Just for simple acces.
I tried adressing the keys to the mouse function.
This works for play/pause so my board is working.
Even if i plug in a normal keyboard the code from [adaptiman] does nothing
Im a complete noob into this so some help would be welcome
Thanks in advance
sudo thd --dump /dev/input/event*
Thanks for this, managed to get it working with this dump
Now how do i play a playlist from a hotkey ?
Anyone has an example ?
Just an FYI
I have a cheap Bluetooth remote control model G20BTS Mouse Remote Control.
I was able to pair it to my RPI4 and then used triggerhappy to control the volume.
Its Great!
I have one wield issue with my remote (G21 pro), which sends out movement info (REL_X REL_Y) rapidly if you move it.
Key mapping for play/next command is fine, but not for volumn controls.
I have to place the remote on the desk and press the key without shaking to make it work. Somehow it is not doing volumn control properly when REL_* are sent at the same time. It doesn’t matter if I map other keys like number keys to volumn control.
My question: why volumn control is affected but not play controls? any workaround?
Hi,
it is my first post here at this community! I’m so happy that I found the initial informations here so that I want to share my finds.
I tryed to make a Bluetothremote work, one without USB-Dongle. It turned out that something massed up in between bluetothctl and triggerhappy. So for my second try i used a “G20BTS pro” remote with USB-Dongle and it worked perfectly.
I was setting up the usual Play-Key’s as described in this thread and in addition i configured the Num-Keys as Playlists.
eg. Key_1 opens a playlist with the name “Key 1” and so on for all of them.
To do so, I am able to manipulate the Playlists like i want in Volumio without changeing audio.config every time.
For example: used Playliste “Key 1” to put in all my favorit radiostations, start it by pressing the corresponding Num-Key and switch trew the stations with Key previous or next.
to do so, i entered the following to audio.config;
KEY_1 1 /usr/bin/curl -i --header “Content-Type: application/json” localhost:3000/api/v1/commands/?cmd=“playplaylist&name=Key%201”
KEY_2 1 /usr/bin/curl -i --header “Content-Type: application/json” localhost:3000/api/v1/commands/?cmd=“playplaylist&name=Key%202”
KEY_3 1 /usr/bin/curl -i --header “Content-Type: application/json” localhost:3000/api/v1/commands/?cmd=“playplaylist&name=Key%203”
etc.
Thanks to the community!
PS: I’m an electronics guy and not really familial with linux but try to get used to it. Maby there is a better way to handle those things, but it worked great for my setup. Hopefully i quoted the code correct…
Good evening all,
I’m playing around with a BT remote and had planned to use a python script (found in another thread) but was surprised by the finding that de facto some of the clicks on the remote already producing usefull actions.
So I found this triggerhappy thingi here and am pretty sure that some of the events are covered with this little helper.
I’ve modified the audio.conf file according to my (tiny) needs (using up&down for loudness and left&right for skipping to the previous or next song. Play/Pause did already work.
So now my question: I have a button on my remote (shows a house, so seems to be the “home” button) which triggers the popup of a browser window with google… ??? !!!
I cannot find any hint for this in the audio.conf file nor do I have the lightest idea how this can happen and - more important: how can I STOP this?
I cannot touch/move or even close the browser window - it messes up the whole screen.
Any idea?
Thanks a LOT.
Warm regards,
Ralf
Hi Ralf,
I had the same problem with my remote “G20BTS pro” that the “Home”-Button opened a browser. In addition, the button “Mouspointer” switches the mode of the remote and messed up everything.
What I did as a workaround was to open the remote and covered both button-mechanisms with isolating tape. So these two buttons are no longer useable but i’m fine with that.
Hope that helps,
Markus
Dear Markus (@Maexx),
THIS is the real hard way .
But nevertheless an acceptable approach.
Especially as I finally build up my Volumio yesterday and because it is housed in a kitchen-wardrobe I have to stick with the BT-remote…
Thanks for the idea!
Ralf
Dear Markus (@Maexx ),
yesterday late in the evening I found two interesting things…
First, most important and “making things easier, because it works”: As I have installed my kitchen radio now and had time and opportunitiy to LOOK exactly at the screen I’ve seen that in the Browser Window (Chrome) which appears at “KEY_HOMEPAGE” has three shortcuts configured in the middle of the start page.
The first one is: (taaadaaaaa!) - “Volumio”. Pressing this one recalls the Volumio GUI and Browser Window disappears.
Second and less important (because I cannot get it to work):
Triggerhappy (abandoned 2016, BTW) has an option: --ignore eventname
(see documentation) .
So it SHOULD work to put this in the service file" /lib/systemd/system/triggerhappy.service"
e.g.
change
ExecStart=/usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --socket /run/thd.socket --us$
to
ExecStart=/usr/sbin/thd --triggers /etc/triggerhappy/triggers.d/ --ignore KEY_HOMEPAGE --socket /run/thd.socket --us$
But it didn’t work in my case.
Eventually one have to re-create the service itself - but I don’t know how and I don’t want to disturb the system as it is a blackbox for me …
(I still cannot find ANY hint WHY triggerhappy is doing this!)
Kind regards,
Ralf