Multiple squeezelite instances, bluetooth speakers #242
Replies: 20 comments 17 replies
-
Hello, you are using SQUEEZELITE_MODE=PULSE so the variable SQUEEZELITE_AUDIO_DEVICE has no effect here. As an alternative, you can try using alsa mode, but I don't have any experience about this with bluetooth devices, and if you are running a desktop the benefit would be limited. In any case, can you post the result of
when the bt speakers are connected? |
Beta Was this translation helpful? Give feedback.
-
Also maybe try to run:
then try to run:
so we can see if some devices are listed. |
Beta Was this translation helpful? Give feedback.
-
I'm on a Raspberry Pi 3B+ without a desktop environment Then I tried
Which did not work. I found in random github issues that bluealsa might need installed in the container so its alsa libraries are available to be used. However, the error I got was The container is privileged, and I also tried mounting the following: volumes: In all these cases the same playback error appeared when trying to start up the container, and it kept rebooting every time this error appeared I'm going to get another SD card to setup pulseaudio on it so I can more easily test without having to install/reinstall things aplay -l will only show the hardware connected devices, it won't show anything that's in bluetooth. To list bluetooth devices you usually need to use bluealsa or pulseaudio's pactl I tried setting the sink with pactl but squeezelite did not appear in there, maybe I'll need to actually try playing something to properly see it |
Beta Was this translation helpful? Give feedback.
-
Ok understood, I assumed it was a desktop because I saw that SQUEEZELITE_MODE=PULSE. Another repository I found is this one but it looks a bit outdated, last commit is 3 years ago. Also it would look very complicated to bring all of this in the container image. About your test, when you used |
Beta Was this translation helpful? Give feedback.
-
I got aplay playing by default to the bluetooth speaker when just doing The container unfortunately crashes after checking if the variables are specified:
This is my compose:
|
Beta Was this translation helpful? Give feedback.
-
Hello, did this work? Thank you |
Beta Was this translation helpful? Give feedback.
-
Got some more time to try this out and I have some great news, got it working without needing to custom compile anything! After running Changing my /etc/asound.conf inside the container used a different bluetooth speaker! I had a bunch of stuff mounted, but after some more testing this works fine:
I did not manage to test multiple instances at once with different speakers, that's next, but I don't have time anymore today, maybe someone else can try it out I am currently running this with a custom image and it's working flawlessly
EDIT: Here's the compose too
|
Beta Was this translation helpful? Give feedback.
-
Hello, nice to hear that. What would be the content of that asound.conf file? Also, how can we support this configuration? The only thing I would not like to do is include these packages in the main build. But I can maybe offer the possibility to build a custom image using build.sh which will include the packages. What do you think? |
Beta Was this translation helpful? Give feedback.
-
I don't mind now as I already make a bunch of custom images, but for users not very experienced with Docker it might be better to have a bluetooth tag, e.g giof71/squeezelite:latest-bluetooth The asound.conf file
You just need to replace the MAC with the one of your specific Speaker. I don't think the hint is actually necessary, that could be removed |
Beta Was this translation helpful? Give feedback.
-
Ok I will try it myself then write something, maybe I can also add the image to the builds. We'll see |
Beta Was this translation helpful? Give feedback.
-
Just tested with 2 speakers on a single pi3B+ on wifi using its built in bluetooth and it works flawlessly. Let me know if I can help with testing, documentation or anything else! Here's an image with the above changes if anyone wants to try it out ghcr.io/barrelltitor/squeezeblue though I'd recommend trying to build it yourself to learn, it's really easy! |
Beta Was this translation helpful? Give feedback.
-
Hello, thank you. I will try asap |
Beta Was this translation helpful? Give feedback.
-
Hello, sorry for the long delay. The main problem is that I don't have a lot of bluetooth devices... just one crappy usb key and a Pi3 with moode audio installed working also as a bluetooth renderer. But that is in the living room. So it's quite difficult to make progress for me. |
Beta Was this translation helpful? Give feedback.
-
Works, though having to install the libraries on every container (re)creation isn't really ideal. I have 2 of these speakers on the same device and will try getting a third one, so an update will result in 3 installs for the same files on a single machine. Would prefer to avoid unnecessary operations on the microsd and the ability to recreate the container without internet access |
Beta Was this translation helpful? Give feedback.
-
I'm also getting quite a lot of unhandled grfe in the logs, not sure what that's from though, I think I've seen that error before switching to bluetooth as well |
Beta Was this translation helpful? Give feedback.
-
Ok... let me think about a solution. I currently have "vanilla" builds, which install squeezelite from the repos, and another set of builds which use sourceforge binaries. I added lately the r2 variant, mostly useless as that functionality is included with the sourceforge versions. About you latest post, what do you mean by "unhandled grfe" ? Not sure :-) |
Beta Was this translation helpful? Give feedback.
-
Hello, I have created a build for bluetooth, see here |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
The image with bluetooth libraries is this one: giof71/squeezelite:feature-f277b2-debian-alsa-bt-squeezelite-1.9.9 |
Beta Was this translation helpful? Give feedback.
-
About the warning... here's where it's created: I am not sure about the version. |
Beta Was this translation helpful? Give feedback.
-
Hey, I'm trying to run two squeezelite instances on the same machine that has two connected Bluetooth speakers.
I tried setting the audio device as such - SQUEEZELITE_AUDIO_DEVICE=bluez_sink.44_07_0B_44_CB_15.a2dp_sink for one of them, and with the other MAC for the other squeezelite container
Both of them are playing through the exact same sink, and the logs show that -o wasn't added:
[/app/bin/squeezelite-pulseaudio -s 192.168.88.196 -n "Kitchen Speaker" -C 2 -r 44100 -e dsd]
Any idea what I'm doing wrong? Here's my full compose:
`version: "3"
services:
squeezelite-my-usb-dac:
image: giof71/squeezelite:stable #tried latest as well
container_name: kitchen-speaker
privileged: true
volumes:
- /run/user/1000/pulse:/run/user/1000/pulse
cap_add:
- NET_RAW
- NET_ADMIN
environment:
- SQUEEZELITE_MODE=PULSE
- SQUEEZELITE_NAME=Kitchen Speaker
- SQUEEZELITE_SERVER_PORT=192.168.88.196
- SQUEEZELITE_AUDIO_DEVICE=bluez_sink.44_07_0B_44_CB_15.a2dp_sink
restart: unless-stopped
`
Beta Was this translation helpful? Give feedback.
All reactions