Bluetooth Speaker Plugin

Discuss, contribute and orient Volumio development!

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

Bluetooth Speaker Plugin

Postby seurat » Sat Jan 12 2019 15:29

Hi forum members,

I'm happy to report that I have a new RPI 3 A+ set up for streaming to A2DP speakers and things are working except for volume control from the Volumio GUI.
MPC volume control works fine and I use M.A.L.P from my SmartPhone to play songs, etc.
Can someone guide me to the corresponding documentation that will help me understand how to get the GUI volume control to use MPC to set the volume?

Regards,

Seurat
User avatar
seurat
Fresh off the boat
Fresh off the boat
 
Posts: 4
Joined: Sat May 13 2017 05:28
Location: Germany

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


Bluetooth Speaker Plugin

Postby anz » Thu Feb 21 2019 10:43

geeks-r-us wrote:Sorry for the log absence, but work and other projects took a lot of time.

But there also good news:
yesterday I started a PR for changes in Volumio UI to integrate the needed features for pairing devices in the web interface.
When this is integrated I'll release an improved version of the plugin to the official repository to ease installation.


Hello,

Few months has been passed since this positive news, that Bluetooth control will be integrated to the Volumio UI.
Is there any progress you could share, geeks-r-us?

I am in the middle of integrating Volumio to my home audio system, but as Bluetooth connectivity is mandatory on this case, I am really interested in to this feature.

Thank you in advance!
Random avatar
anz
Fresh off the boat
Fresh off the boat
 
Posts: 1
Joined: Thu Feb 21 2019 10:39


Bluetooth Speaker Plugin

Postby urosh » Sun Mar 10 2019 15:35

Hi.

I am trying last two days to get this working, but it does not want to.
During the script install I get this error: Building Bluez-Alsa
aclocal: warning: couldn't open directory 'm4': No such file or directory
And at the end when I make all of the steps, I can connect to my BT speaker, it is also connected, but it does not want to play any music. It play on the audio jack, but nothing over BT.

Do you have any idea what could be wrong?

Also if I try to install the plugint over the UI it does not work. It says that the plugin ca not be started and in the settings there is nothing.

Any idea would be great.

Volumio version 2.522

Thank you, Uros
Random avatar
urosh
Fresh off the boat
Fresh off the boat
 
Posts: 2
Joined: Sun Mar 10 2019 15:32


Bluetooth Speaker Plugin

Postby Fosphatic Duke » Sun Mar 17 2019 09:51

urosh wrote:Hi.

I am trying last two days to get this working, but it does not want to.
During the script install I get this error: Building Bluez-Alsa
aclocal: warning: couldn't open directory 'm4': No such file or directory
And at the end when I make all of the steps, I can connect to my BT speaker, it is also connected, but it does not want to play any music. It play on the audio jack, but nothing over BT.

Do you have any idea what could be wrong?

Also if I try to install the plugint over the UI it does not work. It says that the plugin ca not be started and in the settings there is nothing.

Any idea would be great.

Volumio version 2.522

Thank you, Uros


Hi There,

well I'm on latest available volumio version and the plugin still works like a charm. Do you followed the tutorial how-to what I have provided in this thread? If not I would suggest you to follow it, at least it should lead to the usable result, well at least as long you don't fear the shell. :)

Regards

Fossy
User avatar
Fosphatic Duke
Fresh off the boat
Fresh off the boat
 
Posts: 6
Joined: Fri Aug 31 2018 16:25


Bluetooth Speaker Plugin

Postby urosh » Wed Mar 27 2019 10:06

Fosphatic Duke wrote:
urosh wrote:Hi.

I am trying last two days to get this working, but it does not want to.
During the script install I get this error: Building Bluez-Alsa
aclocal: warning: couldn't open directory 'm4': No such file or directory
And at the end when I make all of the steps, I can connect to my BT speaker, it is also connected, but it does not want to play any music. It play on the audio jack, but nothing over BT.

Do you have any idea what could be wrong?

Also if I try to install the plugint over the UI it does not work. It says that the plugin ca not be started and in the settings there is nothing.

Any idea would be great.

Volumio version 2.522

Thank you, Uros


Hi There,

well I'm on latest available volumio version and the plugin still works like a charm. Do you followed the tutorial how-to what I have provided in this thread? If not I would suggest you to follow it, at least it should lead to the usable result, well at least as long you don't fear the shell. :)

Regards

Fossy


Hi, yes I did follow the instructions. Actually several times :) And yes, I tried it over ssh as well as over the Web. No luck for me it seems... :(

Will try it out once more time.

Thanks!
Random avatar
urosh
Fresh off the boat
Fresh off the boat
 
Posts: 2
Joined: Sun Mar 10 2019 15:32


Bluetooth Speaker Plugin

Postby LordMM » Sat Mar 30 2019 09:27

Hi,

Are there any news about the UI integration into Volumio UI.

This is a great improvement for Volumio ... but it seems that it tooks too many time to get it officially integrated.

Regards

Jürgen
Raspberry PI 3 + Hifiberry Digi+ Running Volumio 2
Raspberry PI 2 running Kodi
Raspberry PI 3 running Raspbian
Random avatar
LordMM
Sunday DIYer
Sunday DIYer
 
Posts: 11
Joined: Tue Nov 04 2014 17:03


Bluetooth Speaker Plugin

Postby maverick » Mon Apr 01 2019 19:10

I just want to confirm, that I managed to get it work with a slightly modified variant of the instructions posted by "Fosphatic Duke" :D

I am using Volumio 2.565 on raspi 3...

I had to change the posted installation script in line 21:
Code: Select all
#!/bin/bash

echo "Installing Bluetooth Dependencies"
sudo apt-get update
sudo apt-get install -y libasound2-dev dh-autoreconf libortp-dev bluez pi-bluetooth bluez-tools libbluetooth-dev libusb-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev libsbc1 libsbc-dev

echo "Cloning Bluez-Alsa repo"
cd /tmp
git clone -b v1.2.0 --single-branch https://github.com/Arkq/bluez-alsa.git

echo "Building Bluez-Alsa"
cd bluez-alsa
autoreconf --install
mkdir build && cd build
../configure --disable-hcitop --with-alsaplugindir=/usr/lib/arm-linux-gnueabihf/alsa-lib
make

echo "Installing Bluez-Alsa"
sudo make install

sudo cat > /lib/systemd/system/bluezalsa.service <<EOC
[Unit]
Description=BluezAlsa proxy
Requires=bluetooth.service
After=bluetooth.service
[Service]
Type=simple
User=root
Group=audio
ExecStart=/usr/bin/bluealsa --disable-hfp
[Install]
WantedBy=multi-user.target
EOC

sudo systemctl daemon-reload
sudo systemctl enable bluezalsa.service

#requred to end the plugin install
echo "plugininstallend"


In addition I didn't have to create a .asoundrc - I modified the mpd.conf.tmpl with the following modified statements:
Code: Select all
audio_output {
    type "alsa"
    name "Logitech BT Adapter"
    device "bluealsa:HCI=hci0,DEV=xx:xx:xx:xx:xx:xx,PROFILE=a2dp"
    mixer_type "software"
}


Don't forget the pair-and-trust-stuff:
Code: Select all
    bluetoothctl
    [bluetooth]# power on
    [bluetooth]# agent on
    [bluetooth]# default-agent
    [bluetooth]# scan on
    [NEW] Device xx:xx
    [bluetooth]# pair xx:xx
    [bluetooth]# trust xx:xx
    [bluetooth]# connect xx:xx
    [bluetooth]# exit


This solution was inspired by comments on https://geeks-r-us.de/2017/08/18/bluetooth-a2dp-lautsprecher-am-raspberry-pi/

One aspect I struggled with:
To test the playback within Volumio, it is necessary to stop and start the stream after restarting the mpd deamon....
...to test the pure bluetooth connection, use aplay with a wav file:
Code: Select all
aplay -D bluealsa:HCI=hci0,DEV=xx:xx:xx:xx:xx:xx,PROFILE=a2dp testfile.wav


Have fun! :D
Random avatar
maverick
Fresh off the boat
Fresh off the boat
 
Posts: 2
Joined: Mon Apr 01 2019 18:51


Bluetooth Speaker Plugin

Postby themastermonkey » Wed Apr 03 2019 19:44

Thanks maverick, but when i test it with the aplay command it is working. But in Volumio when i start a stream/song there is no sound.
Do i need select the device some where ?
Random avatar
themastermonkey
Fresh off the boat
Fresh off the boat
 
Posts: 1
Joined: Wed Apr 03 2019 19:42


Bluetooth Speaker Plugin

Postby maverick » Fri Apr 05 2019 18:28

themastermonkey wrote:Thanks maverick, but when i test it with the aplay command it is working. But in Volumio when i start a stream/song there is no sound.
Do i need select the device some where ?


No, you don't have to select the device - it will just "copy" the output to the bluetooth device within alsa. I am using the audio-jack as output device within volumio.

Some things you can double-check:
- Did you reboot the pi and tested again?
- Did you modify the file "mpd.conf.tmpl"?
- Did you replace the placeholder xx:xx... with the correct address of your device? (the same you used for aplay)
- Please check the (generated) file /etc/mpd.conf - your modifications should be placed there automatically. If not, edit it manually according to the template and restart the mpd deamon.
- Maybe the device is disabled or muted within alsa - you can use the mixer to check that - I don't know the concrete commands - but google will... ;)

I hope, these hints will help you a little bit further...
...good luck and best wishes for success!

One more aspect:
According to some other forum posts - this solution will not work for spotify...
Random avatar
maverick
Fresh off the boat
Fresh off the boat
 
Posts: 2
Joined: Mon Apr 01 2019 18:51


Bluetooth Speaker Plugin

Postby Tigger007 » Sun May 12 2019 11:56

solved - only volume setting is not possible - not an Bluetooth box, not on webfront
Last edited by Tigger007 on Sun May 12 2019 20:13, edited 1 time in total.
Random avatar
Tigger007
Fresh off the boat
Fresh off the boat
 
Posts: 2
Joined: Sun May 12 2019 11:55

PreviousNext

Return to Development talks

Who is online

Users browsing this forum: No registered users and 2 guests