Enabled Bluetooth Speaker/Headphone playback during Lightshow

Declined
#124 · Created  · Last updated

Declined pull request

Does not work on Stretch and there is a potentially more simple implementation on more recent OS.

Closed by: ·2018-09-21

Description

Hey Guys, I've been working on getting a way for us to be able to play the lightshow via bluetooth speaker and have finally got it working for a RPI 3, can't attest for any other devices. I have included a bluetooth directory in the tools directory.

The install works as the following:

sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get install git -y git clone https://bareinhard@bitbucket.org/bareinhard/lightshowpi.git cd lightshowpi sudo ./install # Once installation finished cd /home/pi/lightshowpi/tools/bluetooth sudo chmod +x configure ./configure # It takes a while, once done reboot ### Wait for reboot # pair, trust, and connect to bluetooth speaker sudo bluetoothctl #inside bluetoothctl power on agent on default-agent scan on pair XX:XX:XX:XX:XX trust XX:XX:XX:XX:XX connect XX:XX:XX:XX:XX exit # Now test the lightshow start_music_and_lights

I still haven't got a chance to hook up the board to my relay to ensure that music is synced or not, so thats possibly a current issue.

Concerns

  • Bluetooth delay causing lights to get out of sync from music

  • When on a pi3 or zero(untested), streaming bluetooth while on wifi gives choppy feedback which is a current issue for the OS as seen here. This can be solved with an external wifi adapter

  • More testing needed, it works fine for me on a headless setup with the latest Raspbian Jessie LITE downloaded here

  • Bluetooth Speaker need to be removed, paired, trusted, and connected again on each reboot

  • /etc/pulse/daemon.conf may need some configuration changes as playback speed might be an issue.

  • I have found that playback over pulseaudio causes issues as the sink-input begins to change sink-input #'s increasingly fast and causes the lightshow to play music at a freakishly fast speed rendering it almost inaudible. This will likely need more testing with daemon.conf to see what resample methods can be used or if its even possible.

Get back to alsa output

In order to cut pulseaudio out and use alsa without pulse audio again, follow the code below:

cd /home/pi/lightshowpi/tools/bluetooth sudo chmod +x * ./disable_bt.sh sudo systemctl disable pulseaudio sudo systemctl stop pulseaudio

0 attachments

0 comments

Loading commits...