[APP][Pro] Sonos (LocalAPI)

Hmm, i don’t know yet. But would be cool to do something when the song is like 50% into the song. Or at X seconds. Also i like having all data in 1 place which your app is already good at! So adding these 3 as sensors, tags and flow cards would make your app much better.

Thank you for the new Seeking card!

I have created an extensive media player dashboard using your great Sonos app in combination with another very nice Homey app Dashboard Studio.

I managed to display the lyrics at the right moment while Sonos is playing a Spotify song. However, it is annoying that the speaker_position functionality updates every 15 seconds if you want to display the lyrics at the right moment.

Would it also be possible to jump to a specific number of seconds within the song, rather than using plus or minus x seconds?

In addition to this request, could you take a look at the playing state not changing correctly? My Move 2 is playing, but it states as paused from your app. Song, artist and album still changes. But the playing state stays on paused, it does get fixed when restarting the app, but it has happened multiple times. Could you take a look at it?

16344584-bb90-49ae-8f37-1f6ead344e6d

Audio books do indeed work now. One small thing I noticed is that when building the flow populating the [favorite] dropdown/selector occasionally stays empty. After a while it shows a [time out exception]. That exception persists. Only way to fix it is to refresh the flow page in the browser.

But, once configured, it works

I have 4 Sonos Era 100s in my house which I’ve just added to homey.

3 of them show the icon which look like the Era, but one has an icon which just says sonos. Any idea why and any way to change it?

Also, any chance for an icon for the Sonos Play?

Nice solution!

I did note that the favorites widget shows an error while the Sonos system is not powered on.

Would be nice if the error description could be replaced by a more user-friendly text (e.g. “Favorites currently not available; turn on your Sonos system.”). Or, better: keep displaying the last know set of (configured) favorites (maybe in a dimmed format), but disable the tap action.

@xiutit: You recently added two flowcards regarding the Autoplay function on soundbars.

The overall flowcard works just fine: Autoplay is enabled/disabled instantly when commanded via the respective flowcard: the change is reflected in the Sonos mobile app.

I am having issues with the second flowcard for enabling ungrouping of speakers on Autoplay. When using this flowcard to enable the said option, nothing seems to happen. The option is not being enabled; it stays disabled when checking in the Sonos mobile app.

Some further context. I have two flows:

  • One that disables Autoplay. Sonos then also automatically disables the ungrouping option. So the flow only uses the first flowcard (Set TV Autoplay to No), which results in both option being disabled.
  • One that enables Autoplay. Sonos does not automatically re-enable the ungrouping option. So I first use the first flowcard (Set TV Autoplay to Yes) and then the second one to enable the ungrouping option (Set ungroup on TV Autoplay to Yes).

As indicated, the second command does not seems to be processed by my Playbar. The flowcard does not result in an error (so it seems to have bee executed succesfully).

I first thought that I might have to wait a few seconds between running both commands, but to no avail.

If I manually run the Set ungroup on TV Autoplay to Yes flowcard then after several attempts the option is enabled. So it seems that the flowcard is able to send the command successfully at some time.

Any idea what could be causing this behavior and how to tackle it?

In V2.3.0 the app will now verify the setting after sending the command and retry it a few times if Sonos did not apply it yet. If it still fails, the flow will return an error instead of silently reporting success.

Also improved the widget offline handling. It will now dim and doesn’t respond to taps when the speaker is unavailable.

Hi, could you implement duration (seconds), progress (%) and progress (seconds) as i mentioned? I sometimes find 1 part of the song too loud or too quiet. For example when progress (%) is at 50% then set volume to 75%. Also sometimes playing state shows wrong, for example: Move 2 playing but Sonos LocalAPI says it isn’t. Restarting the app fixes it.

This was already implemented but wasn’t in the live version yet.

Now v2.3.0 is live so that should make this available to everyone.

Oh! I didn’t notice, thank you! I see them in tags, could you also put them in as sensors here?

Would be amazing! (and as WHEN cards?)

They should be there. Are you running v2.3.0?

Yes, i am. I can try restarting the app? If not, then i might have to readd devices? (i’ll try installing again just to be safe)

I reinstalled the app and found them! Thank you for this amazing app :grin: (also how often do the values update?)

For now, once every 15 seconds. I’m considering implementing some internal timer which would make it possible to update every second without having to poll the speakers every second, but that requires some work.

Alright, thanks! Did you add WHEN cards for the duration and progress (both % and seconds)? I know i can make a workaround to do it myself, but it would be better in your app. I’m not sure if you did add it or not as i can’t see it.

No, these are not yet implemented. Will add them to the wishlist.

Hello Xiutit, thanks for the app. I was wondering if automatic IP detection and update is also on your wishlist? Greetz!

Automatic IP detection is already there.

(But for surround speakers it’s manual)

Thx for your feedback. After a reboot of my modem, I lost connection and I had to update all IP’s manually to restore. Is it possible detection happens only when installing, but if IP changes afterwards you need to update manually?