It should but it apparently never worked well with the Playbar.
Not easy to help without owning such a model, I already tried several times.
If you have the knowledge to deploy a specific version with additional logs and report the results, we can try again.
I have the Beam, not the Playbar. I can deploy a specific jar in the right folder and use that to test it. I can report the logs from my log files. Would that suffice?
Ideally, you should run a 2.5 version of openHAB. It could run too with a version 2.4 but I am not sure.
To update your binding:
1 - download the following Sonos jar file and put it for example in directory /home/pi (don’t put it in your openHAB addons folder).
2 - run the following command in the openHAB console to get your bundle id: bundle:list -s | grep sonos
3 - run the following command to replace your Sonos binding, assuming the previous command returned 245: bundle:update 245 file:///home/pi/sonos.jar
All the logs I added are at INFO level and contain the string “Beam_LineIn”, so you have no level to update.
After a restart of the bundle, please provide the log entries containing “Beam_LineIn”.
Now select with the Sonos app the TV input for your Beam device. Please provide the new log entries containing “Beam_LineIn”.
Now try a notification. Please provide the new log entries containing “Beam_LineIn”.
Interesting, I was expecting a different problem. It looks like the binding is correctly detecting that you are listening the TV input. The problem is that the notification sound is apparently not started and after 20 seconds, the TV sound is restored.
Can you at least confirm that the TV sound is correctly restored after the 20 seconds ?
I just uploaded a new jar file with additional traces, can you please try again ?
I suspect that the problem is that the binding is first trying to stop the audio from the current source, the TV input in your case. For an unexplained reason, maybe the state remains in PLAYING state. I will probably see what is going wrong with the new traces.
That doesn’t seem to be working, this is my rule for a test switch:
rule "Switch Sonos Beam to TV line in"
when
Item Sonos_LR_PlayTV received update
then
logInfo("Sonos Rule","is it working?")
Sonos_LR_TVLinein.sendCommand("lr")
end
lr is the Thing ID of the Beam.
item: String Sonos_LR_TVLinein "Play TV sound" (gSonos {channel="sonos:BEAM:lr:playlinein"}
The line-in is not played because the binding is detecting no connected line-in.
Strangely in your previous logs, I see that a connected digital line-in is correctly detected. Strange.