Aeon Minimote to call Sonos Action

I purchased an Aeon minimote and I want when I push a button on it for it to play a specific channel on my sonos. I setup the action in the sonos smartlabs app and all works great when I push the app on my mobile. The minimote is setup with button controller and working correctly and I have it successfully calling some Hello Home actions. However, I can’t seem to get the Button Controller or the Hello Home actions to call the my sonos smartlabs action. Either one would work for this use case.

Any help would be appreciated. It’s been a goal of mine for along time to just be able to push a button on a remote and have NPR on the sonos while I get ready for work in the morning.

I have no problem writing some code to do this, but I am curious where to start,

Thanks!!

1 Like

Edit:

Just saw the sonos mood music has a button trigger. Have you tried that?

Yes and it works, but it attaches to all the buttons on the remote not a single button.

Thanks…

What do you mean? If you use Sonos mood music with a button it uses every button and no other app can use any buttons on the remote? You should be able to pick just one button and call it a day.

I wish it was that easy. Unfortunately the minimote is not quite a first class citizen on ST yet, So as far as ST is concerned it is a single button. There is a smart app that lets it act as 8 buttons, but I cant seem to map those buttons to the sonos control apps

what can you call in the button controller app?

I don’t have a minimote so im just trying to figure things out.

I see this in the button controller code.

def getButtonSections(buttonNumber) {
	return {
		section("Lights") {
			input "lights_${buttonNumber}_pushed", "capability.switch", title: "Pushed", multiple: true, required: false
			input "lights_${buttonNumber}_held", "capability.switch", title: "Held", multiple: true, required: false
		}
		section("Locks") {
			input "locks_${buttonNumber}_pushed", "capability.lock", title: "Pushed", multiple: true, required: false
			input "locks_${buttonNumber}_held", "capability.lock", title: "Held", multiple: true, required: false
		}
		section("Sonos") {
			input "sonos_${buttonNumber}_pushed", "capability.musicPlayer", title: "Pushed", multiple: true, required: false
			input "sonos_${buttonNumber}_held", "capability.musicPlayer", title: "Held", multiple: true, required: false
		}

Looks to support sonos? Is the “music player” not what you want to control here? Maybe i just need to go pick up a sonos already :wink: haha

From what I can tell the sonos control simply toggles the play/pause.

This may be a limitation of the current sonos integration

Can I programatically get control of the sonos smartlab apps? If I can trigger those though code, I can do what I need.

Probably. Let me look into it:)

Do I understand you correctly that your MiniMote’s button toggles your Sonos? Mine only turns it on if the Sonos is paused; if the SOnos is playing, pressing the button does nothing.

I wrote an app to assign many sonos functions to the minimote. Give it a spin.

https://bitbucket.org/louisparks/smartthings/src/8e7fc60d1d36cc6337c0b10ebcb5698463d806bd/SmartSim/src/main/java/SonosRemote.groovy?at=master

5 Likes

@louisparks

How cool is this!!! I added the actions to the held buttons and it worked. I already had the pushed buttons configured and those still work.

I have a lag, but I always had it with the Minimote.

Thanks for sharing!!!

Thanks for the info; however, I need the MiniMotes to sit on the bed stands and be able to trigger modes as either “Night” or “Home”, and, when a sensor in tripped, to toggle my siren and to toggle my blaring Sonos. With the Button Controller SmartApp, I can do everything except toggle the Sonos off.

I am pretty sure you can run have multiple apps to listen on the remote events. just use my app to do only the sonos part of it. The other apps can do the rest.

Yes, it works for me.

Again, thanks for sharing.

I’m having the same issue. It would seem like a good idea for the button controller smart app to be able to invoke other smart apps - but AFAICT, the button controller actions are a bunch of hardcoded things.

I have installed a batch of Sonos smart apps to do the various things I want, and I would like to be able to invoke those without a lot of hassle from my minimote. I was actually kind of surprised to see that the button controller app can’t do this.

I will try out @louisparks contribution, it sounds like that will probably work. It would be a lot nicer to have this functionality in the released product - user contributed apps often go stale and break after upgrades (not saying this will happen here, but in general that is a problem with community support of any product.)

I have been a longtime user of the Squeezebox, and when my kitchen squeezebox recently bit the dust, it was time to switch to Sonos - given that Logitech has dropped the product it didn’t seem like a good idea to invest in a new one. Sonos is superior in a lot of ways, but they have made the decision to avoid front panel control. Doing things from a phone app is okay, but a dedicated remote is almost always easier, and preferred if possible.

As is often the case, I can do this with my Logitech Harmony controller or SmartThings. I’ve already set up the Harmony and it’s integration is pretty sweet, In the long run I think SmartThings integration will be offer more, but this minimote hurdle is the first thing I have to get past.

  • Mark

I’ve avoided doing any hacking with my SmartThings as long as possible, but I really would like to be able to get better control of my Sonos from my Minimote, so I gave the @louisparks app a try. Never having used the IDE, browsed the docs, programmed in groovy, or installed my own apps, it went better than expected - IOW I was able to get something done pretty quickly. A few comments:

This app doesn’t let me select a favorite from a button. My very quick and dirty hack was to add actions called Favorite 1, Favorite 2, etc, and allow those to be assigned to buttons. This went well.

@louisparks is slightly abusing Sonos terminology - a Sonos Favorite is a very specific thing - an item on the Sonos Favorites menu. If I follow the logic, @louisparks is creating a dynamic favorites list based on things played in the last 30 days. This has some nice side effects, it lets you easily find favorite tracks that you haven’t assigned to the Favorites menu, but it may result in some user surprise/confusion.

Okay, maybe I just am new to the docs, but I’m a little befuddled here. I would have thought that since the Sonos is now a supported device I could find it in the apis. No. Sonos is a musicplayer, and I could find that, but that doesn’t tell me everything. Also, if I enter ‘musicplayer’ in the search box - zip. What’s up with that, search should be at least somewhat functional, shouldn’t it?

For my personal tastes, I will not be pursuing this app - a much better solution will be to modify the minimote button controller to be able to invoke smart apps.

Short term, I’ll be using the Logitech Harmony remote for this.

  • Mark

Hi @snorkelman, you can also use the Squeezebox in SmartThings, Just check this

@louisparks dude, this is great. I wrote a horrible hack that adds the ability to pick a button to invoke a Sonos weather report. It was cute, but yours is great, and it helped me figure out how to convert the AEON button data to a json object. I knew it was a string but couldn’t figure out how to invoke the Slurper until I saw your code. Many thanks - this will help me on many fronts. By the way, I’m going to rewrite the weather hack properly now that I know these tips and will post it up on my gitHub when I have time later.

1 Like