Universal Bluetooth and USB remotes support

After I added to my Volumio box a support of bluetooth airmouse (Added support of bluetooth remote G20BTS PRO to my Volumio on RPI4 - #4 by Wheaten) I developed much more sophisticated script. See:

Main features:

  1. It is universal, must work for all such devices without any code changes. IR based remotes can work via Flirc USB dongle (https://flirc.tv)
  2. Multiple connected HID devices are supported, each of them will work
  3. Hot plug/unplug of USB devices is supported, after hot plug new device will work immediately without restart
  4. User can prepare file of favorites, they are assigned to keys from 0 to 9 - they are present on lot of remote controls. To each such key a playlist element can be assigned. When appropriate key is pressed, playing will start immediately. When this file is edited, it will be reloaded automatically without need to restart

It can be easily converted to Volumio plugin, but I did not do so because of few reasons:

  1. I don’t know if there is a need in such plugin
  2. I am not Web developer (and have no intention to become), so I can’t make GUI for it, for example to assign current playing item to remote key.
  3. I developed it for my own DIY project - this player will have volume knob and bluetooth remote. And I wanted to be able to turn on my favorite radio stations and playlist by pressing single button on my remote

After I started to use it, I even purged unneeded triggerhappy service, that came with Volumio, but did not work for me (sudo apt purge triggerhappy)

3 Likes

Thank you very much for sharing - maybe this could be integrated into the fabulous IR remote plugin to make it an universal remote plugin … just a wish

Unfortunately i am also not a coder to do so

Did triggerhappy interfere anyhow or did you only kick it to see if it‘s working without it ?

Best Regards
Josef

My code interoperates with triggerhappy. I purged it only because triggerhappy is not needed in my setup. Furthermore, if your remote works with triggerhappy (mine does not), it will work with my code too, and maybe each key press will be processed twice (both by triggerhappy and my script)