I’m using the Squeezebox binding version 2.4.0 on Openhab 2.4.0 (fresh apt-upgrade from today).
I successfully discovered and added my Squeezebox server and three players in PaperUI. I give different name to my players also in PaperUI. I set the player called “Bureau” as the default sink. I created a dummy rule to test my system. Here is my problem :
Test 1
rule "audioTest"
when
Item Test_Switch changed to ON
then
playSound("doorbell.mp3")
end
Works well and I here the sound.
Test 2
I try to specify the sink in the playSound command :
rule "audioTest"
when
Item Test_Switch changed to ON
then
playSound("Bureau", "doorbell.mp3")
end
Does not work and I get the error message :
Failed playing audio stream ‘org.eclipse.smarthome.core.audio.FileAudioStream@1cc15ac’ as no audio sink was found.
Test 3
I try this trick :
rule "audioTest"
when
Item Test_Switch changed to ON
then
var string Bureau = "squeezebox:squeezeboxplayer:A1907868-9399-41A3-9314-3F67D47F91B4:685b35ad6be3"
playSound(Bureau, "doorbell.mp3")
end
and it works well and I here the sound.
Finally, I also tried to restart openhab and even reboot the pi, without success. It seems that the things defined in PaperUI is not visible in the Squeezebox scope. But when the default sink is set to “Bureau” in PaperUI the sound is played (test 1).
What did I do wrong ? Is PaperUI not the right tool to set up this binding ?
As you discovered, this won’t work. playSound requires the player Thing UID as the sink argument.
This isn’t a trick. It’s the way it’s designed to work.
I’m not sure what you mean by this. If you want to use a specific audio sink in the say and playSound commands, the sink argument needs to be the Thing UID (as shown in your Test 3).