Control the volume of the bluetooth device

  • I have created a script that automatically connects me to a bluetooth sound tower when Kodi has started and the add-on is ready to put the correct output audio.

    However, I would like to be able to modify the volume of the sound tower as well, which as I have read by the bluetooth specifications should be possible.

    I tried:

    Code
    dbus-send --system --print-reply --dest = org.bluez / org / bluez / hci0 / dev_XX_XX_XX_XX_XX_XX / fd0 org.bluez.Control.VolumeUp
    
    
    dbus-send --system --print-reply --dest = org.bluez / org / bluez / hci0 / dev_XX_XX_XX_XX_XX_XX org.bluez.Control.VolumeUp
    
    
    dbus-send --system --print-reply --dest = org.bluez / org / bluez / hci0 / dev_XX_XX_XX_XX_XX_XX org.bluez.MediaControl1.VolumeUp

    And a lot of other unsuccessful combinations.

    I have checked with this command:

    Code
    dbus-send --system --print-reply --dest = org.bluez / org.freedesktop.DBus.ObjectManager.GetManagedObjects

    That the "Volume" tag does not appear where it should appear.

    This is the output:

    I tried changing the volume in the tower (which causally had the value 15) to see if the Configuration array worked, but no, that value always contained 15, it was not the volume in principle.

    And I have investigated and it looks like a pulseaudio bug that has recently been fixed:

    bluetooth: Unify A2DP sink/source volumes with AVRCP Absolute Volume

    And after all this, two questions:

    - Do you know an alternative to change the volume of the connected bluetooth device and compatible with pulseaudio 12.2?

    - Can I upgrade the pulseaudio version in Librelec 9.2.6 without recompiling and building everything? And if not, if it is updated, do you know if something will break :) ?

    Thank you.

    • Official Post

    changing the volume in kodi will change the volume of pulseaudio which will change the volume of the hw (if available). Why do you want to do it directly?

    Updating pulseaudio will require recompiling LibreELEC.

  • changing the volume in kodi will change the volume of pulseaudio which will change the volume of the hw (if available). Why do you want to do it directly?

    I don't know how change de volume in Kodi. I changed it with my TV control on TV.

    However I have the sound duplicated in the sound tower, via bluetooth, and the television via HDMI with pulseaudio.

    So with the TV control I manage the volume of the television, and in the tower the volume of the tower. But I would like to automate it and adjust a volume on the tower when connected via bluetooth so I don't have to change that volume on the tower.

    I do not ask that it be synchronized with that of the television, since they have different volumes, only to be able to change the one of the tower with a script :)