# Added support of bluetooth remote G20BTS PRO to my Volumio on RPI4

**URL:** <https://community.volumio.com/t/added-support-of-bluetooth-remote-g20bts-pro-to-my-volumio-on-rpi4/59602>\
**Category:** Diy and Tweaks\
**Created:** [January 6, 2023, 1:12pm UTC](https://community.volumio.com/t/added-support-of-bluetooth-remote-g20bts-pro-to-my-volumio-on-rpi4/59602 "2023-01-06T13:12:31Z")\
**Posts on this page:** 1\
**Showing post:** 26

<div class="post-metadata">

**Author:** ![Wheaten](https://community.volumio.com/user_avatar/community.volumio.com/wheaten/32/33147_2.png) [@Wheaten](https://community.volumio.com/u/Wheaten)\
**Post date:** [February 22, 2024, 11:03pm UTC](https://community.volumio.com/t/added-support-of-bluetooth-remote-g20bts-pro-to-my-volumio-on-rpi4/59602/26 "2024-02-22T23:03:17Z")

</div>

You need to look for a remote that have the buttons you need. For me all the BT remotes I have (with dongle) just works.  
like:

> **[WeChip Air Mouse afstandsbediening met IR-leerfunctie, 2.4G Air Mouse Remote...](https://www.amazon.nl/afstandsbediening-IR-leerfunctie-toetsenbord-projector-mediaspeler/dp/B07FY954Z3)**
>
> WeChip Air Mouse afstandsbediening met IR-leerfunctie, 2.4G Air Mouse Remote Control met toetsenbord en muis functie voor Android TV boxen (Nvidia Shield), Smart TV, computer, projector, HTPC, mediaspeler : Amazon.nl: Elektronica

```auto
import evdev
import time
import subprocess
import asyncio
import struct
import os
import constants

from evdev import InputDevice, categorize, ecodes

DEVICENAME = "ZYSD.Ltd HCY RC"

EV_VAL_PRESSED = 1
EV_VAL_RELEASED = 0

devices = [evdev.InputDevice(path) for path in evdev.list_devices()]

async def print_events(device):
    global STATUS            
    async for event in device.async_read_loop():
        if event.type == ecodes.EV_KEY:
            if event.value == EV_VAL_PRESSED:
                print(evdev.categorize(event))

                try:
                    print("You Pressed: " + ecodes.KEY[event.code])
                except:
                    print("You Pressed: " + ecodes.KEY[event.code][1])
                    
                if event.code == constants.KEY_ENTER: # KEY_ENTER
                    command = 'volumio toggle'
                elif event.code == constants.KEY_PLAYPAUSE: # KEY_PLAYPAUSE
                    command = 'volumio toggle'                    
                elif event.code == constants.KEY_LEFT: # KEY_LEFT
                    command = 'volumio previous'
                elif event.code == constants.KEY_RIGHT: # KEY_RIGHT
                    command = 'volumio next'
                elif event.code == constants.KEY_UP: # KEY_UP
                    command = 'bash /home/volumio/scripts/brightness.sh up'
                elif event.code == constants.KEY_DOWN: # KEY_DOWN
                    command = 'bash /home/volumio/scripts/brightness.sh down'
                elif event.code == constants.KEY_PAGEUP: # KEY_PAGEUP
                    command = 'node /data/plugins/user_interface/randomizer/randomTracks'
                elif event.code == constants.KEY_PAGEDOWN: # KEY_PAGEDOWN
                    command = 'node /data/plugins/user_interface/randomizer/randomAlbum'                        
                elif event.code == constants.KEY_VOLUMEDOWN: # KEY_VOLUMEDOWN
                    command = 'volumio volume minus'
                elif event.code == constants.KEY_VOLUMEUP: # KEY_VOLUMEUP
                    command = 'volumio volume plus'
                elif event.code == constants.KEY_BACK: # KEY_BACK
                    command = 'volumio clear'
                elif event.code == constants.KEY_MUTE: # KEY_MUTE
                    command = 'volumio volume toggle' 
                elif event.code == constants.KEY_BACKSPACE: # KEY_BACKSPACE
                    command = 'volumio clear'
                elif event.code == constants.KEY_VOICECOMMAND: # KEY_VOICECOMMAND  
                    command = 'python3 /home/volumio/scripts/radioplaylist.py'
                elif event.code == constants.KEY_COMPOSE: # KEY_COMPOSE
                    command = 'volumio random'
                process = subprocess.Popen(command.split(), stdout=subprocess.PIPE)
                
for device in devices:
    dev = InputDevice(device.path)
    if dev.name.find(DEVICENAME) >= 0:
        print(device.path, dev.name)
        asyncio.ensure_future(print_events(device))

loop = asyncio.get_event_loop()
loop.run_forever()

```

or:

> **[Huafeliz Universele afstandsbediening voor Nvidia Shield, Voice Search, Air...](https://www.amazon.nl/Huafeliz-Universele-afstandsbediening-Android-mediaspeler/dp/B07NNWRG3B)**
>
> Huafeliz Universele afstandsbediening voor Nvidia Shield, Voice Search, Air Mouse, voor Android TV Box en mediaspeler : Amazon.nl: Elektronica

---

_[View the full topic](https://community.volumio.com/t/added-support-of-bluetooth-remote-g20bts-pro-to-my-volumio-on-rpi4/59602)._
