Git Product home page Git Product logo

sonosifttt's Introduction

Description

A nodejs app to act as WordPress xml-rpc endpoint, to allow the use of the IFTTT WordPress channel as a means to control a Sonos system.

Detailed Information

Check out this blog post for a detailed description.

Setup

Clone the git repo, cd into the created directory, and type npm install to install the required packages. Edit “sonosifttt.js” and change the port on the very last line to a number that works for you. Type node sonosifttt.js to start the server.

Next, get your router all set to forward data from external port 80 to the port you chose above. This procedure varies by router manufacturer, but you can generally find instructions by Googling your router make and model, and the phrase “port forwarding”.

Now get an IFTTT account all set up. Once this is done, you need to set up the WordPress channel. (Remember, we’re exploiting the relatively configurable nature of the WordPress channel on IFTTT). To set up the channel, go to the Channels page, scroll to the bottom, and select the WordPress icon.

Click on “Activate”, and enter the URL/ip address for your home network. Username and password are required, but are not checked anywhere, so you can enter anything in these field. If all goes well, once you click the “Activate” button on this page, IFTTT will reach out to your node server, running the sonosifttt.js code, and recognize a WP XML-RPC endpoint.

I noted above the username and password are not checked currently, and in the github code, they’re not. I’d highly recommend you put in some kind of username/password checking to reject any request from folks looking to mess with your Sonos system.

Use

Using the fields in the WordPress channel, send commands to the Sonos system with this format:

  • Title – Can be either “play”, “pause”, “favorite”, or “say”.
    • play – Play what ever is in the queue of the selected Zone
    • pause – Pause the selected Zone
    • favorite – Play the Sonos Favorite specified in the “Body” section
    • say – Speak the text specified in the “Body” section
  • Body – Used to provide information for the “favorite” and “say” commands
    • for the “favorite” command – the EXACT name of the favorite you want to play
    • for the “say” command – the words you want spoken by your Sonos
  • Categories – Comma-delimited list of Zones you want to be the receivers of the command. Note that if your selected Zone is the “child” in a Sonos Group, the commands will actually be applied to the “parent” of the group

sonosifttt's People

Contributors

mattwelch avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.