[SOLVED] Sonos Binding -> Beam play notification while playing TV Source

Ok, please try again with the last uploaded sonos.jar, I hope the notification problem could be fixed now with the change I have done.

For the second problem, please wait a little after the start before using the playlinein channel, and check in your logs if you find some log entries containing “AudioIn”. I updated one of the log to get just an additional info. So provide logs again.

Some added logs have now be suppressed.

Sent you the new logs, the notification was not played yet.

The second problem I’ll get back to you tomorrow.

Thanks for your support so far.

Still the same problem !
What happens in the Sonos App when you push pause while the TV sound is played ? Is the state changed ?
I could consider aborting the stop or pause earlier, in case it does not work.

This is working now. See below logs after I pushed the switch:

> 2019-09-13 22:57:03.022 [INFO ] [se.smarthome.model.script.Sonos Rule] - is it working?
> 2019-09-13 22:57:03.035 [INFO ] [s.internal.handler.ZonePlayerHandler] - Beam_LineIn playLineIn command lr
> 2019-09-13 22:57:03.036 [INFO ] [s.internal.handler.ZonePlayerHandler] - Beam_LineIn playLineIn coordinatorHandler sonos:Beam:lr
> 2019-09-13 22:57:03.036 [INFO ] [s.internal.handler.ZonePlayerHandler] - Beam_LineIn playLineIn remoteHandler sonos:Beam:lr
> 2019-09-13 22:57:03.037 [INFO ] [s.internal.handler.ZonePlayerHandler] - Beam_LineIn isOpticalLineInConnected stateMap.get("TOSLinkConnected") true returns true
> 2019-09-13 22:57:03.093 [INFO ] [s.internal.handler.ZonePlayerHandler] - Beam_LineIn setCurrentURI x-sonos-htastream:RINCON_347E5C9180A201400:spdif
> 2019-09-13 22:57:03.395 [INFO ] [s.internal.handler.ZonePlayerHandler] - Beam_LineIn onValueReceived 2 sonos:Beam:lr AVTransport CurrentURI = x-sonos-htastream:RINCON_347E5C9180A201400:spdif
> 2019-09-13 22:57:03.396 [INFO ] [s.internal.handler.ZonePlayerHandler] - Beam_LineIn onValueReceived 2 sonos:Beam:lr AVTransport CurrentTrackURI = x-sonos-htastream:RINCON_347E5C9180A201400:spdif
> 2019-09-13 22:57:03.396 [INFO ] [s.internal.handler.ZonePlayerHandler] - Beam_LineIn onValueReceived 2 sonos:Beam:lr AVTransport CurrentTrackMetaData = <DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><item id="-1" parentID="-1" restricted="true"><res protocolInfo="x-sonos-htastream:*:*:*">x-sonos-htastream:RINCON_347E5C9180A201400:spdif</res><r:audioInputIcon></r:audioInputIcon><r:streamInfo>21</r:streamInfo><dc:title> </dc:title><upnp:class>object.item</upnp:class><r:episodeNumber>0</r:episodeNumber></item></DIDL-Lite>
> 2019-09-13 22:57:07.423 [INFO ] [s.internal.handler.ZonePlayerHandler] - Beam_LineIn onValueReceived 2 sonos:Beam:lr AVTransport CurrentTrackMetaData = <DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"><item id="-1" parentID="-1" restricted="true"><res protocolInfo="x-sonos-htastream:*:*:*">x-sonos-htastream:RINCON_347E5C9180A201400:spdif</res><r:audioInputIcon></r:audioInputIcon><r:streamInfo>22</r:streamInfo><dc:title> </dc:title><upnp:class>object.item</upnp:class><r:episodeNumber>0</r:episodeNumber></item></DIDL-Lite>

You cannot push pause in the App, as it is ‘greyed’ out, it is just the TV source that is shown there, and the options to enable/disable Nightmode and Speech enhancement.

So for playlinein channel is working, you just have to wait for the full initialization.

For the notification while the TV is playing, without the ability to stop, I have to find a solution, probably by aborting the stop after few seconds.

And btw, yesterday I upgraded to M3.

Looking at the documentations, I see that Playbar and Playbase have an optical input while the Beam has a HDMI input.
I would be curious to know if the stop command is available with the Playbar and Playbase.
I will change the behavior at least for the Beam.

@Maurits28 : can you try again the notification with the last uploaded sonos.jar please ?

Hi, tested it and it is working!
I’ve sent you the logs per DM.

What does full initialization mean in this context?

Excellent. Logs look as expected.
I will push a fix. I hesitate to apply the same fix for Playbar and Playbase.

When the binding is started, each thing is registering to services from the Sonos device and once done the Sonos device send information to the binding (like for example whether the line-in is connected). It can take few seconds.

Ok that makes sense.

I just wanted to mention here that I really appreciated your support, and it is a great example of what this community is made of (and capable of).

And let me know in the future if I can support with specific testing for the Beam.

Thanks again!

PS any way how I can switch off the extensive logging?

Here is the PR for the fix:

Please find a jar in the PR (of course without the additional logs). Of course, unzip the file.

Yes, I thought about that later. I installed it already. Thanks!
:+1:

I will inform you as soon as the fix is included in the 2.5 snapshots. You can certainly expect it in future 2.5 M4.

I have the playbar. If you want me to test anything, let me know

Yes I would like to know if you have any problem to play a notification (TTS) when you are listening your TV through the line-iin?
In the Donos App, are you able to stop or pause the TV line-in?

I’ll install the binding tomorrow and give it a try.
In the mean time: I can’t stop or pause the TV line-in. See below for a screenshot from my android phone.

So it is more than probable that the same fix is required for Playbar too.