How to use Tasker to shuffle your playlists on Sonos by voice
If there are two things we love in the modern home, it's Tasker and Sonos. Tasker is an absurdly powerful Android app that can fire off actions when certain triggers are met. Sonos is a polished lineup of connected home speakers that talk to each other seamlessly and plug into every streaming music service out there.
Without an IFTTT channel, it can be a little hard dealing with your Sonos using anything but the official apps, but with a bit of elbow grease you can get Tasker to play nice with your beloved sound system. Here we'll break down how to get a fresh, random playlist started with the bare minimum of fiddling with your phone.
With this set of rules, you'll be able to use a simple "OK Google" voice command to play from a set of your favorite playlists. This framework can also be used to play single, specific playlists. The overall method of getting this to work is to create a list of playlists on your Sonos, assign each a number, and have Tasker roll the dice whenever the command is used. Here are the apps you'll need to install to get started.
Start a random Sonos playlist with 'OK Google' voice search
- Use the native Sonos app to mark favorites of playlists you want to include in your shuffle.
- Open Macronos. Tap the + button in the top-right to add a new playlist.
- Tap the Music icon at the top of the list to chose your playlist. Tap Favorites in the top-left here and select one of your previously-marked favorites.
- Then choose which speakers you want it to play from. Tap the triangle in the top-right of each speaker and select Ignore for those you don't want to play from. Additional options like the play order and the duration to playback are available here.
- Type in a Macro name, then tap Save at the bottom.
- Repeat from 1 for every playlist you want included in your shuffle. Use the same speakers and volume levels for consistency.
- Once your playlists are lined up, open Tasker, and tap the Tasks tab. Tap the + at the bottom to start a new task, name it, and tap the checkmark.
- Tap the + to add the first step, then find Variable Randomize. You can search for this by typing into the Filter field at the bottom.
- Name the variable whatever you like (I use "%Song"), and set the minimum to 1 and the maximum to the number of playlists you want to randomize between. Tap back to return to the Task Edit screen.
- Tap the + button again to add the following step. Tap Macronos (under Plugins) and tap Macro. This can again be found through the Filter field.
- Tap the pencil icon in the Configuration field at the top, and tap the first playlist to put in the rotation.
- Tap the + button next to the If section. Enter the variable name you chose earlier (i.e. %Song) and 1 in the value field.
- Repeat from step 9 for each playlist you want to add. Remember, the maximum for Variable Randomize should equal the number of playlists.
- Go back to the main screen and tap on the Profiles tab, then tap the + icon at the bottom, then Event.
- Select AutoVoice Recognized under Plugin, or find it under Filter.
- Tap the pencil next to the Configuration section and tap Command Filter. Type in the name of the audio command you want to give to start the music playing. Keep in mind that something like "play music" or "play something" will instead trigger Google's built-in music player rather than Auto Voice. I picked "Play Sonos" instead.
Now whenever you make a Google Voice Search and say that command, you'll be randomly served up one of the playlists you've popped into the list here. If you're just looking to play individual playlists with different commands for each, you can use this process and skip the whole random variable usage. You'll need to enable "OK Google" from any screen for a truly hands-free experience either way.
Sonos Play:1
The Play:1 is the smallest Sonos in the series, offering great sound with plenty of bass. The tiny footprint makes the Play:1 a good choice for rooms that are short on surface area.
Get the top Black Friday deals right in your inbox: Sign up now!
Receive the hottest deals and product recommendations alongside the biggest tech news from the Android Central team straight to your inbox!
A threaded mount is on the back so you can pop the Play:1 onto a wall. That's a particularly helpful feature when used in concert with a Sonos Playbar for coordinated TV surround sound.
Sonos Play:3
The Play:3 has a bass radiator, tweeter and two mid-range drivers to offer full sound for a medium-sized room. The speaker can rest in landscape or portrait orientation, depending on available space, and can pair up with other Sonos units for stereo sound.
Like the other Sonos models, the Play:3 connects to a wide range of streaming music services, as well as your own media library. Of the Sonos speakers available, the Play:3 is one of the more versatile models available.
Sonos Play:5
The Play:5 is one of the larger speakers offered by Sonos. It's ample enough to fill a room with high quality sound.
The Play:5 is also one of the few Sonos models with an input jack so you can get a direct line of music into your system from any source. Like the Play:1, the Play:5 can be paired up with a Playbar for truly immersive wireless TV audio.
Learn more about Sonos