Sonos woes

I’ve had a lot of frustration trying to use SmartThings to control my Sonos speaker.

My goal has been to use my minimote - allowing me to program individual buttons on the minimote to select stations/playlists on the Sonos.

SmartThings support for minmote is deficient - the basic view of the minimote is that it is one device with one button. There is a smart app that allows you to control lights with the minimote, but what you really need is to be able to invoke other smartapps from a minimote button press, and that feature does not exist.

Louis Parks wrote an app that more or less did what I wanted. I modded it for my own purposes, but after one other another updates of the Hub software it quit working. My skill with Groovy and the SmartThings API in general is weak, and I haven’t been able to get it working.

While all this is going on, Sonos will soon release an update of their software in order to support Apple Music. I’m not sure if this beta in progress is making the device incompatible with the existing Sonos app, but for starters, Mood Music seems to be broken.

Has anyone else tried to set up smart apps to play specific Sonos music? When I do this now, I get the option to play one thing and one thing only - a Pandora station that isn’t even in my Sonos favorites.

I also swear that the Sonos support has changed - there used to be a smart app to select Sonos stations, but that seems to be gone - maybe replaced with Mood Music?

So in any case, my first question is whether Mood Music is working for other people - if you try to add a new instance of this, where does the list of options come for “Play This Track” come from? And are you seeing the list you expect? (If it turns out to be a problem with beta software, that’s fine, but it means everyone will be broken pretty soon.)

Second is, will there ever be decent support for launching SmartApps from minimote buttons? This is a really nice feature, and I don’t understand why there seems to be no demand for it.

  • Mark

Can you elaborate on what you mean by “launching” SmartApps? SmartApps don’t really launch, in the traditional personal computer sense of the word. They’re always active as long as they are installed.

SmartApps can be written to use button actions as triggers. Or, you can use your Minimote buttons to turn on a virtual switch, and then tie that switch’s state into a SmartApp.

Yes, and I apologize for any abuse of terminology.

In the past, I could use the Sonos smart app to create entries on the Things page for my Sonos that would let me start playing a specific Sonos playlist or station. For example, in the past I had buttons on that things page like “Play WUNC” or “Play Pandora xxx”. Simply pressing that button would send the message to the Sonos to start playing. That may not be exactly the same thing as launching a Smart App, but for this particular one it kind of seems like it in some sense.

I assume that the Mood Music Smart App is going to let me do the same thing, but it appears broken on my system right now - not sure if this is the app’s fault or new Sonos software causing the problem.

In any case, these links to specific Sonos stations could be tied to a button press on the Minimote - but unfortunately not to a specific button - SmartThings seems to think the MiniMote only has one button. (How hard would it be to fix this weakness?)

Your comment about using the Minimote to turn on virtual switch - this is news to me, but maybe it allows me to do what I want. I’m not sure I’ve ever heard anyone discuss such a thing - can you provide some details on that?

  • Mark

Hey all good. No abuse. I was just trying to get to the gist of it.

You need the Button Controller smartapp to get access to all of the button options. That should get you sorted. You can use that app to bind buttons to switches, hello home actions, etc.

Good luck.

This gets back to the heart of the problem.

The ButtonController smartapp does indeed allow you to use all the buttons on your minimote - for some things.

But it won’t let you invoke a Sonos SmartApp to play a specific playlist, station, or whatever. You can play/pause the Sonos - that’s it.

As I’ve said before, the other buttons on the Minimote are not first class citizens of SmartHome, so you can’t do everything with them that you can with other buttons, and that gets to the heart of my problem.

  • Mark

Using the button controller, virtual switches, and custom smartapps (or the Rule Builder app, if it supports Sonos… I’m not sure), it’s possible to do everything you’re asking for. Unfortunately, that’s the state of things on ST, and I don’t foresee it changing any time soon.

I agree, it’s not a good situation.

So this is a bit of a hack, but it does work, and I appreciate the guidance. I was not aware that simulated switches even existed.

So the hack for my minimote is: I create 8 virtual switches, VS01-VS08 for button press 1-4 and button hold 1-4. Using button controller, I set those button press/hold events to toggle a virtual switch.

I can now use the Mood Music app on my Sonos to select a specific station or playlist, and have it be controlled by either turning the switch on or turning the switch off. (Since the minimote is toggling the switch, this kludge is needed.)

This is all holding up okay. I’m still a little unclear on why the discovery of Sonos playlists and stations is so random. If I play a station long enough, it will show up in the mood music track list sooner or later, but I don’t know how to force it.

Anyone who wants to create simulated switch can find the docs here:

I observe server errors on about 50% of times I create the switch, but it does always seem to actually get created and work properly, regardless of error message.

Thanks again for the pointer, this is much better than maintaining my own app to do this.

  • Mark
1 Like

You can look at virtual momentary switches too. Those always return to Off after you turn them on. I don’t know if that helps you at all.

Good luck.

1 Like