Hi! Just wanted to share how i added a Bluetooth remote to my Moode that are running on a Rpi4.
This is the BT remote I'm using and i bought it from Aliexpress very cheap .
Got the help from AI and i summarized what i did so maybe that can help someone that want to add a BT remote:
# Bluetooth Media Remote Setup for Moode Audio (RPi)
## Prerequisites
- Raspberry Pi running Moode Audio
- G20BTS Bluetooth remote (or similar)
- Connected display (optional, for CoverView)
## 1. Start Bluetooth Service
```bash
sudo systemctl start bluetooth
sudo systemctl enable bluetooth
```
## 2. Pair the Remote
```bash
bluetoothctl
```
Inside the bluetoothctl shell:
```
power on
agent on
default-agent
scan on
```
Put the remote in pairing mode, then when it appears:
```
pair XX:XX:XX:XX:XX:XX
trust XX:XX:XX:XX:XX:XX
connect XX:XX:XX:XX:XX:XX
```
Trusting ensures auto-reconnect after reboot.
## 3. Verify Input Events
```bash
sudo apt install evtest
sudo evtest
```
Select the G20BTS device from the list and press buttons to confirm keycodes.
### G20BTS Button Mapping
| Button | Keycode | Scancode |
|--------|---------|----------|
| Volume Up | KEY_VOLUMEUP (115) | c00e9 |
| Volume Down | KEY_VOLUMEDOWN (114) | c00ea |
| Play/Pause | KEY_PLAYPAUSE (164) | c00cd |
| Previous | KEY_PREVIOUSSONG (165) | c00b6 |
| Next | KEY_NEXTSONG (163) | c00b5 |
| Home | KEY_HOMEPAGE (172) | c0223 |
| Back | KEY_BACK (158) | c0224 |
| Up | KEY_UP (103) | 70052 |
| Down | KEY_DOWN (108) | 70051 |
| Left | KEY_LEFT (105) | 70050 |
| Right | KEY_RIGHT (106) | 7004f |
| OK/Center | KEY_COMPOSE (127) | 70065 |
## 4. Remap Center Button (Optional)
The center/OK button sends KEY_COMPOSE instead of KEY_ENTER. To remap:
```bash
sudo nano /etc/udev/hwdb.d/99-g20bts-remote.hwdb
```
Add:
```
evdev:input:b0005v1D5Ap*
KEYBOARD_KEY_70065=enter
```
Apply:
```bash
sudo systemd-hwdb update
sudo udevadm trigger
```
## 5. Install Triggerhappy and MPC
Moode uses MPD which doesn't listen for input events directly. Use triggerhappy to bridge keypresses to MPD commands:
```bash
sudo apt install triggerhappy mpc
```
## 6. Configure Triggerhappy
```bash
sudo nano /etc/triggerhappy/triggers.d/g20bts-remote.conf
```
```
KEY_PLAYPAUSE 1 /usr/bin/mpc -h localhost toggle
KEY_NEXTSONG 1 /usr/bin/mpc -h localhost next
KEY_PREVIOUSSONG 1 /usr/bin/mpc -h localhost prev
KEY_VOLUMEUP 1 /usr/bin/mpc -h localhost volume +5
KEY_VOLUMEDOWN 1 /usr/bin/mpc -h localhost volume -5
KEY_COMPOSE 1 /usr/bin/mpc -h localhost toggle
```
Restart triggerhappy:
```bash
sudo systemctl restart triggerhappy
```
## 7. Troubleshooting Triggerhappy
If `thd --dump /dev/input/event*` doesn't show events, find the correct device:
```bash
cat /proc/bus/input/devices
```
Look for "G20BTS" and note the event number, then test:
```bash
sudo thd --dump /dev/input/eventX
```
## 8. Display Configuration
If the connected display shows a "Bluetooth active" screen instead of playback info:
1. Open Moode web UI (`
http://moode.local`)
2. Go to **Menu → Configure → Peripherals**
3. Toggle **CoverView** on
4. Restart Local Display
This will show album art and playback info on the connected display.
## 9. Fix Remote Not Working After Reboot
Triggerhappy starts before the Bluetooth remote reconnects, so it doesn't monitor the remote's input device. Fix this by restarting triggerhappy automatically when the remote connects.
Create a udev rule:
```bash
sudo nano /etc/udev/rules.d/99-g20bts-remote.rules
```
Add:
```
ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="G20BTS Keyboard", RUN+="/bin/systemctl restart triggerhappy"
```
Apply:
```bash
sudo udevadm control --reload-rules
```
Now after every reboot, once the remote reconnects, triggerhappy will automatically restart and pick it up.