Skip to main content
Matt W
Sonos Employee
June 9, 2014

Hook your Sonos system to IFTTT and control it with the cloud

For those unfamiliar, If This Then That (IFTTT) is a service that lets you hook two internet services together, with the first acting as a trigger and the second as a destination. For instance, you can say IF a new Instagram photo is posted in a certain area, THEN save it to my dropbox folder.

I've written an app that (with some work) hooks a Sonos system to IFTTT. So you can do things like IF someone tweets with a hashtag, THEN speak the tweet through my Sonos, or IF I arrive home, THEN play a specific Sonos Favorite.

It's pretty cool to ponder the neat things you can do with the scores of channels that IFTTT offers.

Check it out, and let me know if you have any questions. And certainly let me know how you end up using it.

If This Then Sonos
    This topic has been closed for further comments. You can use the search bar to find a similar topic, or create a new one by clicking Create Topic at the top of the page.

    22 replies

    reddot
    June 9, 2014
    Cool! Thanks.
    Matt W
    Matt WAuthor
    Sonos Employee
    June 10, 2014
    Messing around with recipes, I hooked up my Fitbit scale to my Sonos, and had my weight spoken throughout the house whenever I stepped off the scale.

    Quickly disconnected that recipe.
    Principal Sonos Developer Advocate
    Matt W
    Matt WAuthor
    Sonos Employee
    June 13, 2014
    One last note on this hack. Launch Center Pro, a neat action and app launcher for iOS, recently received an update that features IFTTT integration. Naturally, I made actions that start up various Favorites on various Zones. Pretty handy.

    Launch Center Pro to Sonos, via IFTTT
    Principal Sonos Developer Advocate
    Headliner II
    June 13, 2014
    One last note on this hack. Launch Center Pro, a neat action and app launcher for iOS, recently received an update that features IFTTT integration. Naturally, I made actions that start up various Favorites on various Zones. Pretty handy.

    Launch Center Pro to Sonos, via IFTTT


    Seems like a pretty big roundtrip to have Launch Center invoke a IFTTT command, which invokes an XMLRPC proxy to talk to your raspberry pi.

    Instead of just using the Google chrome support to open url and return to a http action directly on your raspberry pi... 🙂
    Matt W
    Matt WAuthor
    Sonos Employee
    June 13, 2014
    Seems like a pretty big roundtrip to have Launch Center invoke a IFTTT command, which invokes an XMLRPC proxy to talk to your raspberry pi.

    Instead of just using the Google chrome support to open url and return to a http action directly on your raspberry pi... :)


    Of course you're right, though I'm not sure what you mean by "using Google chrome support to open url".

    A more direct route would be to use LCP to call your sonos-api rest endpoint running on the pi. This was more a proof of concept. You could use Launch Center's extensible actions to do bigger things than simply playing a favorite.
    Principal Sonos Developer Advocate
    Headliner II
    June 13, 2014
    Of course you're right, though I'm not sure what you mean by "using Google chrome support to open url".

    A more direct route would be to use LCP to call your sonos-api rest endpoint running on the pi. This was more a proof of concept. You could use Launch Center's extensible actions to do bigger things than simply playing a favorite.


    The chrome support was the only plausible http request support that I could find according to docs, although I would have expected LCP to have native webhook support. Obviously it has.

    I have been experimenting with on{x} on android to achieve similar features. Very handy. For instance, I have the following rule:

    When connecting to home wifi:
    pause spotify playback on mobile
    regroup all players and set predefined volumes
    start playback on Sonos instead
    Matt W
    Matt WAuthor
    Sonos Employee
    June 24, 2014
    OK, Jishi, you'd have to admit that THIS would be useful:

    Using today's new Nest Protect Smoke Detector IFTTT channel, you could set up a recipe to announce "Carbon Monoxide detected" on every speaker in the house. That would be pretty cool (except for the whole mortal danger from carbon monoxide part).
    Principal Sonos Developer Advocate
    Headliner II
    June 24, 2014
    I didn't mean to sound negative, sorry if I gave that impression :)

    IFTTT is a very cool service, and that nest stuff sounds awesome.

    It was more the triple round trip through 2 external services that I was skeptical about. Your SMS stuff and other cool interactions that you could create from twitter or whatever using IFTTT is really cool, and opens up a lot of new possibilities, I am sure.

    Like song requests during a party through a facebook group/event, autopopulate tracks from last.fm, start playing soundcloud likes (or a new upload from a followed user) directly on your sonos (they expose direct mp3 links but requires a key from your session it seems)
    Matt W
    Matt WAuthor
    Sonos Employee
    June 25, 2014
    I didn't mean to sound negative, sorry if I gave that impression :)


    I know you were just kidding. I was kidding back. I have found a good use for the LCP to IFTTT to Sonos path though. I've got an LCP action that accepts text input, which is then sent to a Sonos to be spoken. I can do this from anywhere in the world, not just in my house. With this, I can remotely yell at my teenager to get out of bed!

    I like a lot of the examples you give. So many great ideas out there. I know Sonos is thinking about these too.
    Principal Sonos Developer Advocate
    Lyricist II
    March 27, 2015
    Hi. I've been working through your set up to try and integrate IFTTT LCP and my Sonos together, but can't seem to get the hang of it. Is there a way to dummy explain it to help me out?