Sonos has always had a focus on creating meaningful partnerships. From music services to voice to our Works With Sonos certification program, we want to listen to our favorite audio content whenever and wherever. The launch of the Sonos sound platform in September opened up a world of new possibilities, with three main goals in mind – creating new opportunities for our partners, making our platform more open for developers, and providing listeners with natural and personal experiences. Unfortunately, if someone doesn’t know how to code, it doesn’t matter how open or useful our platform is – that’s where IFTTT comes in.
IFTTT is such a natural fit for us, and our users have been asking for us to integrate with them for years. The launch of our open cloud-based Control API made this a possibility – and we wanted to get this out as soon as possible. A Sonos service on IFTTT lines up with so many of our values at Sonos, allowing us to integrate with hundreds of services, including Nest, Philips Hue, Ring, GE Smart Appliances, allowing our listeners to use their Sonos in completely new and groundbreaking ways.
If you’re unfamiliar with IFTTT, here’s a quick rundown of what it is: IFTTT has integrated with hundreds of different products, websites and content providers, called services. They have millions of users using their product today that allow you to create applets, that consist of an “if” portion referred to as a trigger and a “then” portion, or action. For example, if someone rings my doorbell, then tweet “Somebody’s at my door”. With IFTTT, anyone can create incredibly useful additions to their system which would be complicated to code from the ground up.
How We Did It
Essentially, IFTTT acts as a translator between our API and IFTTT users. In order to make this possible, we created IFTTT-specific endpoints in order to feed info from your Sonos system to IFTTT (to build lists of players & favorites, for example), and from IFTTT to your system. For example, this command which resumes playback on a group called RINCON_00012345678001400:0 may look something like this.
POST /groups/RINCON_00012345678001400:0/playback:1/play HTTP/1.1
Authorization: Bearer <token>
In IFTTT, a similar request may look like this.
We’ve done this for a total of 11 actions for our beta release. Our most popular actions are Play Favorite, which allows listeners to play a preselected Sonos favorite on a chosen group, and Pause, which pauses a specified player, or group.
What is the best way to show how powerful our API is while maintaining simplicity and ease of use? The biggest challenges we faced stemmed from the understanding that IFTTT users don’t have as much freedom as a developer working directly with our APIs. We needed to make sure to balance having enough options when enabling actions without overcomplicating.
In this process, we made a few particularly difficult decisions.
One issue we wanted to address was an “Everywhere” option within our IFTTT applets. In our desktop and mobile controllers, we have the option to instantly group all speakers. For our IFTTT integration, we needed to think carefully about when our listeners would utilize this functionality. We could make room grouping its own Action, or add it in as an option within certain Actions. For example, it made total sense to group all speakers when pausing, but would anyone want to resume all of their speakers at one time? We decided to have three options for room grouping – one single specified player, the group containing the specified player, or everywhere.
While we believe having room grouping options (as opposed to Actions) is a better implementation, we quickly realized that we approached it from the wrong angle. The current process in creating an Applet to play a favorite playlist on all your speakers is:
- IF (Trigger)
- [whatever trigger you want to use e.g. location, button]
- THEN (Action)
- Play Favorite
- What favorite do you want to play?
- Where do you want to play? (Kitchen, Dining Room, Bedroom)
- Include grouped rooms? (this room only, include grouped rooms, everywhere)
- Play Favorite
If you’re trying to play everywhere, you first have to select a single speaker, and we are considering moving the Everywhere option to the “Where do you want to play?” selection (Kitchen, Dining Room, Bedroom, everywhere).
Volume controls also fall into a similar category. We currently have Volume (Up, Down, Set, Mute, and Unmute) as standalone actions, but a Set Volume option in the Play Favorite Action could be useful for routines, alarms, or an instant party. IFTTT has a great feedback mechanism built in, and we’ve been reading and understanding how Sonos users would connect their system to their smart home.
All in all, we’re incredibly proud to have launched our Sonos service on IFTTT. Our goal is to make this the best experience possible, and trying to best understand what it means for Sonos to be the sound of the connected home.
Why We’re Excited
Sonos is focused on helping our listeners to listen better. Our open sound platform allows integrations that were previously unimaginable, and allows anyone to build and create novel experiences. Kind of. We understand “anyone” is actually limited to people who have the time, skill, and motivation. With IFTTT, listeners can easily choose and enable exactly what they believe will enhance their Sonos experience.
Our plan is to keep the IFTTT experience parallel to our APIs on our platform. Our new playlists API makes it possible to pick and play any of your Sonos playlists. And our new audioClip API allows for short audio clips and notifications to be played over your Sonos system. Imagine your Sonos speakers being able to notify you when your laundry is complete, when someone rings your doorbell, or even read aloud tweets you’re mentioned in. As our platform continues to grow and improve, our IFTTT integration will too. We’re excited to see what you’ll build! Check out our favorite IFTTT applets here:
Seth Goldstein – Senior Development Manager-Cloud Platform – Currently listening to Hands Up Head Down by Sure Sure
Tarush Mohanti – Product Manager-Cloud Platform – Currently listening to Final Credits by Midland