Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

[sonos] media channel WARN messages while thing is not added #4850

Closed
lsiepel opened this issue Jan 4, 2018 · 3 comments
Closed

[sonos] media channel WARN messages while thing is not added #4850

lsiepel opened this issue Jan 4, 2018 · 3 comments

Comments

@lsiepel
Copy link

lsiepel commented Jan 4, 2018

The sonos binding shows warnings in the log while the corresponding thing is not yet added from the inbox (or in my case is hidden in the inbox).
I have a Playbar with two play 1's as left/right rear. The Playbar is added as Thing in openhab, the Play 1's are not. All works as expected except for these WARN messages in the log. The RINCON points to both play 1's. And that is a bit strange, because they are not used in openhab. No thing, no channels.

As far as i know there are two different warnings added to the log every time a different track is played on the Sonos Playbar:

[WARN ] [s.internal.handler.ZonePlayerHandler] - Cannot update media data for group member (Could not find handler for RINCON_XXXXXXXXXXXXX)
[WARN ] [s.internal.handler.ZonePlayerHandler] - Cannot update channel for group member (Could not find handler for RINCON_XXXXXXXXXXXXX)

This is with build 1162 and when i check my logs, this is happening for months, can't determine with what build it was introduced.

@lolodomo
Copy link
Contributor

lolodomo commented Jan 6, 2018

This warning happens when the group master is not attached to a thing. As an example, you send a command "NEXT" to the Sonos group, this command has to be handled by the group master. If this Sonos master is not attached to a thing, the binding is not able to send this command.
The recommendation is to declare a thing for each Sonos device that could become a group master in your house.
Now we can just discuss if WARNING is not a too much high level for such problem. Maybe a DEBUG level would be more appropriate but in this case we will not see this log by default and users will complain that commands are not handled. Maybe INFO is the right level in this case.

@lsiepel
Copy link
Author

lsiepel commented Jan 6, 2018

The Sonos Playbar is added as a Thing and it is the group master. I can control the Sonos from openhab, all commands work as expected.

These two Play 1's are not added because i don't need to control them, so i still don't see why it would log anything at all.

Maybe a DEBUG level would be more appropriate but in this case we will not see this log by default and users will complain that commands are not handled.

Offcourse it should log a warning when a command is send and it can't be handled. But that is not the case, i don't send any command to these Play 1's.

@lolodomo
Copy link
Contributor

lolodomo commented Jan 6, 2018

Oups, you're right, looking again at your logs, the problem is more that the binding tries to update all group members, for example the currently track information. As you have not these things, there is a log message.
But in this case (group slaves), I agree that we should just ignore them if the thing does not exist.
I will think about a fix.

kaikreuzer pushed a commit that referenced this issue Jan 9, 2018
Fixes #4850

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
dgajic pushed a commit to dgajic/smarthome that referenced this issue Jan 27, 2018
Fixes eclipse-archived#4850

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants