Sonos – suddenly unreliable

We’ve had our Sonos system, connected via wifi, for 5+ years and it’s been rock solid until late January. Suddenly, through no changes to our wifi (router, router firmware, or connected devices) or Sonos system, it started being completely unreliable. This seems to have coincided with the S2 v14 release on 2022-01-25 but that could have been coincidence.

Examples of problems:

  • Speakers would disappear from the controllers (macOS & Android apps).
  • Speakers would stop playing but show as playing in the controllers.
  • Speakers would be playing but show as stopped playing in the controllers.
  • Speakers would not respond to play/stop input from the controllers.
  • Different controllers would show different speakers available.

I did the usual things of restarting the wireless router & restarting the speakers. At the recommendation of Sonos support I changed the wireless channel on my router. All of these worked for 30 or so minutes and then things went sideways again.

Finally, fed up with it all, we plugged a speaker directly into the router instead of having it connect over the wireless thus forming its own separate wireless network. Everything has worked perfectly since then.

This isn’t exactly convenient given where the wireless router is, but our Sonos system is once again functional instead of being a collection of 6 very expensive paperweights.

Sonos, Plex, and “Unable to browse music” on artist search

It’s taken me several months to connect the dots, but I’ve finally figured out why sometimes Sonos is unable to browse music from Plex artist search results. And it’s all about having multiple libraries in Plex.

The problematic behavior is this scenario:

  1. In the Sonos app, search for an artist on Plex
  2. Sonos shows the results successfully
  3. Click on the artist
  4. Sonos returns “Unable to browse music”

If, instead, you search for an album you can click on the results, see the tracks, and play the music. Sometimes this seems to work, sometimes it doesn’t, and it’s taken me months to find the pattern.

The problem is that my Plex system has two libraries: mine and my husband’s. Overall Sonos handles this well and we can play whatever music from whatever library.

But while artist searches are scoped to all libraries in Plex, browsing artist results is only scoped to the current Plex library. If the current Plex library contains the artist you can browse the search results. If not, you get the “Unable to browse music”. If you change the Plex source to the library with the artist it will work again.

I’m not certain if this is a limitation in the API that Sonos is using to interact with Plex, or if this is a bug in how Sonos is using that API, but knowing what the problem and how to work around it is a start.

Plex and Sonos

With the death of Google Play Music I needed another way of managing my music library and playing it through our Sonos system. We opted to go with Plex and in general it has been a good experience.

Plex

We have a Mac Mini hooked up to our TV for those times we want to watch something on YouTube or some other service that our not-very-smart TV doesn’t support. This was clearly the logical choice for the Plex server as it is always on and has worked really well.

I keep a copy of my music on my main laptop. Despite not using Music (formerly iTunes) to play music, I use it to manage my music on the filesystem. When I purchase music (now from Bandcamp or Amazon if I can’t find it there), I import it into Music and then run an rsync script to refresh the copy on the Mac Mini. Plex automatically picks up the changes and my music is ready for playing.

After some work I was able to import my playlists from Google Play Music (GPM) into Plex as well. See my GPM playlist reconstructor and Plex playlist importer gists for some python code to help get you going in the right direction.

Now I can access music, including all of my playlists, from my phone and any web browser.

Sonos

Being able to play my music through our Sonos system is one of my primary use cases and one of the reasons why YouTube Music is such a poor substitute for Google Play Music. Plex integrates nicely with Sonos without requiring a Plex Pass.

When I first got Plex and Sonos connected two months ago everything worked perfectly. Then a few weeks ago Sonos stopped reliably finding my music which was incredibly frustrating. When the Sonos couldn’t see the Plex library I was still able to access the library from the Plex mobile app and the web interface. Indeed, everything except Sonos seemed happy to talk to the library.

We did all of the usual things like rebooting the devices. I followed the Plex and Sonos troubleshooting docs both from Plex and from Sonos. I even tried upgrading the Sonos system from S1 to S2 to no avail.

Eventually I found this Plex on Sonos forum post which goes into a lot of details about the nuances of how the two devices connect. We had a 9-year-old Netgear WNDR4500 wireless router that in theory supported UPnP but it didn’t seem to be working to allow Sonos to reliably access the Plex library. I set up a manual port forward which seemed to make things slightly more reliable but didn’t fix the problem.

Eventually out of frustration I bought a brand new TP-Link AX1800 wireless router to replace the Netgear and suddenly everything just started working and has been rock-solid for a week now. No special configuration & no fuss.

So if you’re having trouble getting your Sonos to talk to your Plex library and are using an old wireless router, consider upgrading it.