[APP][Pro] Sonos (LocalAPI)

Hi Joka, what’s your use case for changing the SonosNet channel? Sonos allows it through the Sonos app as a troubleshooting setting, but it isn’t exposed through the API used by this app. It’s normally a one-time network setting that should only be changed when troubleshooting interference.

You are absolutely right and this is my usecase, sometimes the SonosNet interferences with my wifi. This results in delays between the grouped sonos players. Changing the channel solves this immediately. my idea was to say alexa to change the channel via a homey flow.

I understand. Unfortunately, changing the SonosNet channel isn’t available through the API. I would recommend assigning fixed channels to your access points and SonosNet so they don’t overlap and cause interference if possible.

To add to the above: changing WiFi-channels can also impact other devices/networks that use the 2.4GHz band, like Homey’s Zigbee network. Separation of channels is a key element to help ensure reliable coexistence of different networks on the 2.4GHz band. Whenever possible assign fixed non-overlapping channels.

I appreciate your suggestions, thx. However, I think I have covered everything regarding the best WiFi and Zigbee practices. However, Sonos sometimes interferes with other things. Maybe routers in the neighborhood which change their channel dynamically. I chose to change the Sonos channel because it is the simplest solution, even if it isn’t the best one.

Hello everyone,

With this app, I can only add each speaker individually as a new device. How can I pair a set of speakers (left and right) so that I can hear the left and right channel?

I’ve noticed that the search mode only finds one speaker for me. I have to add the rest individually by entering their IP addresses. Also, the correct icon isn’t always displayed.

I’m using Sonos One, Sonos One SL, Sonos Port and Ikea Symfonisk.

Thanks.

You can group speakers/rooms using the Group and Ungroup flowcards so that they play the same music in sync:


Note that if you want to create a stereopair (left and right speaker) of two individual Sonos speakers, this must be set up in the Sonos mobile app.

Hi @xiutit

I’m seeing frequent timeout of 5000ms exceeded errors when starting Plex playlists through the Favorite flow card. See:

I ran into similar issues a while ago with larger playlists taking a long time to load, so I limited all of my Plex smart playlists to around 500 songs. That made them usable enough in flows.

Since a more recent update, though — possibly around the time the 5-second timeout was introduced? — those playlists now seem to start successfully only about half the time, regardless of which speaker I use.

I did some testing, and starting a favourite containing one of these larger ±500-song playlists takes roughly 5 seconds on my setup. So it looks like it’s right on the edge: sometimes it completes in time, and sometimes it hits the timeout shown above.

So just an open question — and maybe I’m an edge case here — would it make sense to increase the timeout for these cards a little? 5 seconds seems quite tight for larger playlists.

I can of course reduce the playlist sizes further, and I’m not necessarily against that, but from a usability point of view it would be nice if larger playlists didn’t fail quite so inconsistently simply because there’s very little timing margin.

Thanks for looking into it!

I’ve increased the Sonos request timeout from 5 to 10 seconds in version 2.6.4(test). Can you test if that’s enough?

Wow, I forgot how fast you work! That seems to have done it:

I’ve tested a bunch and it seems like the “first” one you try to start (after a while, or possibly switching from TV/Radio mode to playlist mode?) always needs a bit more time (see image), the other ones I tested after this one all hovered around 5 seconds again.

Thank you for the fix, lifesaver!!!

I love this TTS option and it’s made me switch from the regular app to yours: thank you. Can you explain more about the cache? How big is it and does it work by recognising “exact text” or flow cards? My text is almost always supplied as a variable or tag to the flow card so just trying to understand if that will cause a fetch each time which tends to delay the speech by a second or two.

Also, if for any reason the internet is down and an Azure request would fail, does the app fall back to the Homey/Sonos voice or will the card fail?

I’m a bit lost. I have a Port connected to my record player. If it starts playing it automatically plays on the Livingroom set. I want to group it with the diningroom and kitchen automatically as well. I have no idea how to start. Can anyone help me?

Select the speaker you want to group with diningroom and kitchen, select the “group with” flow card.

Then you select your diningroom and kitchen speakers and they will group.

But with this flow it will do that always. I don’t want it to group while watching tv.

Add an AND Logic card before the grouping card:

  1. Select Logic → Text contains.
  2. Use the Track tag from the Living Room speaker as the text value.
  3. Enter TV as the value it should contain.
  4. Connect the No output of this card to the grouping action. This prevents grouping while the TV input is active.

The cache looks at the final text after all variables and tags have been resolved, together with the selected voice, speed and pitch. If a tag produces exactly the same text again, the cached audio is reused. The current cache is stored in memory for 30 minutes.

In a future version, I may add a small persistent disk cache, so frequently repeated messages won’t need to be generated again after the cache expires or the app restarts.

There is currently no fallback to Homey’s or Sonos’ built-in voice. If Azure or the internet is unavailable, a message can only be played if it is still cached; otherwise, the flow card will fail.

It shows HDMI/Optical, just like when watching tv. Tried a lot of flows. Nothing works…

Livingroom should show Line-In instead of HDMI.

A perfectly comprehensive and helpful answer: thank you. A persistent cache would be a great idea.

I realise also that the standard Homey/SONOS speak used the cloud too, so wouldn’t help as a fallback. Instead I shall upload to Homey some standard speech phrases using Soundboard and fallback to those if your speech card fails.

Thanks again for making this app.

The ‘HDMI/Optical’ text is shown when the external source is active (typically the optical (SPDIF) or HDMI inputs on a soundbar, or the line input in your case).

Based on @xiutit 's earlier post: try to replace the suggested TV text with HDMI in step 3.

But then it also groups when watching tv. That’s the whole problem.