Cloud-Platform icon indicating copy to clipboard operation
Cloud-Platform copied to clipboard

Sonos Block - Group changes on its own

Open pikuoff opened this issue 2 years ago • 5 comments

Describe the bug My Sonos block "Group" keeps changing to the first input that populates the dropdown, no matter how many times I change it back to the desired "Group". After some time, likely because of adding my desired "Group" to other speaker groups throughout my Sonos usage, the Sonos block goes blank and I have to go back into settings and change it back to my desired "Group".

To Reproduce Steps to reproduce the behavior:

  1. Go to Sonos block settings
  2. Click on Group and select desired Group to show on Dakboard
  3. In Sonos, add Group to other speaker groups (normal usage)
  4. Eventually, the Sonos block disappears from Dakboard
  5. Go into Sonos block settings
  6. Group dropdown has changed

Expected behavior Sonos block settings should not change from desired Group, even though Groups get combined and changed during normal Sonos speaker usage.

Additional context This issue was reported in the Dakboard subreddit over a year ago so but did not see any mentions of it here. https://www.reddit.com/r/dakboard/comments/kx7hq4/sonos_block/

pikuoff avatar Apr 14 '22 12:04 pikuoff

Hi @pikuoff,

Reviewing Sonos API does reveal a challenge in resolving this issue. Each time a group is modified by adding or removing a speaker which as you indicate happens frequently, the Group ID and name change. When this occurs our call we make that is looking at your configured group is incorrect as you have indicated. Since both the ID and the name changes, we cannot redirect ourselves to the group entity automatically that you desire for this to work in the way that you expect it to unfortunately.

We do have a proposed path forward in another direction which we feel may resolve this in a round about way. Our current plan is to provide an automatically selected group in the drop down labeled Automatic, where we will display the group that is actively playing music irregardless of its group name. We feel this solves for this use case for most users, who are desiring to see what is actively playing irregardless of the selected group.

cocarrig avatar Jul 13 '22 18:07 cocarrig

@cocarrig, I think that path forward would work for most cases. Would it be possible to also have the option to manually type the name of the desired group? I've used the following api for a different project where I wanted to specify a particular group:

https://github.com/hankhank10/music-screen-api

The above api could be useful for debugging the artwork display issue in https://github.com/dakboard/Cloud-Platform/issues/1377 because my project using it did not have the same issue I have with displaying artwork from Amazon Music on Dakboard's api.

Thanks for looking into it!

pikuoff avatar Jul 13 '22 18:07 pikuoff

Hi @pikuoff since we always get the most up to date names, I'm wondering what the specific use case would be for typing in the names would be in your suggestion if you can elaborate on that?

Since we render the image in the cloud we take a different path than the solution you shared for #1377. In the same network is therefore possible to resolve the intranet addresses and locations for the image for the album on the player. Our challenge exists primarily in understanding why some players link the content via the intranet address to themselves or internet routable ones, which is dependent upon the hardware version it seems. Getting helpful information from Sonos on the root cause of this has been tough.

cocarrig avatar Jul 13 '22 19:07 cocarrig

Hi @pikuoff since we always get the most up to date names, I'm wondering what the specific use case would be for typing in the names would be in your suggestion if you can elaborate on that?

@cocarrig, my suggestion is mostly to prevent any changing. My use case is that my Dakboard is in my kitchen, which also has a Sonos speaker in it. When I am playing music on that speaker, I'd like the artwork to show on the Dakboard. Personally, I don't care to show the artwork for what is playing on my Sonos speakers located in other rooms. I just want to see what is playing in the room that my Dakboard is located. The other api I linked didn't have a issue with the adding/removing speakers from groupings, as far as I remember. That particular program has the user input the name manually to set a variable, so that's another reason why I mentioned that as an option. Manually entering isn't a feature request from me, I was just mentioning this as a possible workaround to the issue.

Since we render the image in the cloud we take a different path than the solution you shared for #1377. In the same network is therefore possible to resolve the intranet addresses and locations for the image for the album on the player. Our challenge exists primarily in understanding why some players link the content via the intranet address to themselves or internet routable ones, which is dependent upon the hardware version it seems. Getting helpful information from Sonos on the root cause of this has been tough.

I mentioned #1377 b/c the other api that I linked seemed to have it figured out, as far as Amazon Music was concerned. I wasn't sure if it was worth looking into that api to see how they were getting the image path.

pikuoff avatar Jul 13 '22 20:07 pikuoff

Hi @pikuoff,

Thanks for clarifying on those items. We would keep the ability to select defined groups int he dropdown as well so you wouldnt need to type. The challenge is that a new ID is formed each time the group changes, perhaps this is handled differently when accessing the data on premise. We will review and see if we can get any takeaways from it and go from there.

Thanks!

cocarrig avatar Jul 13 '22 20:07 cocarrig

Revisiting this again and placing in project to gather LOE and complete if reasonable:

TASK: Adding a speaker group to Sonos labeled ‘Automatic’. The Automatic group will display the group currently playing music (Display multiple groups if available)

cocarrig avatar Jul 19 '23 14:07 cocarrig

Merged in @ 39c08d0 and added to the queue for upcoming release to the live site. Once released, the Sonos block will have an "Automatic" option available for selection, which will detect what Groups are currently active (playing), and display all of them (one at a time, with a fade-transition).

Dan-Peck avatar Aug 15 '23 15:08 Dan-Peck