[APP][Pro] Sonos (LocalAPI)

I looked back in the above thread. I misread some key info you provided earlier :blush::

If I understand correctly, the app displays ‘HDMI/Optical’ in case one of the following inputs is active:

  • Optical (SPDIF)
  • HDMI
  • Line-input

These assume that in all cases a TV is connected.

However in your case the line-input is used for another music device and you want to distinguish between the line-input vs. the optical/HDMI. And that is currently not possible in the app. Right?

Correct! I use a Port to play the music on my record player. But that is also shown as HDMI/Optical.
Same as when I’m watching tv or playing on my Nintendo Switch 2.
I don’t want grouping when watching tv, only when playing vinyl.

Do you have a way to add your TV to Homey? You could then add an AND condition requiring the TV to be turned off before grouping the speakers.

Alternatively, you could connect the TV through a Shelly Plug or similar device and use an AND condition such as “Power is below X watts” to determine that the TV is off.

Hello,
I currently use a local Sonos API server to control my Sonos speakers.
Does your app install an API server on Homey as well?
For example, for volume control using an IKEA remote.
Does your app replace my API server?

Hope this will work!!!

Hi @Friedhofsblond, the app does not install a general-purpose API server on Homey. Instead, it communicates directly with your Sonos speakers over the local network and exposes them as Homey devices with Flow cards.

For the example shown, you can connect the IKEA remote directly to actions for adjusting the volume, play/pause and next/previous track. For these Homey Flows, your separate API server should no longer be necessary.

@xiutit
It works quite quickly via the Hue Bridge workaround, too!!
Great—though setting up all 8 Sonos speakers again is a lot of work.
Thanks for the app.

Hello. I do not have a Sonos . But I’m wondering if I can start a flow if I talk to my Sonos like "hey Sonos turn the volume up or turn the lights off " if it can translate the speech to a variable and if the variable is true it will do the action ? I have an Alexa but when the internet is down it doesn’t take commands anymore . Tia !

Hi @xiutit, Would it be possible to add a flowcard that triggers a scan of the local music library in order to update its contents?

It’s this button in the Sonos mobile app: :gear: Settings → Music Library → Scan for new content (‘Nieuwe content scannen’ in Dutch)

This Sonos app works great.

One thing I noticed: Playing music with the Sonos (Local) app does not show me the randomized play that’s been enabled. The other Sonos app does. Is there any way to fix this? Thanks a lot for creating this!

I’ve added a “Scan the music library” Flow card in version 2.8.0 now released in test. Can you give it a try?

Thanks for the quick add (as always :grinning_face:).

The flowcard does initiate a scan, however I doubt whether it is a full scan/covers all locations.

I have a fairly extensive local library spanning multiple locations on my NAS.

The scan triggered by the app takes approx. 10 seconds. The scan triggered via the Sonos mobile app takes approx 2 minutes.

Not sure what the cause is. Maybe the scan initiated by the Sonos (LocalAPI) app does not cover all locations?

What music service are you using and is the player grouped? What happens when you restart the app from the Homey settings?

I’ve checked the API, but can’t find another command. The current command doesn’t specify a folder so I would expect it to cover all locations.

Could you check whether newly added music appears after running the Flow card?

I used Apple Music and the player is grouped (Sonos Arc Ultra + 2x Era 300 + sub)

Good idea :grinning_face:.

I placed a new (different) song in each of the four locations and executed the flowcard: all four songs were added to the library. I then removed the songs from their location and re-ran the flowcard: all four songs were removed from the library.

So it seems to work indeed. Not sure what the Sonos mobile app is doing in the remaining time :man_shrugging: .

Do you believe that the new Sonos Ace Ultra will work with this Sonos (local) app or the Sonos (Cloud) app? I’m very curious cus it does have Wi-Fi and should be able to do things such as playing Spotify alone without any phones or devices connected to it. So i’m curious, will it then be possible to connect the Sonos Ace Ultra?

Edit: Interesting… Sonos Ace Ultra is basically not its own device.. The Sonos Ace Ultra sits on another port of each Sonos speaker for example on a Beam Gen 2 it will have 2 ports, one for the Beam and one for the Ace Ultra…