Public Beta Test: Audio Without Compromise - Refining the Future of Volumio on Bookworm

Hey @rkorell,

Good observation - and you’re absolutely right to question the difference.

The example you quoted:

KEY_PLAYPAUSE 1 /usr/bin/mpc toggle

…was from internal testing and response in this thread as generic guidance on setup steps.

Scripting examples should not be mixed with your config requirements. They serve different purposes.

For your /etc/triggerhappy/triggers.d/audio.conf, stick with:

KEY_PLAYPAUSE 1 /usr/local/bin/volumio toggle
KEY_NEXTSONG 1 /usr/local/bin/volumio next
KEY_PREVIOUSSONG 1 /usr/local/bin/volumio previous

This ensures maximum compatibility with Volumio’s state engine.

Kind Regards,

1 Like

Thanks.
Your post than is may little bit misleading - I assume that @VictorDUA may has used

KEY_PLAYPAUSE 1 /usr/bin/mpc toggle

and following as he asked for guidance on concrete configuration.

  • Just my 2cents - don’t worry, I don’t want to bother …
    Regards,
    Ralf

mpc should indeed not be mentioned.

No I use only 3 commands: (i don’t use volume and don’t have stop button)

#PLAY PAUSE TOGGLE
KEY_PLAYPAUSE 1 /usr/local/bin/volumio toggle

#NEXT
KEY_FASTFORWARD 1 /usr/local/bin/volumio next

#PREVIOUS
KEY_REWIND 1 /usr/local/bin/volumio previous

1 Like

Hi!
Just some more info about ‘volumio’ commands.
Volumio uses a mpc emulation layer. As you guess, it is supposed to be used instead of mpc direct command. Why? Using it allows all music services, not only mpd to talk with volumio with the same command while /usr/bin/mpc is just for mpd.
As results, even Spotify, Tidal, Qobuz connect, BlueTooth, Airplay can remote volumio.
:wink:

1 Like

Bluetooth remote control doesn’t seem to connect automatically when loading Volumio. Is there a solution to this problem?

After restart (or new start) Volumio I have to ssh bluetoothctl scan on. Then Volumio “find” my Remote.
If I start with bluetoothctl connect 41:42:67:01:D0:10 nothing happen.

Hey @VictorDUA,

Manual reconnect on reboot

Currently, Volumio does not automatically reconnect Bluetooth HID remotes after reboot. If your remote is already paired and trusted, you can reconnect it manually via:

echo -e 'connect XX:XX:XX:XX:XX:XX\nexit' | bluetoothctl

This can be added to a script or run after every reboot via SSH.

A more robust solution with retry logic (e.g., background daemon or timed reconnects) would be best implemented as a plugin, which is a good candidate for future development.

Kind Regards,

Tell me how to do this or direct me where to read it. What script and where? Thank you.

This is do not work.
echo -e ‘connect 41:42:67:01:D0:10\nexit’ | bluetoothctl

In my case work:

  1. Boot
  2. ssh volumio@192.168.1.101
  3. bluetoothctl
  4. scan on
  5. Ready

Hey @VictorDUA,

Thanks for the follow-up and the screenshot.

Your observation is helpful:

In my case it works with:
Boot
ssh volumio@192.168.1.101
bluetoothctl
scan on
[Device becomes ready]

This suggests that your Bluetooth remote may not be advertising or discoverable immediately after boot, possibly because:

  • It goes into low-power or sleep mode
  • It only wakes and becomes visible when a scan is actively running
  • It does not maintain an active connection unless explicitly polled

Additionally, for any reconnect logic to work reliably, we still need to confirm the following:

  1. Pairing and trust state
    Please run:

    bluetoothctl
    info XX:XX:XX:XX:XX:XX
    

    Check for these two lines:

    Paired: yes
    Trusted: yes
    
  2. Wake behavior

    • Does the remote send any input (e.g. detected by evtest) after reboot, without running scan on?
    • If not, does pressing any button first help the reconnect command succeed?
    • Does running scan on consistently cause the device to become connectable?

This kind of behavior means any reconnect logic would likely need to include conditional checks or retry with periodic scan on bursts. That would be best handled by a plugin with active polling or event-based reconnection logic.

For now, the basic reconnect script can be used, but its success will depend heavily on the specific behavior of your remote.

Let us know the output of info and your observations when scanning or pressing buttons.

Kind Regards,

Hey @VictorDUA,

Prototype: Auto-reconnect script + systemd Service (Untested)

If you want to experiment with automatic reconnection after reboot, here is a basic SSH-based prototype. This is not officially supported or tested, and may require adjustment based on your setup. Use at your own risk.

  1. Store your device MAC address

    echo 'XX:XX:XX:XX:XX:XX' > /data/bt-remote.mac
    
  2. Create the reconnect script

    sudo nano /usr/local/bin/bt-remote-reconnect.sh
    
  3. Add the following contents

    #!/bin/bash
    
    MAC_FILE="/data/bt-remote.mac"
    
    if [ -f "$MAC_FILE" ]; then
        MAC=$(cat "$MAC_FILE" | tr -d '\r\n')
        if [ -n "$MAC" ]; then
            echo "Attempting to reconnect to $MAC"
            echo -e "connect $MAC\nexit" | bluetoothctl
        fi
    fi
    
  4. Make the script executable

    sudo chmod +x /usr/local/bin/bt-remote-reconnect.sh
    
  5. Create a systemd service

    sudo nano /etc/systemd/system/bt-remote-reconnect.service
    
  6. Add the following contents

    [Unit]
    Description=Reconnect Bluetooth HID remote
    After=bluetooth.service
    Wants=bluetooth.service
    
    [Service]
    Type=oneshot
    ExecStart=/usr/local/bin/bt-remote-reconnect.sh
    
    [Install]
    WantedBy=multi-user.target
    
  7. Enable the service

    sudo systemctl daemon-reexec
    sudo systemctl daemon-reload
    sudo systemctl enable bt-remote-reconnect.service
    
  8. Reboot and test

    sudo reboot
    

If your device is paired, trusted, and reachable, it should reconnect automatically after boot.

Disclaimer: This setup is experimental, untested, and not officially supported. Behavior may vary depending on your device or Bluetooth stack state. A proper reconnect handler with retries and event-driven logic would be more appropriate as a future plugin.

Kind Regards,

Device 41:42:67:01:D0:10 (public)
Name: AR
Alias: AR
Appearance: 0x0180 (384)
Paired: yes
Bonded: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
UUID: Human Interface Device (00001812-0000-1000-8000-00805f9b34fb)
UUID: Unknown (0000ff12-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific (5de20000-5e8d-11e6-8b77-86f30ca893d3)
UUID: Vendor specific (cfbfa000-762c-4912-a043-20e3ecde0a2d)
UUID: Vendor specific (fe151500-5e8d-11e6-8b77-86f30ca893d3)
Modalias: usb:v0171p041Ed0037

This is already connected.

Device 41:42:67:01:D0:10 (public)
Name: AR
Alias: AR
Appearance: 0x0180 (384)
Paired: yes
Bonded: yes
Trusted: yes
Blocked: no
Connected: no
LegacyPairing: no
UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)
UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb)
UUID: Human Interface Device (00001812-0000-1000-8000-00805f9b34fb)
UUID: Unknown (0000ff12-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific (5de20000-5e8d-11e6-8b77-86f30ca893d3)
UUID: Vendor specific (cfbfa000-762c-4912-a043-20e3ecde0a2d)
UUID: Vendor specific (fe151500-5e8d-11e6-8b77-86f30ca893d3)
Modalias: usb:v0171p041Ed0037

This is right after the boot.

  1. No.
    sudo evtest

No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0: ADS7846 Touchscreen
Select the device event number [0-0]:

Remote device do not listed and do not send keystrokes.

  1. No. Device is not connected.

  2. No. After the scan on I have to push any button on remote to connect remote control.

Hey @VictorDUA,

Thanks for confirming those details. Based on your latest test:

  • The remote does not appear under /dev/input unless manually reconnected
  • It does not send any input or keystrokes until after a connection is re-established
  • The remote only connects after running scan on and pressing a button

This confirms that your remote:

  • Does not stay connected or auto-reconnect after reboot
  • Requires an active scan from the host to become visible
  • Needs a button press to trigger advertising or wake from sleep

This class of behavior is common in energy-saving Bluetooth remotes. Unfortunately, it means:

  • A simple connect command won’t succeed unless the device is already visible
  • Reconnect logic must include scan on, wait for presence, then connect
  • The remote may not become discoverable without manual interaction (button press)

Such dynamic behavior is not safely automatable using a static script. Handling this properly would require:

  • Running a periodic background scan
  • Detecting presence of the remote
  • Issuing connect only after the remote is awake
  • Possibly retrying in intervals

This is exactly the kind of logic that should be implemented via a dedicated plugin or background daemon, with proper device awareness.

For now, manual recovery via:

bluetoothctl
scan on
[press a button on remote]
connect XX:XX:XX:XX:XX:XX

is the only reliable method.

Kind Regards,

Do not work.

connect XX:XX:XX:XX:XX:XX - not needed. Only bluetoothctl + scan on + button

Maybe it’s a boot script that does two things:

  1. bluetoothctl
  2. scan on
    then to enable remote control I’ll only need to press a button.
    Although it probably doesn’t work that way, otherwise it would be easy?
    Thanks.

Understood. Here is the updated version of /usr/local/bin/bt-remote-reconnect.sh that includes an active scan before attempting to connect:

#!/bin/bash

MAC_FILE="/data/bt-remote.mac"

if [ -f "$MAC_FILE" ]; then
    MAC=$(cat "$MAC_FILE" | tr -d '\r\n')
    if [ -n "$MAC" ]; then
        echo "Starting Bluetooth scan..."
        echo -e "scan on\nexit" | bluetoothctl > /dev/null

        echo "Waiting for remote to wake up..."
        sleep 10

        echo "Attempting to reconnect to $MAC"
        echo -e "connect $MAC\nexit" | bluetoothctl
    else
        echo "MAC address in $MAC_FILE is empty."
    fi
else
    echo "MAC file $MAC_FILE not found."
fi

Notes:

  • This script initiates scan on, waits 10 seconds, then tries to connect.
  • This remains experimental and untested. Some remotes still require a manual button press to wake and begin advertising.
  • Adjust the sleep 10 delay if your remote needs more or less time to become discoverable.

Kind Regards,

Looks like it is working. From start Volumio to start Remote around 10-30 seconds. Thanx. I’ll test it more carefully.

Did something went wrong with Image V4.017.
Tried to flash on 3 different USB’s, all error out with:

image

Dear @VictorDUA , dear @nerd ,
my (very simple) HID-remote does survive reboots (if reboots happen :slight_smile: ) and even system upgrades.
But I have used the “connect” command during pairing process.(at the end of command-chain)

Regards,
Ralf