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

    Matt W
    Matt WAuthor
    Sonos Employee
    March 27, 2015
    I'll be glad to help, if you can give me specifics of where things are going wrong. In order to spare everyone the long thread, please contact me via the "Contact" page of my site. Thanks!
    Principal Sonos Developer Advocate
    Lyricist II
    June 13, 2016
    I'd pay good money for a little device e.g. From a Pii or something that was a bit more plug and play for me to add IFTTT to Sonos. I only have the play 1 but I'm not buying anymore Sonos kit if I can't get IFTTT to work.

    Is there a Sonos alternative that supports IFTTT?
    Lyricist I
    March 29, 2017
    The link to the website is dead. Has anyone achieved this solution and can provide details
    Headliner II
    March 29, 2017
    I'm using ifttt with my sonos. Since this post, they've introduced the maker channel which allows you to invoke arbitrary http calls. By having an exposed computer at home, with the appropriate software, you can now trigger actions on Sonos.

    I run my own http api, use a dynamic dns service and have mapped a hostnamn with a ssl certificate via let's encrypt for extra security (it's not required).

    Primarily I'm using it to apply presets via Amazon echo, which means I can say "Alexa, trigger music" to start playback and "Alexa, trigger bedtime" to pause all players. But any trigger supported by ifttt can be used.

    If you skip ssl it is much simpler, but you probably should use some sort of authentication to avoid abuse if someone finds your endpoint. Dynamic dns is also recommended unless you rarely change IP. However, it is not a plug and play solution, never will be. If you don't understand port forwarding, and basic routing, don't try it.

    Given that Sonos already introduced cloud control of the sonos system, I however think that ifttt will come eventually.
    Lyricist I
    March 29, 2017
    Thanks jishi for your response. That all sounds great but a little above my experience level I'm afraid. If I can't work it out I guess I'll have to wait for Sonos to catch up.

    Thanks
    KenS
    Enthusiast II
    March 30, 2017

    Given that Sonos already introduced cloud control of the sonos system, I however think that ifttt will come eventually.


    Has Sonos introduced cloud control? I was not aware of this and would be very interested to learn more about it.
    Headliner II
    March 30, 2017

    Given that Sonos already introduced cloud control of the sonos system, I however think that ifttt will come eventually.


    Has Sonos introduced cloud control? I was not aware of this and would be very interested to learn more about it.


    Not generally available for you as a user, but the Spotify Direct solution is based on cloud control. That's why you can start playing via Spotify Direct, and continue to control it even though you leave your home network (in the Spotify app). It is also evident in the status pages of the players, where it list info about cloud connections (basically, websockets) and what control capabilities it have.
    Lyricist III
    August 6, 2017
    I'm using ifttt with my sonos. Since this post, they've introduced the maker channel which allows you to invoke arbitrary http calls. By having an exposed computer at home, with the appropriate software, you can now trigger actions on Sonos.

    I run my own http api, use a dynamic dns service and have mapped a hostnamn with a ssl certificate via let's encrypt for extra security (it's not required).

    Primarily I'm using it to apply presets via Amazon echo, which means I can say "Alexa, trigger music" to start playback and "Alexa, trigger bedtime" to pause all players. But any trigger supported by ifttt can be used.

    If you skip ssl it is much simpler, but you probably should use some sort of authentication to avoid abuse if someone finds your endpoint. Dynamic dns is also recommended unless you rarely change IP. However, it is not a plug and play solution, never will be. If you don't understand port forwarding, and basic routing, don't try it.

    Given that Sonos already introduced cloud control of the sonos system, I however think that ifttt will come eventually.


    Hello Jishi,

    I am running your API and have a dynamic dns service with all the port forwarding and all configured. I am trying to integrate to Google Home, instead of Alexa, but I cannot get the IFTTT commands to work. The http api server is running and I can control Sonos locally using commands, but cannot via IFTTT. Any recommendations that you can make for me?
    Headliner II
    August 6, 2017

    Hello Jishi,

    I am running your API and have a dynamic dns service with all the port forwarding and all configured. I am trying to integrate to Google Home, instead of Alexa, but I cannot get the IFTTT commands to work. The http api server is running and I can control Sonos locally using commands, but cannot via IFTTT. Any recommendations that you can make for me?


    Start by verifying that your public endpoint is actually up and running (meaning, test a request against your dynamic DNS name, and some request that you expect to work). You might need to do this over a cellular network or somewhere outside of your LAN, since your router might not respond to traffic for your external IP from within your network.
    Lyricist III
    August 6, 2017
    I did this from work today and the command works externally. I think it must be something in my IFTTT setup.