Sonos and light dim in a single smartapp

Is there a way I can trigger a smartapp inside a smartapp?

What I want to do is have a single smartapp that will set the lights to 10% and start playing a specific playlist on my sonos. I can do the specific track, but I cant tie lights to it. I need a smartapp that can trigger smartapps.

Is there such a thing?

A routine. Plus extra characters.

Nope, I can not trigger the smartapp from inside a routine.

You can definitely set a routine that triggers your playlist and dims lights. Am I missing your intent?

I would like to know where because in routines all I can find is turn on lights or switches, turn off lights or switches, set dimmers, set home monitor, lock doors, unlock doors, open or close garage doors, set thermostat and set mode.

Absolutely nowhere can I run a smartapp or select from the smartapps I have.

How do you trigger the play list?

One way of doing this is to create a virtual switch. Your SmartAp then subscribes to this switch and activates when it is turned on/off. Then you act on that switch from the routine.

By running the smartapp designed to do the sonos playlist trigger.

there is no other way of loading the playlist into the sonos other than triggering the smartapp.

Wait, you can add virtual switches? how do you do that?

Create a new device in the IDE, make the type a “Momentary Button Tile”

just a new device with no code in it at all?

Select “Momentary Button Tile” as your device type.

1 Like

You want to create a device, not an app

https://graph.api.smartthings.com/device/create

You’ll then use that button as a trigger in your app

The FAQ worked perfectly! Awesome and thank you all, this will really expand my smartthings ability by triggering smartapps from smartapps.

I would like to do the same thing.

Once you get this to work can you post a step by step for a noob please!

I have tried for a long time to do this, so this would be great!

Step 1 follow the link about 3 posts up that says… “FAQ:Creating a virtual device”

Then all I did was attach the device to the smartapp as a trigger, then call the virtual switch with the “turn these on” section of the routine along with the lamps I want to turn on.

The virtual device acts as the glue to give us what smartthings did not give us in the base design.

Which SmartApp did you use?

Sonos mood music smart app

I have 4 Sonos Speakers.

So if I had all 4 going earlier in the day and I create a new Bedtime Routine and I only want 3 of my Sonos speakers to go I would need to create 4 Virtual switches. 3 to play my playlist and 1 to to turn off or set the level to 0%.

The sonos mood music only supports 1 sonos player so you need to add 4 of them, and 4 virtual switches. pausing a sonos to stop music you do not need a smartapp.

But, the music on all of the speakers will not be in sync. none of the sonos smartapps support joining speakers into a group yet, so if you start the same playlist on 3 speakers separately they all will be a few seconds behind or ahead of each other and will sound weird.

Someone needs to make a “sonos group and ungroup” smartapp to start up multiple room or whole house modes.